summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-09-11 11:36:27 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-09-11 11:36:27 +0000
commit577a3f51ea8062d183d4a8c8857f5d1f0a80c2f3 (patch)
tree02a0ad9ca7ab1f42a16da0d7118f223ee24ed589
parenta786a15bec96fa9a25461736e4c2361842d61214 (diff)
downloadpcre-577a3f51ea8062d183d4a8c8857f5d1f0a80c2f3.tar.gz
Macros for snprintf, strtoll, strtoull when compiling the C++ things under
Windows. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@234 2f5784b3-3f2a-0410-8824-cb99058d5e15
-rw-r--r--ChangeLog4
-rw-r--r--pcrecpp.cc6
-rw-r--r--pcrecpp_unittest.cc4
3 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 819c2a8..4bcc6f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -30,6 +30,10 @@ Version 7.4 10-Sep-07
6. Put back the definition of PCRE_ERROR_NULLWSLIMIT, for backward
compatibility, even though it is no longer used.
+
+7. Added macro for snprintf to pcrecpp_unittest.cc and also for strtoll and
+ strtoull to pcrecpp.cc to select the available functions in WIN32 (where
+ different names are used).
Version 7.3 28-Aug-07
diff --git a/pcrecpp.cc b/pcrecpp.cc
index e9378c0..94b3881 100644
--- a/pcrecpp.cc
+++ b/pcrecpp.cc
@@ -33,6 +33,12 @@
#include <config.h>
#endif
+#ifdef _WIN32
+#define HAVE_STRTOQ 1
+#define strtoll _strtoui64
+#define strtoull _strtoi64
+#endif
+
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
diff --git a/pcrecpp_unittest.cc b/pcrecpp_unittest.cc
index 787f143..4f399eb 100644
--- a/pcrecpp_unittest.cc
+++ b/pcrecpp_unittest.cc
@@ -37,6 +37,10 @@
#include <config.h>
#endif
+#ifdef _WIN32
+#define snprintf _snprintf
+#endif
+
#include <stdio.h>
#include <cassert>
#include <vector>