checkasm
1.0.1
Assembly testing and benchmarking framework
Loading...
Searching...
No Matches
attributes.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2025, Niklas Haas
3
* Copyright © 2018, VideoLAN and dav1d authors
4
* Copyright © 2018, Two Orioles, LLC
5
* All rights reserved.
6
*
7
* Redistribution and use in source and binary forms, with or without
8
* modification, are permitted provided that the following conditions are met:
9
*
10
* 1. Redistributions of source code must retain the above copyright notice, this
11
* list of conditions and the following disclaimer.
12
*
13
* 2. Redistributions in binary form must reproduce the above copyright notice,
14
* this list of conditions and the following disclaimer in the documentation
15
* and/or other materials provided with the distribution.
16
*
17
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
18
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
21
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
*/
28
36
37
#ifndef CHECKASM_ATTRIBUTES_H
38
#define CHECKASM_ATTRIBUTES_H
39
40
#include <stddef.h>
41
53
#ifndef CHECKASM_PRINTF
54
#ifdef __GNUC__
55
#if defined(__MINGW32__) && !defined(__clang__)
56
#define CHECKASM_PRINTF(fmt, attr) \
57
__attribute__((__format__(__gnu_printf__, fmt, attr)))
58
#else
59
#define CHECKASM_PRINTF(fmt, attr) \
60
__attribute__((__format__(__printf__, fmt, attr)))
61
#endif
62
#else
63
#define CHECKASM_PRINTF(fmt, attr)
64
#endif
65
#endif
66
77
#ifndef CHECKASM_API
78
#ifdef _WIN32
79
#ifdef CHECKASM_BUILDING_DLL
80
#define CHECKASM_API __declspec(dllexport)
81
#else
82
#define CHECKASM_API
83
#endif
84
#else
85
#if __GNUC__ >= 4
86
#define CHECKASM_API __attribute__((visibility("default")))
87
#else
88
#define CHECKASM_API
89
#endif
90
#endif
91
#endif
92
93
#endif
/* CHECKASM_ATTRIBUTES_H */
attributes.h
Generated by
1.15.0