Skip to content
This repository was archived by the owner on Jul 8, 2022. It is now read-only.

Commit 8f2218e

Browse files
committed
log4tango: Require snprintf support
Since the default C++ version was raised to 11 we now know that we have a working snprintf solution. Therefore we can drop the alternative implementation which was not touched in 18 years. This also makes LOG4TANGO_HAVE_SNPRINTF obsolete, it is therefore removed.
1 parent 34314d8 commit 8f2218e

File tree

6 files changed

+1
-1068
lines changed

6 files changed

+1
-1068
lines changed

log4tango/config/check_snprintf.cpp

Lines changed: 0 additions & 6 deletions
This file was deleted.

log4tango/config/config.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ LOG4TANGO_CHECK_COMPILER_FEATURE("config/check_sstream.cpp" SSTREAM)
5353
#namespace
5454
LOG4TANGO_CHECK_COMPILER_FEATURE("config/check_namespace.cpp" NAMESPACES)
5555

56-
#snprintf
57-
LOG4TANGO_CHECK_COMPILER_FEATURE("config/check_snprintf.cpp" SNPRINTF)
58-
5956
#check types
6057
check_type_size(int64_t INT64_SIZE)
6158
if(WIN32)

log4tango/config/config.h.in

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
/* define if the compiler implements namespaces */
2323
#cmakedefine LOG4TANGO_HAVE_NAMESPACES
2424

25-
/* define if the C library has snprintf */
26-
#cmakedefine LOG4TANGO_HAVE_SNPRINTF
27-
2825
/* define if the compiler has stringstream */
2926
#cmakedefine LOG4TANGO_HAVE_SSTREAM
3027

@@ -77,4 +74,4 @@
7774
#cmakedefine __darwin__
7875

7976
/* If we're running on FreeBSD */
80-
#cmakedefine __freebsd__
77+
#cmakedefine __freebsd__

log4tango/include/log4tango/config-win32.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,6 @@ typedef __int64 int64_t;
8484
# define LOG4TANGO_HAVE_SSTREAM 1
8585
#endif
8686

87-
/* define if the C library has snprintf */
88-
#ifndef LOG4TANGO_HAVE_SNPRINTF
89-
# define LOG4TANGO_HAVE_SNPRINTF 1
90-
#endif
91-
9287
/* define to get around problems with ERROR in windows.h */
9388
#ifndef LOG4TANGO_FIX_ERROR_COLLISION
9489
# define LOG4TANGO_FIX_ERROR_COLLISION 1

log4tango/src/StringUtil.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,7 @@
3232
#if defined(_MSC_VER)
3333
#define VSNPRINTF _vsnprintf
3434
#else
35-
#ifdef LOG4TANGO_HAVE_SNPRINTF
3635
#define VSNPRINTF vsnprintf
37-
#else
38-
/* use alternative snprintf() from http://www.ijs.si/software/snprintf/ */
39-
40-
#define HAVE_SNPRINTF
41-
#define PREFER_PORTABLE_SNPRINTF
42-
43-
#include <stdlib.h>
44-
#include <stdarg.h>
45-
46-
extern "C" {
47-
#include "snprintf.c"
48-
}
49-
50-
#define VSNPRINTF portable_vsnprintf
51-
52-
#endif // LOG4TANGO_HAVE_SNPRINTF
5336
#endif // _MSC_VER
5437

5538
namespace log4tango {

0 commit comments

Comments
 (0)