Merge pull request #10 from gunyarakun/fix-invalid-return
[cocotron.git] / objc / objc-export.h
blob39bab9a10a15adfc5cfe69305023bc27a17fad8f
1 /* Copyright (c) 2007 Christopher J. W. Lloyd
3 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
9 #import <stdlib.h>
11 #ifdef __clang__
12 #define OBJC_DLLEXPORT
13 #define OBJC_DLLIMPORT
15 #ifndef __APPLE__
16 #define OBJC_TYPED_SELECTORS 1
17 #endif
19 #else
20 #define OBJC_DLLEXPORT __declspec(dllexport)
21 #define OBJC_DLLIMPORT __declspec(dllimport)
22 #endif
24 #ifdef __cplusplus
26 #if defined(__WIN32__)
27 #if defined(OBJC_INSIDE_BUILD)
28 #define OBJC_EXPORT extern "C" OBJC_DLLEXPORT
29 #else
30 #define OBJC_EXPORT extern "C" OBJC_DLLEXPORT
31 #endif
32 #else
33 #define OBJC_EXPORT extern "C"
34 #endif
36 #else
38 #if defined(__WIN32__)
39 #if defined(OBJC_INSIDE_BUILD)
40 #define OBJC_EXPORT OBJC_DLLEXPORT extern
41 #else
42 #define OBJC_EXPORT OBJC_DLLIMPORT extern
43 #endif
44 #else
45 #define OBJC_EXPORT extern
46 #endif
48 #endif