HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openexr_conf.h
Go to the documentation of this file.
1 /*
2 ** SPDX-License-Identifier: BSD-3-Clause
3 ** Copyright Contributors to the OpenEXR Project.
4 */
5 
6 #ifndef OPENEXR_CONF_H
7 #define OPENEXR_CONF_H
8 #pragma once
9 
10 #include "OpenEXRConfig.h"
11 
12 /// \addtogroup ExportMacros
13 /// @{
14 
15 // are we making a DLL under windows (might be msvc or mingw or others)
16 #if defined(OPENEXR_DLL)
17 
18 // when building as a DLL for windows, typical dllexport/import case
19 // where we need to switch depending on whether we are compiling
20 // internally or not
21 # if defined(OPENEXRCORE_EXPORTS)
22 # define EXR_EXPORT __declspec(dllexport)
23 # else
24 # define EXR_EXPORT __declspec(dllimport)
25 # endif
26 
27 #else
28 
29 # define EXR_EXPORT OPENEXR_EXPORT
30 
31 #endif
32 
33 /*
34  * MSVC does have printf format checks, but it is not in the form of a
35  * function attribute, so just skip for non-GCC/clang builds
36  */
37 #if defined(__GNUC__) || defined(__clang__)
38 # define EXR_PRINTF_FUNC_ATTRIBUTE __attribute__ ((format (printf, 3, 4)))
39 #else
40 # define EXR_PRINTF_FUNC_ATTRIBUTE
41 #endif
42 
43 /// @}
44 
45 #endif /* OPENEXR_CONF_H */