fix __declspec use

This commit is contained in:
Christopher Lloyd 2013-05-26 01:07:20 -04:00
parent 7f2fd404ac
commit 9918958baa
9 changed files with 107 additions and 36 deletions

View File

@ -6,13 +6,21 @@ The above copyright notice and this permission notice shall be included in all c
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. */
#ifdef __clang__
#define APPKIT_DLLEXPORT
#define APPKIT_DLLIMPORT
#else
#define APPKIT_DLLEXPORT __declspec(dllexport)
#define APPKIT_DLLIMPORT __declspec(dllimport)
#endif
#ifdef __cplusplus
#if defined(__WIN32__)
#if defined(APPKIT_INSIDE_BUILD)
#define APPKIT_EXPORT extern "C" __declspec(dllexport)
#define APPKIT_EXPORT extern "C" APPKIT_DLLEXPORT
#else
#define APPKIT_EXPORT extern "C" __declspec(dllimport)
#define APPKIT_EXPORT extern "C" APPKIT_DLLIMPORT
#endif
#else
#define APPKIT_EXPORT extern "C"
@ -22,9 +30,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#if defined(__WIN32__)
#if defined(APPKIT_INSIDE_BUILD)
#define APPKIT_EXPORT __declspec(dllexport) extern
#define APPKIT_EXPORT APPKIT_DLLEXPORT extern
#else
#define APPKIT_EXPORT __declspec(dllimport) extern
#define APPKIT_EXPORT APPKIT_DLLIMPORT extern
#endif
#else
#define APPKIT_EXPORT extern

View File

@ -1,11 +1,19 @@
#ifdef __clang__
#define CFNETWORK_DLLEXPORT
#define CFNETWORK_DLLIMPORT
#else
#define CFNETWORK_DLLEXPORT __declspec(dllexport)
#define CFNETWORK_DLLIMPORT __declspec(dllimport)
#endif
#ifdef __cplusplus
#if defined(__WIN32__)
#if defined(CFNETWORK_INSIDE_BUILD)
#define CFNETWORK_EXPORT extern "C" __declspec(dllexport)
#define CFNETWORK_EXPORT extern "C" CFNETWORK_DLLEXPORT
#else
#define CFNETWORK_EXPORT extern "C" __declspec(dllimport)
#define CFNETWORK_EXPORT extern "C" CFNETWORK_DLLIMPORT
#endif
#else
#define CFNETWORK_EXPORT extern "C"
@ -15,9 +23,9 @@
#if defined(__WIN32__)
#if defined(CFNETWORK_INSIDE_BUILD)
#define CFNETWORK_EXPORT __declspec(dllexport) extern
#define CFNETWORK_EXPORT CFNETWORK_DLLEXPORT extern
#else
#define CFNETWORK_EXPORT __declspec(dllimport) extern
#define CFNETWORK_EXPORT CFNETWORK_DLLIMPORT extern
#endif
#else
#define CFNETWORK_EXPORT extern

View File

@ -1,11 +1,18 @@
#ifdef __clang__
#define COREDATA_DLLEXPORT
#define COREDATA_DLLIMPORT
#else
#define COREDATA_DLLEXPORT __declspec(dllexport)
#define COREDATA_DLLIMPORT __declspec(dllimport)
#endif
#ifdef __cplusplus
#if defined(__WIN32__)
#if defined(COREDATA_INSIDE_BUILD)
#define COREDATA_EXPORT extern "C" __declspec(dllexport)
#define COREDATA_EXPORT extern "C" COREDATA_DLLEXPORT
#else
#define COREDATA_EXPORT extern "C" __declspec(dllimport)
#define COREDATA_EXPORT extern "C" COREDATA_DLLIMPORT
#endif
#else
#define COREDATA_EXPORT extern "C"
@ -15,9 +22,9 @@
#if defined(__WIN32__)
#if defined(COREDATA_INSIDE_BUILD)
#define COREDATA_EXPORT __declspec(dllexport) extern
#define COREDATA_EXPORT COREDATA_DLLEXPORT extern
#else
#define COREDATA_EXPORT __declspec(dllimport) extern
#define COREDATA_EXPORT COREDATA_DLLIMPORT extern
#endif
#else
#define COREDATA_EXPORT extern

View File

@ -21,13 +21,21 @@ THE SOFTWARE IS PROVIDED "AS IS",WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED
#include <stdint.h>
#include <time.h>
#ifdef __clang__
#define COREFOUNDATION_DLLEXPORT
#define COREFOUNDATION_DLLIMPORT
#else
#define COREFOUNDATION_DLLEXPORT __declspec(dllexport)
#define COREFOUNDATION_DLLIMPORT __declspec(dllimport)
#endif
#ifdef __cplusplus
#if defined(__WIN32__)
#if defined(COREFOUNDATION_INSIDE_BUILD)
#define COREFOUNDATION_EXPORT extern "C" __declspec(dllexport)
#define COREFOUNDATION_EXPORT extern "C" COREFOUNDATION_DLLEXPORT
#else
#define COREFOUNDATION_EXPORT extern "C" __declspec(dllimport)
#define COREFOUNDATION_EXPORT extern "C" COREFOUNDATION_DLLIMPORT
#endif
#else
#define COREFOUNDATION_EXPORT extern "C"
@ -37,9 +45,9 @@ THE SOFTWARE IS PROVIDED "AS IS",WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED
#if defined(__WIN32__)
#if defined(COREFOUNDATION_INSIDE_BUILD)
#define COREFOUNDATION_EXPORT __declspec(dllexport) extern
#define COREFOUNDATION_EXPORT COREFOUNDATION_DLLEXPORT extern
#else
#define COREFOUNDATION_EXPORT __declspec(dllimport) extern
#define COREFOUNDATION_EXPORT COREFOUNDATION_DLLIMPORT extern
#endif
#else
#define COREFOUNDATION_EXPORT extern

View File

@ -6,13 +6,21 @@ The above copyright notice and this permission notice shall be included in all c
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. */
#ifdef __clang__
#define COREGRAPHICS_DLLEXPORT
#define COREGRAPHICS_DLLIMPORT
#else
#define COREGRAPHICS_DLLEXPORT __declspec(dllexport)
#define COREGRAPHICS_DLLIMPORT __declspec(dllimport)
#endif
#ifdef __cplusplus
#if defined(__WIN32__)
#if defined(COREGRAPHICS_INSIDE_BUILD)
#define COREGRAPHICS_EXPORT extern "C" __declspec(dllexport)
#define COREGRAPHICS_EXPORT extern "C" COREGRAPHICS_DLLEXPORT
#else
#define COREGRAPHICS_EXPORT extern "C" __declspec(dllimport)
#define COREGRAPHICS_EXPORT extern "C" COREGRAPHICS_DLLIMPORT
#endif
#else
#define COREGRAPHICS_EXPORT extern "C"
@ -22,9 +30,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#if defined(__WIN32__)
#if defined(COREGRAPHICS_INSIDE_BUILD)
#define COREGRAPHICS_EXPORT __declspec(dllexport) extern
#define COREGRAPHICS_EXPORT COREGRAPHICS_DLLEXPORT extern
#else
#define COREGRAPHICS_EXPORT __declspec(dllimport) extern
#define COREGRAPHICS_EXPORT COREGRAPHICS_DLLIMPORT extern
#endif
#else
#define COREGRAPHICS_EXPORT extern

View File

@ -11,13 +11,21 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#include <stdint.h>
#include <limits.h>
#ifdef __clang__
#define FOUNDATION_DLLEXPORT
#define FOUNDATION_DLLIMPORT
#else
#define FOUNDATION_DLLEXPORT __declspec(dllexport)
#define FOUNDATION_DLLIMPORT __declspec(dllimport)
#endif
#ifdef __cplusplus
#if defined(__WIN32__)
#if defined(FOUNDATION_INSIDE_BUILD)
#define FOUNDATION_EXPORT extern "C" __declspec(dllexport)
#define FOUNDATION_EXPORT extern "C" FOUNDATION_DLLEXPORT
#else
#define FOUNDATION_EXPORT extern "C" __declspec(dllimport)
#define FOUNDATION_EXPORT extern "C" FOUNDATION_DLLIMPORT
#endif
#else
#define FOUNDATION_EXPORT extern "C"
@ -27,9 +35,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#if defined(__WIN32__)
#if defined(FOUNDATION_INSIDE_BUILD)
#define FOUNDATION_EXPORT __declspec(dllexport) extern
#define FOUNDATION_EXPORT FOUNDATION_DLLEXPORT extern
#else
#define FOUNDATION_EXPORT __declspec(dllimport) extern
#define FOUNDATION_EXPORT FOUNDATION_DLLIMPORT extern
#endif
#else
#define FOUNDATION_EXPORT extern

View File

@ -1,11 +1,19 @@
#ifdef __clang__
#define CGL_DLLEXPORT
#define CGL_DLLIMPORT
#else
#define CGL_DLLEXPORT __declspec(dllexport)
#define CGL_DLLIMPORT __declspec(dllimport)
#endif
#ifdef __cplusplus
#if defined(__WIN32__)
#if defined(CGL_INSIDE_BUILD)
#define CGL_EXPORT extern "C" __declspec(dllexport)
#define CGL_EXPORT extern "C" CGL_DLLEXPORT
#else
#define CGL_EXPORT extern "C" __declspec(dllimport)
#define CGL_EXPORT extern "C" CGL_DLLIMPORT
#endif
#else
#define CGL_EXPORT extern "C"
@ -15,9 +23,9 @@
#if defined(__WIN32__)
#if defined(CGL_INSIDE_BUILD)
#define CGL_EXPORT __declspec(dllexport) extern
#define CGL_EXPORT CGL_DLLEXPORT extern
#else
#define CGL_EXPORT __declspec(dllimport) extern
#define CGL_EXPORT CGL_DLLIMPORT extern
#endif
#else
#define CGL_EXPORT extern

View File

@ -8,13 +8,21 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#import <stdlib.h>
#ifdef __clang__
#define OBJC_DLLEXPORT
#define OBJC_DLLIMPORT
#else
#define OBJC_DLLEXPORT __declspec(dllexport)
#define OBJC_DLLIMPORT __declspec(dllimport)
#endif
#ifdef __cplusplus
#if defined(__WIN32__)
#if defined(OBJC_INSIDE_BUILD)
#define OBJC_EXPORT extern "C" __declspec(dllexport)
#define OBJC_EXPORT extern "C" OBJC_WINDOWS_DLLEXPORT
#else
#define OBJC_EXPORT extern "C" __declspec(dllimport)
#define OBJC_EXPORT extern "C" OBJC_WINDOWS_DLLIMPORT
#endif
#else
#define OBJC_EXPORT extern "C"
@ -24,9 +32,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#if defined(__WIN32__)
#if defined(OBJC_INSIDE_BUILD)
#define OBJC_EXPORT __declspec(dllexport) extern
#define OBJC_EXPORT OBJC_DLLEXPORT extern
#else
#define OBJC_EXPORT __declspec(dllimport) extern
#define OBJC_EXPORT OBJC_DLLIMPORT extern
#endif
#else
#define OBJC_EXPORT extern

View File

@ -2,13 +2,21 @@
#ifndef PTHREAD_H
#define PTHREAD_H
#ifdef __clang__
#define PTHREAD_DLLEXPORT
#define PTHREAD_DLLIMPORT
#else
#define PTHREAD_DLLEXPORT __declspec(dllexport)
#define PTHREAD_DLLIMPORT __declspec(dllimport)
#endif
#ifdef __cplusplus
#if defined(__WIN32__)
#if defined(PTHREAD_INSIDE_BUILD)
#define PTHREAD_EXPORT extern "C" __declspec(dllexport)
#define PTHREAD_EXPORT extern "C" PTHREAD_DLLEXPORT
#else
#define PTHREAD_EXPORT extern "C" __declspec(dllimport)
#define PTHREAD_EXPORT extern "C" PTHREAD_DLLIMPORT
#endif
#else
#define PTHREAD_EXPORT extern "C"
@ -18,9 +26,9 @@
#if defined(__WIN32__)
#if defined(PTHREAD_INSIDE_BUILD)
#define PTHREAD_EXPORT __declspec(dllexport) extern
#define PTHREAD_EXPORT PTHREAD_DLLEXPORT extern
#else
#define PTHREAD_EXPORT __declspec(dllimport) extern
#define PTHREAD_EXPORT PTHREAD_DLLIMPORT extern
#endif
#else
#define PTHREAD_EXPORT extern