From 2605e02178be848538e92ca965ed348db858665c Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Mon, 1 Oct 2012 02:59:58 +0000 Subject: [PATCH] Use no attribute on gcc unless using shared lib or making shared lib BUG=none TEST=none git-svn-id: http://libyuv.googlecode.com/svn/trunk@382 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/basic_types.h | 13 +++++++------ include/libyuv/version.h | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.chromium b/README.chromium index 05683b863..40ca7272e 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 381 +Version: 382 License: BSD License File: LICENSE diff --git a/include/libyuv/basic_types.h b/include/libyuv/basic_types.h index 5b9a6172b..f0be3c1ba 100644 --- a/include/libyuv/basic_types.h +++ b/include/libyuv/basic_types.h @@ -84,14 +84,15 @@ typedef signed char int8; #define LIBYUV_API __declspec(dllimport) #else #define LIBYUV_API -#endif -#else -#if defined(__GNUC__) && __GNUC__ >= 4 +#endif // LIBYUV_BUILDING_SHARED_LIBRARY +#else // WIN32 +#if defined(__GNUC__) && __GNUC__ >= 4 && \ + (defined(LIBYUV_BUILDING_SHARED_LIBRARY) || \ + defined(LIBYUV_USING_SHARED_LIBRARY)) #define LIBYUV_API __attribute__ ((visibility ("default"))) #else #define LIBYUV_API -#endif -#endif -#endif +#endif // __GNUC__ +#endif // LIBYUV_API #endif // INCLUDE_LIBYUV_BASIC_TYPES_H_ NOLINT diff --git a/include/libyuv/version.h b/include/libyuv/version.h index b5e537e19..00cc17fb6 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 381 +#define LIBYUV_VERSION 382 #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT