diff options
Diffstat (limited to 'sal')
-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 | ||||
-rw-r--r-- | sal/osl/all/log.cxx | 8 | ||||
-rw-r--r-- | sal/osl/unx/interlck.c | 6 | ||||
-rw-r--r-- | sal/osl/unx/salinit.cxx | 4 | ||||
-rw-r--r-- | sal/qa/rtl/strings/test_ostring_stringliterals.cxx | 6 |
13 files changed, 30 insertions, 30 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 diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx index fcf0a1702271..baedeb87f344 100644 --- a/sal/osl/all/log.cxx +++ b/sal/osl/all/log.cxx @@ -56,7 +56,7 @@ #define OSL_DETAIL_GETPID getpid() #endif -#ifdef HAVE_SYSLOG_H +#if HAVE_SYSLOG_H #include <syslog.h> // sal/osl/unx/salinit.cxx::sal_detail_initialize updates this: bool sal_use_syslog; @@ -123,7 +123,7 @@ char const * getEnvironmentVariable() { #endif -#ifdef HAVE_SYSLOG_H +#if HAVE_SYSLOG_H int toSyslogPriority(sal_detail_LogLevel level) { switch (level) { default: @@ -214,7 +214,7 @@ void log( { std::ostringstream s; #ifndef ANDROID -#ifdef HAVE_SYSLOG_H +#if HAVE_SYSLOG_H if (!sal_use_syslog) #endif s << toString(level) << ':'; @@ -254,7 +254,7 @@ void log( area = "LibreOffice"; __android_log_print(android_log_level, area, "%s", s.str().c_str()); #else -#ifdef HAVE_SYSLOG_H +#if HAVE_SYSLOG_H if (sal_use_syslog) syslog(toSyslogPriority(level), "%s", s.str().c_str()); else diff --git a/sal/osl/unx/interlck.c b/sal/osl/unx/interlck.c index d05827eaee81..24d5b708a054 100644 --- a/sal/osl/unx/interlck.c +++ b/sal/osl/unx/interlck.c @@ -49,7 +49,7 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* : "memory"); return ++nCount; } -#if defined( HAVE_GCC_BUILTIN_ATOMIC ) +#if HAVE_GCC_BUILTIN_ATOMIC else return __sync_add_and_fetch (pCount, 1); #else @@ -79,7 +79,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* : "memory"); return --nCount; } -#if defined( HAVE_GCC_BUILTIN_ATOMIC ) +#if HAVE_GCC_BUILTIN_ATOMIC else return __sync_sub_and_fetch (pCount, 1); #else @@ -96,7 +96,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* } #endif } -#elif defined( HAVE_GCC_BUILTIN_ATOMIC ) +#elif HAVE_GCC_BUILTIN_ATOMIC oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount) { return __sync_add_and_fetch(pCount, 1); diff --git a/sal/osl/unx/salinit.cxx b/sal/osl/unx/salinit.cxx index 49fddeaeaf9f..327ca0e0d0c5 100644 --- a/sal/osl/unx/salinit.cxx +++ b/sal/osl/unx/salinit.cxx @@ -29,7 +29,7 @@ #include "sal/main.h" #include "sal/types.h" -#ifdef HAVE_SYSLOG_H +#if HAVE_SYSLOG_H #include <string.h> #include <syslog.h> // from sal/osl/all/log.cxx: @@ -64,7 +64,7 @@ void sal_detail_initialize(int argc, char ** argv) { close(fd); } #endif -#ifdef HAVE_SYSLOG_H +#if HAVE_SYSLOG_H const char *use_syslog = getenv("SAL_LOG_SYSLOG"); sal_use_syslog = use_syslog != NULL && !strcmp(use_syslog, "1"); if (sal_use_syslog) diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx index 1c12684b3e5e..0fcbb842753d 100644 --- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx +++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx @@ -77,7 +77,7 @@ CPPUNIT_TEST_SUITE_END(); void test::ostring::StringLiterals::checkCtors() { // string literal ctors do not work with SFINAE broken and are disabled -#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN +#if ! HAVE_SFINAE_ANONYMOUS_BROKEN bool result_tmp; CPPUNIT_ASSERT( CONST_CTOR_USED( "test" )); const char good1[] = "test"; @@ -159,7 +159,7 @@ void test::ostring::StringLiterals::checkUsage() rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = "foo" ); CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); -#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN +#if ! HAVE_SFINAE_ANONYMOUS_BROKEN rtl_string_unittest_const_literal_function = false; CPPUNIT_ASSERT( FoO.equalsIgnoreAsciiCase( "fOo" )); CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); @@ -264,7 +264,7 @@ void test::ostring::StringLiterals::checkNonConstUsage() void test::ostring::StringLiterals::checkBuffer() { rtl::OStringBuffer buf; -#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN +#if ! HAVE_SFINAE_ANONYMOUS_BROKEN rtl_string_unittest_const_literal_function = false; buf.append( "foo" ); CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true ); |