[Libreoffice-commits] .: 3 commits - sal/inc sal/osl sal/Package_inc.mk sal/textenc solenv/gbuild solenv/inc

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Sep 15 14:21:55 PDT 2012


 sal/Package_inc.mk                               |    1 +
 sal/inc/osl/conditn.h                            |    5 ++++-
 sal/inc/osl/detail/file.h                        |    4 ++++
 sal/inc/osl/diagnose.h                           |    5 +++--
 sal/inc/osl/diagnose.hxx                         |    1 +
 sal/inc/osl/file.h                               |    7 +++++--
 sal/inc/osl/interlck.h                           |    5 ++++-
 sal/inc/osl/module.h                             |    7 +++++--
 sal/inc/osl/mutex.h                              |    5 ++++-
 sal/inc/osl/nlsupport.h                          |    7 +++++--
 sal/inc/osl/pipe.h                               |    7 ++++---
 sal/inc/osl/process.h                            |   20 +++++++++++---------
 sal/inc/osl/profile.h                            |    7 +++++--
 sal/inc/osl/security.h                           |    5 ++++-
 sal/inc/osl/semaphor.h                           |    5 ++++-
 sal/inc/osl/signal.h                             |    3 +++
 sal/inc/osl/thread.h                             |    8 ++++----
 sal/inc/osl/time.h                               |    5 ++++-
 sal/inc/osl/util.h                               |    3 +++
 sal/inc/rtl/alloc.h                              |    5 ++++-
 sal/inc/rtl/bootstrap.h                          |    5 ++++-
 sal/inc/rtl/byteseq.h                            |    8 ++++++--
 sal/inc/rtl/cipher.h                             |    5 ++++-
 sal/inc/rtl/crc.h                                |    5 ++++-
 sal/inc/rtl/digest.h                             |    5 ++++-
 sal/inc/rtl/locale.h                             |    5 ++++-
 sal/inc/rtl/logfile.h                            |    5 ++++-
 sal/inc/rtl/math.h                               |    3 +++
 sal/inc/rtl/memory.h                             |    5 ++++-
 sal/inc/rtl/process.h                            |    7 +++++--
 sal/inc/rtl/random.h                             |    5 ++++-
 sal/inc/rtl/strbuf.h                             |    5 ++++-
 sal/inc/rtl/string.h                             |    9 ++++++---
 sal/inc/rtl/tencinfo.h                           |    9 +++++----
 sal/inc/rtl/textcvt.h                            |    9 +++++----
 sal/inc/rtl/unload.h                             |   11 +++++++----
 sal/inc/rtl/uri.h                                |    3 +++
 sal/inc/rtl/ustrbuf.h                            |    5 ++++-
 sal/inc/rtl/ustring.h                            |   11 +++++++----
 sal/inc/rtl/uuid.h                               |    6 ++++--
 sal/inc/sal/detail/log.h                         |    1 +
 sal/inc/sal/log.hxx                              |    1 +
 sal/inc/sal/macros.h                             |   17 -----------------
 sal/inc/sal/main.h                               |   10 +++++++---
 sal/inc/sal/saldllapi.h                          |   17 +++++++++++++++++
 sal/inc/sal/types.h                              |    6 ------
 sal/osl/all/log.cxx                              |    4 ++--
 sal/osl/unx/salinit.cxx                          |    4 ++--
 sal/osl/w32/salinit.cxx                          |    4 ++--
 sal/textenc/converter.hxx                        |    3 +++
 sal/textenc/convertsimple.hxx                    |    3 +++
 sal/textenc/handleundefinedunicodetotextchar.hxx |    3 +++
 solenv/gbuild/gbuild.mk                          |   11 +++++------
 solenv/inc/settings.mk                           |    7 +++++--
 54 files changed, 224 insertions(+), 108 deletions(-)

New commits:
commit 659c6a363bf84bd2520042ba80bc507763b57b78
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Sep 15 22:55:21 2012 +0200

    Let --enable-assert-always-abort affect setting NDEBUG directly
    
    For one, assert.h is designed to be includeable multiple times with changing
    NDEBUG settings, so it is not robust to include it early in sal/macros.h with
    "correct" NDEBUG settings and potentially include it again later.  For another,
    there is #ifndef NDEBUG code providing functionality used exclusively within
    assert calls, which must be compiled with the same NDEBUG-setting as the
    relevant #include <assert.h>.
    
    Change-Id: I7b2f9c85f8e2155051274757c64162ed5a5e9d1b

diff --git a/sal/inc/sal/macros.h b/sal/inc/sal/macros.h
index bb0e46e..ee44aa3 100644
--- a/sal/inc/sal/macros.h
+++ b/sal/inc/sal/macros.h
@@ -31,23 +31,6 @@
 
 #include <stddef.h>
 
-/* we want to be able to compile release code while retaining the abort capabilities of assert().
- * This presume that this include is called early... i.e before anyone else included assert.h
- * which should more often than not be the case since macros.h is included by sal/types.h
- * which is included at the top of most source (or should be)
- */
-#ifdef ASSERT_ALWAYS_ABORT
-#    ifdef NDEBUG
-#        undef NDEBUG
-#        include <assert.h>
-#        define NDEBUG
-#    else /* Ndef NDEBUG */
-#        include <assert.h>
-#    endif /* Ndef NDEBUG */
-#else /* NDef ASSERT_ALWAYS_ABORT */
-#        include <assert.h>
-#endif /* NDef ASSERT_ALWAYS_ABORT */
-
 #ifndef SAL_N_ELEMENTS
 #    if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L )
         /*
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index a073e39..20ac7a0 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -214,8 +214,13 @@ endif
 ifeq ($(gb_DEBUGLEVEL),0)
 gb_GLOBALDEFS += \
 	-DOPTIMIZE \
+
+ifeq ($(strip $(ASSERT_ALWAYS_ABORT)),FALSE)
+gb_GLOBALDEFS += \
 	-DNDEBUG \
 
+endif
+
 else
 gb_GLOBALDEFS += \
     -DSAL_LOG_INFO \
@@ -228,12 +233,6 @@ gb_GLOBALDEFS += \
 endif
 endif
 
-ifeq ($(strip $(ASSERT_ALWAYS_ABORT)),TRUE)
-gb_GLOBALDEFS += \
-	-DASSERT_ALWAYS_ABORT \
-
-endif
-
 ifneq ($(strip $(ENABLE_GTK)),)
 gb_GLOBALDEFS += -DENABLE_GTK
 endif
diff --git a/solenv/inc/settings.mk b/solenv/inc/settings.mk
index e24c0e6..15bd3f0 100644
--- a/solenv/inc/settings.mk
+++ b/solenv/inc/settings.mk
@@ -1074,10 +1074,13 @@ RSCDEFS+=-DDBG_UTIL
 .ENDIF
 
 .IF "$(product)"!=""
-CDEFS+= -DPRODUCT -DNDEBUG
-RSCDEFS+= -DPRODUCT 
+CDEFS+= -DPRODUCT
+RSCDEFS+= -DPRODUCT
+.IF "$(ASSERT_ALWAYS_ABORT)"=="FALSE"
+CDEFS+=-DNDEBUG
 RSCDEFS+= -DNDEBUG
 .ENDIF
+.ENDIF
 
 .IF "$(DBG_LEVEL)"!=""
 CDEFS+=-DOSL_DEBUG_LEVEL=$(DBG_LEVEL)
commit 7a042c8204628c573fc52d5fb4e4a5ba650b1604
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Sep 15 12:21:17 2012 +0200

    Include saldllapi.h explicitly where needed
    
    Change-Id: I7ba421479cd332e059ed9da1c6090e2df420347e

diff --git a/sal/inc/osl/conditn.h b/sal/inc/osl/conditn.h
index 94088a8..982d8cc 100644
--- a/sal/inc/osl/conditn.h
+++ b/sal/inc/osl/conditn.h
@@ -30,7 +30,10 @@
 #ifndef _OSL_CONDITION_H_
 #define _OSL_CONDITION_H_
 
-#include <osl/time.h>
+#include "sal/config.h"
+
+#include "osl/time.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/detail/file.h b/sal/inc/osl/detail/file.h
index f9798da..7968e29 100644
--- a/sal/inc/osl/detail/file.h
+++ b/sal/inc/osl/detail/file.h
@@ -30,7 +30,11 @@
 #ifndef INCLUDED_OSL_DETAIL_FILE_H
 #define INCLUDED_OSL_DETAIL_FILE_H
 
+#include "sal/config.h"
+
 #include <sys/stat.h>
+
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 /** @cond INTERNAL */
diff --git a/sal/inc/osl/diagnose.h b/sal/inc/osl/diagnose.h
index f094abe..191bba0 100644
--- a/sal/inc/osl/diagnose.h
+++ b/sal/inc/osl/diagnose.h
@@ -32,8 +32,9 @@
 
 #include "sal/config.h"
 
-#include <sal/detail/log.h>
-#include <sal/types.h>
+#include "sal/detail/log.h"
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 /** provides simple diagnostic support
 
diff --git a/sal/inc/osl/diagnose.hxx b/sal/inc/osl/diagnose.hxx
index 6463d8d..55e5bf0 100644
--- a/sal/inc/osl/diagnose.hxx
+++ b/sal/inc/osl/diagnose.hxx
@@ -40,6 +40,7 @@
 #include "rtl/allocator.hxx"
 #include "rtl/instance.hxx"
 #include "sal/log.hxx"
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 /// @cond INTERNAL
diff --git a/sal/inc/osl/file.h b/sal/inc/osl/file.h
index 2c2713b..5e47f62 100644
--- a/sal/inc/osl/file.h
+++ b/sal/inc/osl/file.h
@@ -29,8 +29,11 @@
 #ifndef _OSL_FILE_H_
 #define _OSL_FILE_H_
 
-#include <osl/time.h>
-#   include <rtl/ustring.h>
+#include "sal/config.h"
+
+#include "osl/time.h"
+#include "rtl/ustring.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/interlck.h b/sal/inc/osl/interlck.h
index b56e8bd..858f99f 100644
--- a/sal/inc/osl/interlck.h
+++ b/sal/inc/osl/interlck.h
@@ -29,7 +29,10 @@
 #ifndef _OSL_INTERLOCK_H_
 #define _OSL_INTERLOCK_H_
 
-#include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/module.h b/sal/inc/osl/module.h
index a1a4a67..f589099 100644
--- a/sal/inc/osl/module.h
+++ b/sal/inc/osl/module.h
@@ -29,8 +29,11 @@
 #ifndef _OSL_MODULE_H_
 #define _OSL_MODULE_H_
 
-#   include <rtl/ustring.h>
-#   include <rtl/tencinfo.h>
+#include "sal/config.h"
+
+#include "rtl/tencinfo.h"
+#include "rtl/ustring.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/mutex.h b/sal/inc/osl/mutex.h
index 6efa821..bc9bd7c 100644
--- a/sal/inc/osl/mutex.h
+++ b/sal/inc/osl/mutex.h
@@ -29,7 +29,10 @@
 #ifndef _OSL_MUTEX_H_
 #define _OSL_MUTEX_H_
 
-#include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/nlsupport.h b/sal/inc/osl/nlsupport.h
index 3b66c8e..94e3089 100644
--- a/sal/inc/osl/nlsupport.h
+++ b/sal/inc/osl/nlsupport.h
@@ -30,8 +30,11 @@
 #ifndef _OSL_NLSUPPORT_H_
 #define _OSL_NLSUPPORT_H_
 
-#   include <rtl/locale.h>
-#   include <rtl/textenc.h>
+#include "sal/config.h"
+
+#include "rtl/locale.h"
+#include "rtl/textenc.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/pipe.h b/sal/inc/osl/pipe.h
index 1245d85..5991218 100644
--- a/sal/inc/osl/pipe.h
+++ b/sal/inc/osl/pipe.h
@@ -30,10 +30,11 @@
 #ifndef _OSL_PIPE_H_
 #define _OSL_PIPE_H_
 
-#   include <rtl/ustring.h>
+#include "sal/config.h"
 
-
-#   include <osl/security.h>
+#include "osl/security.h"
+#include "rtl/ustring.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/process.h b/sal/inc/osl/process.h
index bd8c2c4..cdd9fc4 100644
--- a/sal/inc/osl/process.h
+++ b/sal/inc/osl/process.h
@@ -30,15 +30,17 @@
 #ifndef _OSL_PROCESS_H_
 #define _OSL_PROCESS_H_
 
-#include <rtl/ustring.h>
-#include <rtl/textenc.h>
-#include <rtl/locale.h>
-
-#include <osl/time.h>
-#include <osl/file.h>
-#include <osl/pipe.h>
-#include <osl/socket.h>
-#include <osl/security.h>
+#include "sal/config.h"
+
+#include "osl/file.h"
+#include "osl/pipe.h"
+#include "osl/security.h"
+#include "osl/socket.h"
+#include "osl/time.h"
+#include "rtl/locale.h"
+#include "rtl/textenc.h"
+#include "rtl/ustring.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/profile.h b/sal/inc/osl/profile.h
index bc4b8ff..23e18a1 100644
--- a/sal/inc/osl/profile.h
+++ b/sal/inc/osl/profile.h
@@ -29,8 +29,11 @@
 #ifndef _OSL_PROFILE_H_
 #define _OSL_PROFILE_H_
 
-#include <sal/types.h>
-#include <rtl/ustring.h>
+#include "sal/config.h"
+
+#include "rtl/ustring.h"
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/security.h b/sal/inc/osl/security.h
index 85e8abd..7140b76 100644
--- a/sal/inc/osl/security.h
+++ b/sal/inc/osl/security.h
@@ -29,7 +29,10 @@
 #ifndef _OSL_SECURITY_H_
 #define _OSL_SECURITY_H_
 
-#include <rtl/ustring.h>
+#include "sal/config.h"
+
+#include "rtl/ustring.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/semaphor.h b/sal/inc/osl/semaphor.h
index fb0cc71..3ba350a 100644
--- a/sal/inc/osl/semaphor.h
+++ b/sal/inc/osl/semaphor.h
@@ -29,7 +29,10 @@
 #ifndef _OSL_SEMAPHORE_H_
 #define _OSL_SEMAPHORE_H_
 
-#include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/signal.h b/sal/inc/osl/signal.h
index 782eb5f..9d609b6 100644
--- a/sal/inc/osl/signal.h
+++ b/sal/inc/osl/signal.h
@@ -29,6 +29,9 @@
 #ifndef _OSL_SIGNAL_H_
 #define _OSL_SIGNAL_H_
 
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 #ifdef __cplusplus
diff --git a/sal/inc/osl/thread.h b/sal/inc/osl/thread.h
index cf44a28..db0e187 100644
--- a/sal/inc/osl/thread.h
+++ b/sal/inc/osl/thread.h
@@ -29,11 +29,11 @@
 #ifndef _OSL_THREAD_H_
 #define _OSL_THREAD_H_
 
-#include <osl/time.h>
+#include "sal/config.h"
 
-#ifndef _RTL_TEXTENC_H_
-#   include <rtl/textenc.h>
-#endif
+#include "osl/time.h"
+#include "rtl/textenc.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/time.h b/sal/inc/osl/time.h
index ddeb7a1..2456065 100644
--- a/sal/inc/osl/time.h
+++ b/sal/inc/osl/time.h
@@ -29,7 +29,10 @@
 #ifndef _OSL_TIME_H_
 #define _OSL_TIME_H_
 
-#include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/osl/util.h b/sal/inc/osl/util.h
index 330279d..1e6aa59 100644
--- a/sal/inc/osl/util.h
+++ b/sal/inc/osl/util.h
@@ -30,6 +30,9 @@
 #ifndef _OSL_UTIL_H_
 #define _OSL_UTIL_H_
 
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 #ifdef __cplusplus
diff --git a/sal/inc/rtl/alloc.h b/sal/inc/rtl/alloc.h
index 35c7e5b..9c2d7ef 100644
--- a/sal/inc/rtl/alloc.h
+++ b/sal/inc/rtl/alloc.h
@@ -29,7 +29,10 @@
 #ifndef _RTL_ALLOC_H_
 #define _RTL_ALLOC_H_
 
-#   include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/bootstrap.h b/sal/inc/rtl/bootstrap.h
index 9070569..6e3fc4a 100644
--- a/sal/inc/rtl/bootstrap.h
+++ b/sal/inc/rtl/bootstrap.h
@@ -28,7 +28,10 @@
 #ifndef _RTL_BOOTSTRAP_H_
 #define _RTL_BOOTSTRAP_H_
 
-#include <rtl/ustring.h>
+#include "sal/config.h"
+
+#include "rtl/ustring.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/byteseq.h b/sal/inc/rtl/byteseq.h
index 8d52c7e..e863dff 100644
--- a/sal/inc/rtl/byteseq.h
+++ b/sal/inc/rtl/byteseq.h
@@ -28,8 +28,12 @@
 #ifndef _RTL_BYTESEQ_H_
 #define _RTL_BYTESEQ_H_
 
-#include <sal/types.h>
-#include <rtl/alloc.h>
+#include "sal/config.h"
+
+#include "rtl/alloc.h"
+#include "rtl/ustring.h"
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C"
diff --git a/sal/inc/rtl/cipher.h b/sal/inc/rtl/cipher.h
index 8a67d56..c7d2dec 100644
--- a/sal/inc/rtl/cipher.h
+++ b/sal/inc/rtl/cipher.h
@@ -29,7 +29,10 @@
 #ifndef _RTL_CIPHER_H_
 #define _RTL_CIPHER_H_
 
-#include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/crc.h b/sal/inc/rtl/crc.h
index be3b03b..2c975e6 100644
--- a/sal/inc/rtl/crc.h
+++ b/sal/inc/rtl/crc.h
@@ -29,7 +29,10 @@
 #ifndef _RTL_CRC_H_
 #define _RTL_CRC_H_
 
-#include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/digest.h b/sal/inc/rtl/digest.h
index c8640df..990a4a8 100644
--- a/sal/inc/rtl/digest.h
+++ b/sal/inc/rtl/digest.h
@@ -29,7 +29,10 @@
 #ifndef _RTL_DIGEST_H_
 #define _RTL_DIGEST_H_
 
-#include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/locale.h b/sal/inc/rtl/locale.h
index 3e67faf..e3b6bb4 100644
--- a/sal/inc/rtl/locale.h
+++ b/sal/inc/rtl/locale.h
@@ -29,7 +29,10 @@
 #ifndef _RTL_LOCALE_H_
 #define _RTL_LOCALE_H_
 
-#include <rtl/ustring.h>
+#include "sal/config.h"
+
+#include "rtl/ustring.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/logfile.h b/sal/inc/rtl/logfile.h
index 54027ac..4ffc0a1 100644
--- a/sal/inc/rtl/logfile.h
+++ b/sal/inc/rtl/logfile.h
@@ -28,7 +28,10 @@
 #ifndef _RTL_LOGFILE_H_
 #define _RTL_LOGFILE_H_
 
-#include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/math.h b/sal/inc/rtl/math.h
index 35a0442..d181772 100644
--- a/sal/inc/rtl/math.h
+++ b/sal/inc/rtl/math.h
@@ -29,7 +29,10 @@
 #ifndef INCLUDED_RTL_MATH_H
 #define INCLUDED_RTL_MATH_H
 
+#include "sal/config.h"
+
 #include "rtl/ustring.h"
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 #if defined __cplusplus
diff --git a/sal/inc/rtl/memory.h b/sal/inc/rtl/memory.h
index 516040f..0104b78 100644
--- a/sal/inc/rtl/memory.h
+++ b/sal/inc/rtl/memory.h
@@ -30,7 +30,10 @@
 #ifndef _RTL_MEMORY_H_
 #define _RTL_MEMORY_H_
 
-#   include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/process.h b/sal/inc/rtl/process.h
index ae18e66..c1e0559 100644
--- a/sal/inc/rtl/process.h
+++ b/sal/inc/rtl/process.h
@@ -28,8 +28,11 @@
 #ifndef _RTL_PROCESS_H_
 #define _RTL_PROCESS_H_
 
-#include <sal/types.h>
-#include <osl/process.h>
+#include "sal/config.h"
+
+#include "osl/process.h"
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/random.h b/sal/inc/rtl/random.h
index 1a54a4a..4e371b6 100644
--- a/sal/inc/rtl/random.h
+++ b/sal/inc/rtl/random.h
@@ -29,7 +29,10 @@
 #ifndef _RTL_RANDOM_H_
 #define _RTL_RANDOM_H_
 
-#include <sal/types.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/strbuf.h b/sal/inc/rtl/strbuf.h
index 64300ec..1323b76 100644
--- a/sal/inc/rtl/strbuf.h
+++ b/sal/inc/rtl/strbuf.h
@@ -29,7 +29,10 @@
 #ifndef _RTL_STRBUF_H_
 #define _RTL_STRBUF_H_
 
-#include <rtl/string.h>
+#include "sal/config.h"
+
+#include "rtl/string.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/string.h b/sal/inc/rtl/string.h
index f326abe..c38e106 100644
--- a/sal/inc/rtl/string.h
+++ b/sal/inc/rtl/string.h
@@ -29,9 +29,12 @@
 #ifndef _RTL_STRING_H_
 #define _RTL_STRING_H_
 
-#include <sal/types.h>
-#include <osl/interlck.h>
-#include <rtl/textcvt.h>
+#include "sal/config.h"
+
+#include "osl/interlck.h"
+#include "rtl/textcvt.h"
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/tencinfo.h b/sal/inc/rtl/tencinfo.h
index 086b5ab..50e55b3 100644
--- a/sal/inc/rtl/tencinfo.h
+++ b/sal/inc/rtl/tencinfo.h
@@ -29,10 +29,11 @@
 #ifndef _RTL_TENCINFO_H
 #define _RTL_TENCINFO_H
 
-#ifndef _SAL_TYPES_H
-#include <sal/types.h>
-#endif
-#include <rtl/textenc.h>
+#include "sal/config.h"
+
+#include "rtl/textenc.h"
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/textcvt.h b/sal/inc/rtl/textcvt.h
index 9ca08db..dc8e5c7 100644
--- a/sal/inc/rtl/textcvt.h
+++ b/sal/inc/rtl/textcvt.h
@@ -29,10 +29,11 @@
 #ifndef _RTL_TEXTCVT_H
 #define _RTL_TEXTCVT_H
 
-#ifndef _SAL_TYPES_H
-#include <sal/types.h>
-#endif
-#include <rtl/textenc.h>
+#include "sal/config.h"
+
+#include "rtl/textenc.h"
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/unload.h b/sal/inc/rtl/unload.h
index 6a196b8..cdd5536 100644
--- a/sal/inc/rtl/unload.h
+++ b/sal/inc/rtl/unload.h
@@ -28,10 +28,13 @@
 #ifndef _RTL_UNLOAD_H_
 #define _RTL_UNLOAD_H_
 
-#include <sal/types.h>
-#include <osl/time.h>
-#include <osl/interlck.h>
-#include <osl/module.h>
+#include "sal/config.h"
+
+#include "osl/interlck.h"
+#include "osl/module.h"
+#include "osl/time.h"
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 /** @file
 The API enables an effective way of unloading libraries in a centralized way.
diff --git a/sal/inc/rtl/uri.h b/sal/inc/rtl/uri.h
index 3651db0..3464d24 100644
--- a/sal/inc/rtl/uri.h
+++ b/sal/inc/rtl/uri.h
@@ -29,8 +29,11 @@
 #ifndef _RTL_URI_H_
 #define _RTL_URI_H_
 
+#include "sal/config.h"
+
 #include "rtl/textenc.h"
 #include "rtl/ustring.h"
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 #if defined __cplusplus
diff --git a/sal/inc/rtl/ustrbuf.h b/sal/inc/rtl/ustrbuf.h
index 1051d0d..9520566 100644
--- a/sal/inc/rtl/ustrbuf.h
+++ b/sal/inc/rtl/ustrbuf.h
@@ -29,7 +29,10 @@
 #ifndef _RTL_USTRBUF_H_
 #define _RTL_USTRBUF_H_
 
-#include <rtl/ustring.h>
+#include "sal/config.h"
+
+#include "rtl/ustring.h"
+#include "sal/saldllapi.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/ustring.h b/sal/inc/rtl/ustring.h
index 0e95c51..5b4982e 100644
--- a/sal/inc/rtl/ustring.h
+++ b/sal/inc/rtl/ustring.h
@@ -29,10 +29,13 @@
 #ifndef _RTL_USTRING_H_
 #define _RTL_USTRING_H_
 
-#include <sal/types.h>
-#include <osl/interlck.h>
-#include <rtl/string.h>
-#include <rtl/textenc.h>
+#include "sal/config.h"
+
+#include "osl/interlck.h"
+#include "rtl/string.h"
+#include "rtl/textenc.h"
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/sal/inc/rtl/uuid.h b/sal/inc/rtl/uuid.h
index 9d831e0..477a6b3 100644
--- a/sal/inc/rtl/uuid.h
+++ b/sal/inc/rtl/uuid.h
@@ -28,9 +28,11 @@
 #ifndef _RTL_UUID_H_
 #define _RTL_UUID_H_
 
+#include "sal/config.h"
 
-#include <sal/types.h>
-#include <rtl/string.h>
+#include "rtl/string.h"
+#include "sal/saldllapi.h"
+#include "sal/types.h"
 
 /**
    @file
diff --git a/sal/inc/sal/detail/log.h b/sal/inc/sal/detail/log.h
index 3787ada..849c0b7 100644
--- a/sal/inc/sal/detail/log.h
+++ b/sal/inc/sal/detail/log.h
@@ -32,6 +32,7 @@
 
 #include "sal/config.h"
 
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 /** @cond INTERNAL */
diff --git a/sal/inc/sal/log.hxx b/sal/inc/sal/log.hxx
index 033edb9..2da1479 100644
--- a/sal/inc/sal/log.hxx
+++ b/sal/inc/sal/log.hxx
@@ -37,6 +37,7 @@
 #include <string>
 
 #include "sal/detail/log.h"
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 // Avoid the use of other sal code in this header as much as possible, so that
diff --git a/sal/inc/sal/main.h b/sal/inc/sal/main.h
index 3de872e..4d661a5 100644
--- a/sal/inc/sal/main.h
+++ b/sal/inc/sal/main.h
@@ -29,9 +29,13 @@
 #ifndef _SAL_MAIN_H_
 #define _SAL_MAIN_H_
 
-#include <sal/types.h>
-#if defined(AIX)
-#   include <unistd.h>
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
+#include "sal/types.h"
+
+#if defined AIX
+#include <unistd.h>
 #endif
 
 #ifdef __cplusplus
diff --git a/sal/inc/sal/saldllapi.h b/sal/inc/sal/saldllapi.h
index a3de15f..09e3582 100644
--- a/sal/inc/sal/saldllapi.h
+++ b/sal/inc/sal/saldllapi.h
@@ -2,6 +2,8 @@
 #ifndef INCLUDED_SALDLLAPI_H
 #define INCLUDED_SALDLLAPI_H
 
+#include "sal/config.h"
+
 #include "sal/types.h"
 
 #if defined(SAL_DLLIMPLEMENTATION)
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index 3db8cf4..f97ecc7 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -300,8 +300,6 @@ typedef void *                   sal_Handle;
 #define SAL_EXCEPTION_DLLPRIVATE
 #endif
 
-#include <sal/saldllapi.h>
-
 /** Use this as markup for functions and methods whose return value must be
     checked.
 
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 934d88a..8d4d5f2 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -179,7 +179,7 @@ void log(
 
 }
 
-SAL_DLLPUBLIC void sal_detail_log(
+void sal_detail_log(
     sal_detail_LogLevel level, char const * area, char const * where,
     char const * message)
 {
@@ -188,7 +188,7 @@ SAL_DLLPUBLIC void sal_detail_log(
     }
 }
 
-SAL_DLLPUBLIC void sal_detail_logFormat(
+void sal_detail_logFormat(
     sal_detail_LogLevel level, char const * area, char const * where,
     char const * format, ...)
 {
diff --git a/sal/osl/unx/salinit.cxx b/sal/osl/unx/salinit.cxx
index 2396388..0ce8d86 100644
--- a/sal/osl/unx/salinit.cxx
+++ b/sal/osl/unx/salinit.cxx
@@ -39,7 +39,7 @@
 
 extern "C" {
 
-SAL_DLLPUBLIC void SAL_CALL sal_detail_initialize(int argc, char ** argv) {
+void sal_detail_initialize(int argc, char ** argv) {
 #if defined MACOSX
     // On Mac OS X, soffice can restart itself via exec (see restartOnMac in
     // desktop/source/app/app.cxx), which leaves all file descriptors open,
@@ -69,7 +69,7 @@ SAL_DLLPUBLIC void SAL_CALL sal_detail_initialize(int argc, char ** argv) {
     osl_setCommandArgs(argc, argv);
 }
 
-SAL_DLLPUBLIC void SAL_CALL sal_detail_deinitialize() {}
+void sal_detail_deinitialize() {}
 
 }
 
diff --git a/sal/osl/w32/salinit.cxx b/sal/osl/w32/salinit.cxx
index aaa5a5b..7a498c3 100644
--- a/sal/osl/w32/salinit.cxx
+++ b/sal/osl/w32/salinit.cxx
@@ -58,7 +58,7 @@ extern "C" void invalidParameterHandler(
 
 // Prototypes for initialization and deinitialization of SAL library
 
-SAL_DLLPUBLIC void SAL_CALL sal_detail_initialize(int argc, char ** argv)
+void sal_detail_initialize(int argc, char ** argv)
 {
     // SetProcessDEPPolicy(PROCESS_DEP_ENABLE);
     // SetDllDirectoryW(L"");
@@ -118,7 +118,7 @@ SAL_DLLPUBLIC void SAL_CALL sal_detail_initialize(int argc, char ** argv)
     osl_setCommandArgs(argc, argv);
 }
 
-SAL_DLLPUBLIC void SAL_CALL sal_detail_deinitialize()
+void sal_detail_deinitialize()
 {
     if ( SOCKET_ERROR == WSACleanup() )
     {
commit e9689e4fdcf876e7bcaf564e060a3512e0fe9ef3
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Sat Sep 15 11:42:07 2012 +0200

    Revert "saldllapi.h is really not included outside of sal itself"
    
    This reverts commit 2dfe34ce0efef6ec0412130a32f755657710363d:
    
    * sal/saldllapi.h is about something different than sal/types.h (it is rather a
      mistake of cf77e8a0b9dc26d5007c76388c3f09231f048bdd "sal: add visibility
      symbols" to shortcut the #include of sal/saldllapi.h into sal/types.h instead
      of the headers that actually need it), not every header needs to include
      sal/types.h
    
    * sal/config.h is the header to always include first (not sal/types.h)
    
    Change-Id: I217f2540197ddb682c6c00e529b812b04b327d73

diff --git a/sal/Package_inc.mk b/sal/Package_inc.mk
index 3d4da31..c253de7 100644
--- a/sal/Package_inc.mk
+++ b/sal/Package_inc.mk
@@ -113,6 +113,7 @@ $(eval $(call gb_Package_add_file,sal_inc,inc/sal/log.hxx,sal/log.hxx))
 $(eval $(call gb_Package_add_file,sal_inc,inc/sal/macros.h,sal/macros.h))
 $(eval $(call gb_Package_add_file,sal_inc,inc/sal/main.h,sal/main.h))
 $(eval $(call gb_Package_add_file,sal_inc,inc/sal/mathconf.h,sal/mathconf.h))
+$(eval $(call gb_Package_add_file,sal_inc,inc/sal/saldllapi.h,sal/saldllapi.h))
 $(eval $(call gb_Package_add_file,sal_inc,inc/sal/types.h,sal/types.h))
 $(eval $(call gb_Package_add_file,sal_inc,inc/sal/detail/log.h,sal/detail/log.h))
 $(eval $(call gb_Package_add_file,sal_inc,inc/systools/win32/comptr.hxx,systools/win32/comptr.hxx))
diff --git a/sal/inc/sal/saldllapi.h b/sal/inc/sal/saldllapi.h
new file mode 100644
index 0000000..a3de15f
--- /dev/null
+++ b/sal/inc/sal/saldllapi.h
@@ -0,0 +1,15 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+#ifndef INCLUDED_SALDLLAPI_H
+#define INCLUDED_SALDLLAPI_H
+
+#include "sal/types.h"
+
+#if defined(SAL_DLLIMPLEMENTATION)
+#define SAL_DLLPUBLIC  SAL_DLLPUBLIC_EXPORT
+#else
+#define SAL_DLLPUBLIC  SAL_DLLPUBLIC_IMPORT
+#endif
+
+#endif /* INCLUDED_SALDLLAPI_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index 56299d1..3db8cf4 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -300,11 +300,7 @@ typedef void *                   sal_Handle;
 #define SAL_EXCEPTION_DLLPRIVATE
 #endif
 
-#if defined(SAL_DLLIMPLEMENTATION)
-#define SAL_DLLPUBLIC  SAL_DLLPUBLIC_EXPORT
-#else
-#define SAL_DLLPUBLIC  SAL_DLLPUBLIC_IMPORT
-#endif
+#include <sal/saldllapi.h>
 
 /** Use this as markup for functions and methods whose return value must be
     checked.
diff --git a/sal/textenc/converter.hxx b/sal/textenc/converter.hxx
index 7e09088..fc69ee2 100644
--- a/sal/textenc/converter.hxx
+++ b/sal/textenc/converter.hxx
@@ -29,6 +29,9 @@
 #ifndef INCLUDED_SAL_TEXTENC_CONVERTER_HXX
 #define INCLUDED_SAL_TEXTENC_CONVERTER_HXX
 
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 // Internal, non-stable ABI
diff --git a/sal/textenc/convertsimple.hxx b/sal/textenc/convertsimple.hxx
index 505a576..3f207ea 100644
--- a/sal/textenc/convertsimple.hxx
+++ b/sal/textenc/convertsimple.hxx
@@ -30,6 +30,9 @@
 #ifndef INCLUDED_SAL_TEXTENC_CONVERTSIMPLE_HXX
 #define INCLUDED_SAL_TEXTENC_CONVERTSIMPLE_HXX
 
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 // Internal, non-stable ABI
diff --git a/sal/textenc/handleundefinedunicodetotextchar.hxx b/sal/textenc/handleundefinedunicodetotextchar.hxx
index 4863150..a3a3c32 100644
--- a/sal/textenc/handleundefinedunicodetotextchar.hxx
+++ b/sal/textenc/handleundefinedunicodetotextchar.hxx
@@ -30,6 +30,9 @@
 #ifndef INCLUDED_SAL_TEXTENC_HANDLEUNDEFINEDUNICODETOTEXTCHAR_HXX
 #define INCLUDED_SAL_TEXTENC_HANDLEUNDEFINEDUNICODETOTEXTCHAR_HXX
 
+#include "sal/config.h"
+
+#include "sal/saldllapi.h"
 #include "sal/types.h"
 
 // Internal, non-stable ABI


More information about the Libreoffice-commits mailing list