cppuhelper/source/component_context.cxx | 4 +++- pyuno/source/module/pyuno.cxx | 4 +++- rsc/source/prj/gui.cxx | 2 +- sal/inc/sal/detail/log.h | 2 +- sal/osl/unx/interlck.c | 2 +- sal/osl/unx/util.c | 2 +- solenv/gbuild/platform/com_GCC_defs.mk | 1 - solenv/inc/set_wntx64.mk | 2 +- solenv/inc/settings.mk | 2 +- sw/source/core/inc/bodyfrm.hxx | 2 +- tools/source/debug/debug.cxx | 2 +- 11 files changed, 14 insertions(+), 11 deletions(-)
New commits: commit d72a0b5c618a37b70ba4d111b457deefad8f025f Author: Tor Lillqvist <t...@iki.fi> Date: Thu Dec 27 13:37:20 2012 +0200 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 diff --git a/cppuhelper/source/component_context.cxx b/cppuhelper/source/component_context.cxx index a44ec95..c168aa2 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 18d2f9d..efc1d62 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 2c7ff3c..135c655 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 849c0b7..b7e5006 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 4de4564..d05827e 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 cd8bc9a..dca2963 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 b8b7da3..8350505 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 b886aa9..585da40 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 967d417..b2e8f35 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 1879fff..52613a7 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 3d573b5..535e0ae 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> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits