HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IexMathExport.h
Go to the documentation of this file.
1 #ifndef IEXMATHEXPORT_H
2 #define IEXMATHEXPORT_H
3 
4 ///////////////////////////////////////////////////////////////////////////
5 //
6 // Copyright (c) 2012, Industrial Light & Magic, a division of Lucas
7 // Digital Ltd. LLC
8 //
9 // All rights reserved.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 // * Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 // * Redistributions in binary form must reproduce the above
17 // copyright notice, this list of conditions and the following disclaimer
18 // in the documentation and/or other materials provided with the
19 // distribution.
20 // * Neither the name of Industrial Light & Magic nor the names of
21 // its contributors may be used to endorse or promote products derived
22 // from this software without specific prior written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
25 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
26 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
27 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
28 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
29 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
30 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
31 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
32 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 //
36 ///////////////////////////////////////////////////////////////////////////
37 
38 
39 #if defined(_WIN32)
40 # if defined(OPENEXR_DLL)
41 # define IEXMATH_EXPORT_DEFINITION __declspec(dllexport)
42 # define IEXMATH_IMPORT_DEFINITION __declspec(dllimport)
43 # else
44 # define IEXMATH_EXPORT_DEFINITION
45 # define IEXMATH_IMPORT_DEFINITION
46 # endif
47 #else // linux/macos
48 # if defined(PLATFORM_VISIBILITY_AVAILABLE)
49 # define IEXMATH_EXPORT_DEFINITION __attribute__((visibility("default")))
50 # define IEXMATH_IMPORT_DEFINITION
51 # else
52 # define IEXMATH_EXPORT_DEFINITION
53 # define IEXMATH_IMPORT_DEFINITION
54 # endif
55 #endif
56 
57 #if defined(IEXMATH_EXPORTS) // create library
58 # define IEXMATH_EXPORT IEXMATH_EXPORT_DEFINITION
59 #else // use library
60 # define IEXMATH_EXPORT IEXMATH_IMPORT_DEFINITION
61 #endif
62 
63 #endif // #ifndef IEXMATHEXPORT_H
64