diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-03-19 16:44:12 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-03-20 11:34:18 +0100 |
commit | 52f8321c412cad280c9029f10f9aef03f4f20544 (patch) | |
tree | 9942cfe490f7107177ad69175be3039b0f20b32a /sal/inc | |
parent | use -isystem instead of -I for 3rd party headers (diff) | |
download | core-52f8321c412cad280c9029f10f9aef03f4f20544.tar.gz core-52f8321c412cad280c9029f10f9aef03f4f20544.zip |
use #if instead of #ifdef for testing config_xxx.hxx macros
http://lists.freedesktop.org/archives/libreoffice/2013-March/047769.html
Change-Id: I81ed4500878ff3193e028410a1f0205e28d17fc3
Diffstat (limited to 'sal/inc')
-rw-r--r-- | sal/inc/osl/interlck.h | 4 | ||||
-rw-r--r-- | sal/inc/rtl/allocator.hxx | 2 | ||||
-rw-r--r-- | sal/inc/rtl/instance.hxx | 8 | ||||
-rw-r--r-- | sal/inc/rtl/strbuf.hxx | 6 | ||||
-rw-r--r-- | sal/inc/rtl/string.hxx | 4 | ||||
-rw-r--r-- | sal/inc/rtl/stringutils.hxx | 2 | ||||
-rw-r--r-- | sal/inc/rtl/ustrbuf.hxx | 4 | ||||
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 2 | ||||
-rw-r--r-- | sal/inc/sal/types.h | 4 |
9 files changed, 18 insertions, 18 deletions
diff --git a/sal/inc/osl/interlck.h b/sal/inc/osl/interlck.h index 507b752f1129..31212deed274 100644 --- a/sal/inc/osl/interlck.h +++ b/sal/inc/osl/interlck.h @@ -56,7 +56,7 @@ SAL_DLLPUBLIC oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInte @since LibreOffice 4.0 */ -#if defined( HAVE_GCC_BUILTIN_ATOMIC ) +#if HAVE_GCC_BUILTIN_ATOMIC # define osl_atomic_increment(p) __sync_add_and_fetch((p), 1) #else # define osl_atomic_increment(p) osl_incrementInterlockedCount((p)) @@ -73,7 +73,7 @@ SAL_DLLPUBLIC oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInte @since LibreOffice 4.0 */ -#if defined( HAVE_GCC_BUILTIN_ATOMIC ) +#if HAVE_GCC_BUILTIN_ATOMIC # define osl_atomic_decrement(p) __sync_sub_and_fetch((p), 1) #else # define osl_atomic_decrement(p) osl_decrementInterlockedCount((p)) diff --git a/sal/inc/rtl/allocator.hxx b/sal/inc/rtl/allocator.hxx index 9ceb3b7ffcbe..2cbf95bc47c0 100644 --- a/sal/inc/rtl/allocator.hxx +++ b/sal/inc/rtl/allocator.hxx @@ -129,7 +129,7 @@ public: } //----------------------------------------- -#if defined HAVE_CXX11_PERFECT_FORWARDING +#if HAVE_CXX11_PERFECT_FORWARDING template< typename... Args > void construct (pointer p, Args &&... value) { diff --git a/sal/inc/rtl/instance.hxx b/sal/inc/rtl/instance.hxx index 1336c137bbf2..912a3d4597f0 100644 --- a/sal/inc/rtl/instance.hxx +++ b/sal/inc/rtl/instance.hxx @@ -381,7 +381,7 @@ namespace rtl { using the outer class (the one that derives from this base class) */ -#if defined HAVE_THREADSAFE_STATICS +#if HAVE_THREADSAFE_STATICS template<typename T, typename Unique> class Static { public: @@ -441,7 +441,7 @@ private: using the outer class (the one that derives from this base class) */ -#if defined HAVE_THREADSAFE_STATICS +#if HAVE_THREADSAFE_STATICS template<typename T, typename Data, typename Unique> class StaticWithArg { public: @@ -523,7 +523,7 @@ private: @tparam InitAggregate initializer functor class */ -#if defined HAVE_THREADSAFE_STATICS +#if HAVE_THREADSAFE_STATICS template<typename T, typename InitAggregate> class StaticAggregate { public: @@ -588,7 +588,7 @@ public: Initializer functor's return type. Default is T (common practice). */ -#if defined HAVE_THREADSAFE_STATICS +#if HAVE_THREADSAFE_STATICS template<typename T, typename InitData, typename Unique = InitData, typename Data = T> class StaticWithInit { diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx index b5d746eaa2d7..4dabc7653e7b 100644 --- a/sal/inc/rtl/strbuf.hxx +++ b/sal/inc/rtl/strbuf.hxx @@ -154,7 +154,7 @@ public: @overload @since LibreOffice 3.6 */ -#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN // see the OString ctors +#if HAVE_SFINAE_ANONYMOUS_BROKEN // see the OString ctors OStringBuffer( const char* value ) : pData(NULL) { @@ -454,7 +454,7 @@ public: @param str the characters to be appended. @return this string buffer. */ -#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN +#if HAVE_SFINAE_ANONYMOUS_BROKEN OStringBuffer & append( const sal_Char * str ) { return append( str, rtl_str_getLength( str ) ); @@ -665,7 +665,7 @@ public: @param str a character array. @return this string buffer. */ -#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN +#if HAVE_SFINAE_ANONYMOUS_BROKEN OStringBuffer & insert( sal_Int32 offset, const sal_Char * str ) { return insert( offset, str, rtl_str_getLength( str ) ); diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index 9233823f469f..cbb8cd580f76 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -165,7 +165,7 @@ public: @param value a NULL-terminated character array. */ -#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN +#if HAVE_SFINAE_ANONYMOUS_BROKEN // Old gcc can try to convert anonymous enums to OString and give compile error. // So there's no special-cased handling of string literals. // These are inline functions and technically both variants should work @@ -535,7 +535,7 @@ public: @return sal_True if the strings are equal; sal_False, otherwise. */ -#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN +#if HAVE_SFINAE_ANONYMOUS_BROKEN sal_Bool equalsIgnoreAsciiCase( const sal_Char * asciiStr ) const SAL_THROW(()) { return rtl_str_compareIgnoreAsciiCase( pData->buffer, asciiStr ) == 0; diff --git a/sal/inc/rtl/stringutils.hxx b/sal/inc/rtl/stringutils.hxx index 4a4d24b6f1b6..765319def700 100644 --- a/sal/inc/rtl/stringutils.hxx +++ b/sal/inc/rtl/stringutils.hxx @@ -38,7 +38,7 @@ // Manually defining RTL_DISABLE_FAST_STRING allows to force turning fast string concatenation off // (e.g. for debugging). #ifndef RTL_DISABLE_FAST_STRING -#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN +#if ! HAVE_SFINAE_ANONYMOUS_BROKEN // This feature is not part of public API and is meant to be used only internally by LibreOffice. #ifdef LIBO_INTERNAL_ONLY // Enable fast string concatenation. diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx index 5743800fc2ef..95993fc4a12c 100644 --- a/sal/inc/rtl/ustrbuf.hxx +++ b/sal/inc/rtl/ustrbuf.hxx @@ -146,7 +146,7 @@ public: rtl_uStringbuffer_newFromStr_WithLength( &pData, value.getStr(), value.getLength() ); } -#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN // see OUString ctors +#if HAVE_SFINAE_ANONYMOUS_BROKEN // see OUString ctors template< int N > OUStringBuffer( const char (&literal)[ N ] ) : pData(NULL) @@ -588,7 +588,7 @@ public: sal_Unicode sz[RTL_USTR_MAX_VALUEOFBOOLEAN]; return append( sz, rtl_ustr_valueOfBoolean( sz, b ) ); } -#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN +#if ! HAVE_SFINAE_ANONYMOUS_BROKEN // Pointer can be automatically converted to bool, which is unwanted here. // Explicitly delete all pointer append() overloads to prevent this // (except for char* and sal_Unicode* overloads, which are handled elsewhere). diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx index 848810c80676..ae0af9eb8be4 100644 --- a/sal/inc/rtl/ustring.hxx +++ b/sal/inc/rtl/ustring.hxx @@ -193,7 +193,7 @@ public: @since LibreOffice 3.6 */ -#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN +#if HAVE_SFINAE_ANONYMOUS_BROKEN // Old gcc can try to convert anonymous enums to OUString and give compile error. // So instead have a variant for const and non-const char[]. template< int N > diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h index fa72798dd5f1..b89b0569852f 100644 --- a/sal/inc/sal/types.h +++ b/sal/inc/sal/types.h @@ -394,7 +394,7 @@ namespace css = ::com::sun::star; @since LibreOffice 4.1 */ -#if defined HAVE_CXX11_DELETE +#if HAVE_CXX11_DELETE #define SAL_DELETED_FUNCTION = delete #else #define SAL_DELETED_FUNCTION @@ -407,7 +407,7 @@ namespace css = ::com::sun::star; @since LibreOffice 4.1 */ -#if defined HAVE_CXX11_OVERRIDE +#if HAVE_CXX11_OVERRIDE #define SAL_OVERRIDE override #else #define SAL_OVERRIDE |