summaryrefslogtreecommitdiff
path: root/sal/osl
diff options
context:
space:
mode:
Diffstat (limited to 'sal/osl')
-rw-r--r--sal/osl/all/log.cxx8
-rw-r--r--sal/osl/unx/interlck.c6
-rw-r--r--sal/osl/unx/salinit.cxx4
3 files changed, 9 insertions, 9 deletions
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)