diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-12-27 13:37:20 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-12-27 13:38:15 +0200 |
commit | d72a0b5c618a37b70ba4d111b457deefad8f025f (patch) | |
tree | 6b6d3c900397d34a73cde2ef0053a4c6154869c1 | |
parent | c318f3b0224a57102614be0efec4b49c80a3aa82 (diff) |
Check for __GNUC__ instead of GCC in sources
We still have checks for $(COM) being GCC or MSC in makefiles, of
course. But there is no reason to pass -D$(COM) to compilations.
Checking the built-in compiler-specific macros __GNUC__, _MSC_VER
(etc) is the right thing to do.
Change-Id: Ia961a29ba74e2c4977e5300a92318f38104c6592
-rw-r--r-- | cppuhelper/source/component_context.cxx | 4 | ||||
-rw-r--r-- | pyuno/source/module/pyuno.cxx | 4 | ||||
-rw-r--r-- | rsc/source/prj/gui.cxx | 2 | ||||
-rw-r--r-- | sal/inc/sal/detail/log.h | 2 | ||||
-rw-r--r-- | sal/osl/unx/interlck.c | 2 | ||||
-rw-r--r-- | sal/osl/unx/util.c | 2 | ||||
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 1 | ||||
-rw-r--r-- | solenv/inc/set_wntx64.mk | 2 | ||||
-rw-r--r-- | solenv/inc/settings.mk | 2 | ||||
-rw-r--r-- | sw/source/core/inc/bodyfrm.hxx | 2 | ||||
-rw-r--r-- | tools/source/debug/debug.cxx | 2 |
11 files changed, 14 insertions, 11 deletions
diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index a44ec951b885..c168aa2a32b7 100644 --- a/cppuhelper/source/component_context.cxx +++ b/cppuhelper/source/component_context.cxx @@ -240,7 +240,9 @@ static OUString val2str( void const * pVal, typelib_TypeDescriptionReference * p case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("0x") ); -#if defined(GCC) && defined(SPARC) +#if defined(__GNUC__) && defined(SPARC) +// I guess this really should check if there are strict alignment +// requirements, not just "GCC on SPARC". { sal_Int64 aVal; *(sal_Int32 *)&aVal = *(sal_Int32 *)pVal; diff --git a/pyuno/source/module/pyuno.cxx b/pyuno/source/module/pyuno.cxx index 18d2f9d56606..efc1d62ba670 100644 --- a/pyuno/source/module/pyuno.cxx +++ b/pyuno/source/module/pyuno.cxx @@ -272,7 +272,9 @@ OUString val2str( const void * pVal, typelib_TypeDescriptionReference * pTypeRef case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("0x") ); -#if defined(GCC) && defined(SPARC) +#if defined(__GNUC__) && defined(SPARC) +// I guess this really should check if there are strict alignment +// requirements, not just "GCC on SPARC". { sal_Int64 aVal; *(sal_Int32 *)&aVal = *(sal_Int32 *)pVal; diff --git a/rsc/source/prj/gui.cxx b/rsc/source/prj/gui.cxx index 2c7ff3c29426..135c655a717a 100644 --- a/rsc/source/prj/gui.cxx +++ b/rsc/source/prj/gui.cxx @@ -31,7 +31,7 @@ static RscCompiler * pRscCompiler = NULL; /* */ /* Description : Gibt die Temporaeren Dateien frei. */ /****************************************************************/ -#if defined( UNX ) || defined ( GCC ) || defined(__MINGW32__) +#if defined( UNX ) || defined ( __GNUC__ ) || defined(__MINGW32__) void ExitProgram( void ){ #else void cdecl ExitProgram( void ){ diff --git a/sal/inc/sal/detail/log.h b/sal/inc/sal/detail/log.h index 849c0b78f73c..b7e5006658f2 100644 --- a/sal/inc/sal/detail/log.h +++ b/sal/inc/sal/detail/log.h @@ -80,7 +80,7 @@ SAL_DLLPUBLIC void SAL_CALL sal_detail_logFormat( enum sal_detail_LogLevel level, char const * area, char const * where, char const * format, ...) /* TODO: enabling this will produce a huge amount of -Werror=format errors: */ -#if defined GCC && 0 +#if defined __GNUC__ && 0 __attribute__((format(printf, 4, 5))) #endif ; diff --git a/sal/osl/unx/interlck.c b/sal/osl/unx/interlck.c index 4de4564356db..d05827eaee81 100644 --- a/sal/osl/unx/interlck.c +++ b/sal/osl/unx/interlck.c @@ -27,7 +27,7 @@ #error please use asm/interlck_sparc.s #elif defined ( SOLARIS) && defined ( X86 ) #error please use asm/interlck_x86.s -#elif defined ( GCC ) && ( defined ( X86 ) || defined ( X86_64 ) ) +#elif defined ( __GNUC__ ) && ( defined ( X86 ) || defined ( X86_64 ) ) /* That's possible on x86-64 too since oslInterlockedCount is a sal_Int32 */ extern int osl_isSingleCPU; diff --git a/sal/osl/unx/util.c b/sal/osl/unx/util.c index cd8bc9af3353..dca2963d8dba 100644 --- a/sal/osl/unx/util.c +++ b/sal/osl/unx/util.c @@ -259,7 +259,7 @@ void osl_InitSparcV9(void) #endif /* SOLARIS */ -#if defined(NETBSD) && defined(GCC) && !defined(__sparcv9) && !defined(__sparc_v9__) +#if defined(NETBSD) && defined(__GNUC__) && !defined(__sparcv9) && !defined(__sparc_v9__) #include <sys/param.h> #include <sys/sysctl.h> diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index b8b7da3fbea2..83505051a4d7 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -57,7 +57,6 @@ gb_CPPU_ENV := gcc3 gb_AFLAGS := $(AFLAGS) gb_COMPILERDEFS := \ - -D$(COM) \ -DCPPU_ENV=$(gb_CPPU_ENV) \ gb_CFLAGS_COMMON := \ diff --git a/solenv/inc/set_wntx64.mk b/solenv/inc/set_wntx64.mk index b886aa95a372..585da405d13e 100644 --- a/solenv/inc/set_wntx64.mk +++ b/solenv/inc/set_wntx64.mk @@ -46,7 +46,7 @@ USE_CFLAGS_X64=-c -nologo -Gs $(NOLOGO) -Zm500 -Zc:forScope,wchar_t- -GR # Stack buffer overrun detection. CFLAGS+=-GS -USE_CDEFS_X64+= -D$(OS) -D$(GUI) -D$(COM) -DX86_64 -DWIN32 -D_AMD64_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS +USE_CDEFS_X64+= -D$(OS) -D$(GUI) -DX86_64 -DWIN32 -D_AMD64_=1 -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NON_CONFORMING_SWPRINTFS .IF "$(debug)"!="" USE_CFLAGS_X64+=-Zi -Fd$(MISC_X64)/$(@:b).pdb USE_CDEFS_X64+=-DDEBUG diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk index 967d417e642b..b2e8f35c931b 100644 --- a/solenv/inc/settings.mk +++ b/solenv/inc/settings.mk @@ -799,7 +799,7 @@ CDEFS=-D$(OS) .IF "$(GUI)" != "$(OS)" CDEFS+=-D$(GUI) .ENDIF -CDEFS+=-D$(COM) -D$(CPUNAME) +CDEFS+=-D$(CPUNAME) .IF "$(USE_DEBUG_RUNTIME)" != "" CDEFS+=-D_DEBUG_RUNTIME diff --git a/sw/source/core/inc/bodyfrm.hxx b/sw/source/core/inc/bodyfrm.hxx index 1879fffbf08e..52613a79913e 100644 --- a/sw/source/core/inc/bodyfrm.hxx +++ b/sw/source/core/inc/bodyfrm.hxx @@ -29,7 +29,7 @@ class SwBodyFrm: public SwLayoutFrm protected: virtual void Format( const SwBorderAttrs *pAttrs = 0 ); -#if defined ( GCC) && defined ( C272 ) +#if defined ( __GNUC__ ) && defined ( C272 ) ~SwBodyFrm(); #endif diff --git a/tools/source/debug/debug.cxx b/tools/source/debug/debug.cxx index 3d573b57b33c..535e0aeb9b74 100644 --- a/tools/source/debug/debug.cxx +++ b/tools/source/debug/debug.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if defined (UNX) || defined (GCC) +#if defined (UNX) || defined (__GNUC__) #include <unistd.h> #else #include <direct.h> |