summaryrefslogtreecommitdiff
path: root/pcrecpp.cc
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-09-19 09:11:19 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2007-09-19 09:11:19 +0000
commit441a0d577e40aa1a43542eff538a9043898c72f6 (patch)
tree4cbb09f4dafd0df37b5fbb5d500121dd839b9bda /pcrecpp.cc
parent0737a2bfd72b8a09a9f72998fa911d184138cfaa (diff)
downloadpcre-441a0d577e40aa1a43542eff538a9043898c72f6.tar.gz
Craig's patch to remove the checks for windows.h and instead check for
_strtoi64 explicitly, and avoid using snprintf() at all. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@257 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcrecpp.cc')
-rw-r--r--pcrecpp.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/pcrecpp.cc b/pcrecpp.cc
index c331200..e498d65 100644
--- a/pcrecpp.cc
+++ b/pcrecpp.cc
@@ -33,12 +33,6 @@
#include "config.h"
#endif
-#ifdef HAVE_WINDOWS_H
-#define HAVE_STRTOQ 1
-#define strtoll _strtoui64
-#define strtoull _strtoi64
-#endif
-
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
@@ -770,6 +764,8 @@ bool Arg::parse_longlong_radix(const char* str,
long long r = strtoq(str, &end, radix);
#elif defined HAVE_STRTOLL
long long r = strtoll(str, &end, radix);
+#elif defined HAVE__STRTOI64
+ long long r = _strtoi64(str, &end, radix);
#else
#error parse_longlong_radix: cannot convert input to a long-long
#endif
@@ -797,6 +793,8 @@ bool Arg::parse_ulonglong_radix(const char* str,
unsigned long long r = strtouq(str, &end, radix);
#elif defined HAVE_STRTOLL
unsigned long long r = strtoull(str, &end, radix);
+#elif defined HAVE__STRTOI64
+ unsigned long long r = _strtoui64(str, &end, radix);
#else
#error parse_ulonglong_radix: cannot convert input to a long-long
#endif