summaryrefslogtreecommitdiff
path: root/pcre_scanner_unittest.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 /pcre_scanner_unittest.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 'pcre_scanner_unittest.cc')
-rw-r--r--pcre_scanner_unittest.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/pcre_scanner_unittest.cc b/pcre_scanner_unittest.cc
index c0b8a33..284c8ea 100644
--- a/pcre_scanner_unittest.cc
+++ b/pcre_scanner_unittest.cc
@@ -44,10 +44,6 @@
#include "pcre_stringpiece.h"
#include "pcre_scanner.h"
-#ifdef HAVE_WINDOWS_H
-# define snprintf _snprintf
-#endif
-
#define FLAGS_unittest_stack_size 49152
// Dies with a fatal error if the two values are not equal.
@@ -132,8 +128,8 @@ static void TestScanner() {
static void TestBigComment() {
string input;
for (int i = 0; i < 1024; ++i) {
- char buf[1024];
- snprintf(buf, sizeof(buf), " # Comment %d\n", i);
+ char buf[1024]; // definitely big enough
+ sprintf(buf, " # Comment %d\n", i);
input += buf;
}
input += "name = value;\n";