From 401415773f6e6b56bf147c88a3e21123058b0861 Mon Sep 17 00:00:00 2001 From: aleks-f Date: Sun, 2 Dec 2012 22:37:02 -0600 Subject: [PATCH] Moved GCC ifdefs to Platform_POSIX Moved GCC ifdefs added for Android fron SocketDefs.h to Platform_POSIX.h --- Foundation/include/Poco/Platform.h | 14 ++------------ Foundation/include/Poco/Platform_POSIX.h | 24 ++++++++++++++++++++++++ Net/include/Poco/Net/SocketDefs.h | 10 ---------- 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/Foundation/include/Poco/Platform.h b/Foundation/include/Poco/Platform.h index ce36ad099..a9faf2e16 100644 --- a/Foundation/include/Poco/Platform.h +++ b/Foundation/include/Poco/Platform.h @@ -201,8 +201,8 @@ #define POCO_ARCH_BIG_ENDIAN 1 #endif #elif defined (nios2) || defined(__nios2) || defined(__nios2__) - #define POCO_ARCH POCO_ARCH_NIOS2 - #if defined(__nios2_little_endian) || defined(nios2_little_endian) || defined(__nios2_little_endian__) + #define POCO_ARCH POCO_ARCH_NIOS2 + #if defined(__nios2_little_endian) || defined(nios2_little_endian) || defined(__nios2_little_endian__) #define POCO_ARCH_LITTLE_ENDIAN 1 #else #define POCO_ARCH_BIG_ENDIAN 1 @@ -216,14 +216,4 @@ #endif -// -// Thread-safety of local static initialization -// -#if __cplusplus >= 201103L || __GNUC__ >= 4 || defined(__clang__) -#ifndef POCO_LOCAL_STATIC_INIT_IS_THREADSAFE -#define POCO_LOCAL_STATIC_INIT_IS_THREADSAFE 1 -#endif -#endif - - #endif // Foundation_Platform_INCLUDED diff --git a/Foundation/include/Poco/Platform_POSIX.h b/Foundation/include/Poco/Platform_POSIX.h index ff1e6c83a..4440fb562 100644 --- a/Foundation/include/Poco/Platform_POSIX.h +++ b/Foundation/include/Poco/Platform_POSIX.h @@ -54,4 +54,28 @@ #endif +// +// Thread-safety of local static initialization +// +#if __cplusplus >= 201103L || __GNUC__ >= 4 || defined(__clang__) + #ifndef POCO_LOCAL_STATIC_INIT_IS_THREADSAFE + #define POCO_LOCAL_STATIC_INIT_IS_THREADSAFE 1 + #endif +#endif + + +#ifdef __GNUC__ + #ifndef __THROW + #ifndef __GNUC_PREREQ + #define __GNUC_PREREQ(maj, min) (0) + #endif + #if defined __cplusplus && __GNUC_PREREQ (2,8) + #define __THROW throw () + #else + #define __THROW + #endif + #endif +#endif // __GNUC__ + + #endif // Foundation_Platform_POSIX_INCLUDED diff --git a/Net/include/Poco/Net/SocketDefs.h b/Net/include/Poco/Net/SocketDefs.h index efb212dba..dcb49eef7 100644 --- a/Net/include/Poco/Net/SocketDefs.h +++ b/Net/include/Poco/Net/SocketDefs.h @@ -39,16 +39,6 @@ #ifndef Net_SocketDefs_INCLUDED #define Net_SocketDefs_INCLUDED -#ifndef __THROW -# ifndef __GNUC_PREREQ -# define __GNUC_PREREQ(maj, min) (0) -# endif -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW -# endif -#endif #if defined(POCO_OS_FAMILY_WINDOWS) #include "Poco/UnWindows.h"