Skip to content

Commit aef8a7d

Browse files
committed
Merge.
2 parents 03cd5f4 + 944d96a commit aef8a7d

File tree

6 files changed

+52
-3
lines changed

6 files changed

+52
-3
lines changed

Makefile.in

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,9 +792,18 @@ liblog4cplus_la_CPPFLAGS = $(AM_CPPFLAGS) -DINSIDE_LOG4CPLUS
792792

793793
#liblog4cplus_la_LDFLAGS=@LOG4CPLUS_PROFILING_LDFLAGS@
794794
liblog4cplus_la_SOURCES = $(LIB_SRC)
795+
@USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX_FALSE@LOG4CPLUS_EXPORT_SYMBOLS_REGEX =
796+
797+
# Export symbols in log4cplus namespace but try to avoid symbols in
798+
# the log4cplus::internal namespace.
799+
@USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX_TRUE@LOG4CPLUS_EXPORT_SYMBOLS_REGEX = -export-symbols-regex '9log4cplus[^8][^i][^n]|log4cplus_'
795800

796801
#liblog4cplus_a_LIBADD = @LIBOBJS@ @ALLOCA@
797-
liblog4cplus_la_LDFLAGS = -no-undefined $(LOG4CPLUS_VERSION_LT_FLAGS) @LOG4CPLUS_PROFILING_LDFLAGS@
802+
liblog4cplus_la_LDFLAGS = -no-undefined \
803+
$(LOG4CPLUS_VERSION_LT_FLAGS) \
804+
@LOG4CPLUS_PROFILING_LDFLAGS@ \
805+
$(LOG4CPLUS_EXPORT_SYMBOLS_REGEX)
806+
798807
appender_test_SOURCES = tests/appender_test/main.cxx
799808
appender_test_LDADD = $(liblog4cplus_la_file)
800809
@MULTI_THREADED_TRUE@configandwatch_test_SOURCES = tests/configandwatch_test/main.cxx

TODO

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Possible enhancements and directions of development, in no particular
22
order:
33

4+
- Rewrite FileAppender to use OS specific file handling to allow
5+
RollingFileAppender to roll log files shared between multiple
6+
processes even on Windows.
7+
48
- Improve error handling
59
- allow not to throw exceptions
610
- create hooks to allow users to override behaviour

configure

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,8 @@ PTHREAD_CXXFLAGS
693693
PTHREAD_LIBS
694694
ax_pthread_config
695695
EGREP
696+
USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX_FALSE
697+
USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX_TRUE
696698
GREP
697699
SED
698700
CXXCPP
@@ -7985,11 +7987,22 @@ esac
79857987
*) :
79867988
;;
79877989
esac
7990+
use_export_symbols_regex=no
7991+
else
7992+
use_export_symbols_regex=yes
7993+
fi
7994+
if test "x$use_export_symbols_regex" = "xyes"; then
7995+
USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX_TRUE=
7996+
USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX_FALSE='#'
7997+
else
7998+
USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX_TRUE='#'
7999+
USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX_FALSE=
79888000
fi
79898001

79908002

79918003

79928004

8005+
79938006
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C99 variadic macros" >&5
79948007
$as_echo_n "checking for C99 variadic macros... " >&6; }
79958008
if ${ac_cv_c99_variadic_macros+:} false; then :
@@ -23104,6 +23117,10 @@ if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
2310423117
as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
2310523118
Usually this means the macro was only invoked conditionally." "$LINENO" 5
2310623119
fi
23120+
if test -z "${USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX_TRUE}" && test -z "${USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX_FALSE}"; then
23121+
as_fn_error $? "conditional \"USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX\" was never defined.
23122+
Usually this means the macro was only invoked conditionally." "$LINENO" 5
23123+
fi
2310723124
if test -z "${MULTI_THREADED_TRUE}" && test -z "${MULTI_THREADED_FALSE}"; then
2310823125
as_fn_error $? "conditional \"MULTI_THREADED\" was never defined.
2310923126
Usually this means the macro was only invoked conditionally." "$LINENO" 5

configure.ac

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,11 @@ AS_IF([test "x$ac_cv_declspec" = "xyes" dnl
308308
[AX_CXXFLAGS_GCC_OPTION([-fvisibility=hidden])],
309309
310310
[sun],
311-
[AX_CXXFLAGS_SUN_OPTION([-xldscope=hidden])])])
311+
[AX_CXXFLAGS_SUN_OPTION([-xldscope=hidden])])
312+
use_export_symbols_regex=no],
313+
[use_export_symbols_regex=yes])
314+
AM_CONDITIONAL([USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX],
315+
[test "x$use_export_symbols_regex" = "xyes"])
312316

313317
AX_C99_VARIADIC_MACROS
314318
AH_TEMPLATE([LOG4CPLUS_HAVE_C99_VARIADIC_MACROS])

src/Makefile.am

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,5 +138,16 @@ liblog4cplus_la_CPPFLAGS = $(AM_CPPFLAGS) -DINSIDE_LOG4CPLUS
138138

139139
liblog4cplus_la_SOURCES = $(LIB_SRC)
140140

141+
if USE_LOG4CPLUS_EXPORT_SYMBOLS_REGEX
142+
# Export symbols in log4cplus namespace but try to avoid symbols in
143+
# the log4cplus::internal namespace.
144+
LOG4CPLUS_EXPORT_SYMBOLS_REGEX = -export-symbols-regex '9log4cplus[^8][^i][^n]|log4cplus_'
145+
else
146+
LOG4CPLUS_EXPORT_SYMBOLS_REGEX =
147+
endif
148+
141149
#liblog4cplus_a_LIBADD = @LIBOBJS@ @ALLOCA@
142-
liblog4cplus_la_LDFLAGS = -no-undefined $(LOG4CPLUS_VERSION_LT_FLAGS) @LOG4CPLUS_PROFILING_LDFLAGS@
150+
liblog4cplus_la_LDFLAGS = -no-undefined \
151+
$(LOG4CPLUS_VERSION_LT_FLAGS) \
152+
@LOG4CPLUS_PROFILING_LDFLAGS@ \
153+
$(LOG4CPLUS_EXPORT_SYMBOLS_REGEX)

src/timehelper.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ Time::gettimeofday()
115115

116116
#elif defined (_WIN32)
117117
FILETIME ft;
118+
#if _WIN32_WINNT >= 0x602
119+
GetSystemTimePreciseAsFileTime (&ft);
120+
#else
118121
GetSystemTimeAsFileTime (&ft);
122+
#endif
119123

120124
typedef unsigned __int64 uint64_type;
121125
uint64_type st100ns

0 commit comments

Comments
 (0)