diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-09-06 12:26:28 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-09-06 12:26:28 +0000 |
commit | 8b3594afdb402e088ac1b891930c599e58992afa (patch) | |
tree | 4c099881a05c153f01b5176908e732b6df0a93e8 | |
parent | 613c581b816b4cf60467e1555b3cf2a53547a590 (diff) | |
download | external_llvm-8b3594afdb402e088ac1b891930c599e58992afa.zip external_llvm-8b3594afdb402e088ac1b891930c599e58992afa.tar.gz external_llvm-8b3594afdb402e088ac1b891930c599e58992afa.tar.bz2 |
More MSVC warning fixes:
1. DUPMAX is defined in regcomp.c, no need to redefine it in regutils.
2. MSVC doesn't like snprintf, use _snprintf instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81114 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Support/regcomp.c | 1 | ||||
-rw-r--r-- | lib/Support/regerror.c | 4 | ||||
-rw-r--r-- | lib/Support/regutils.h | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/lib/Support/regcomp.c b/lib/Support/regcomp.c index 9ae66f3..16ca8d3 100644 --- a/lib/Support/regcomp.c +++ b/lib/Support/regcomp.c @@ -142,6 +142,7 @@ static char nuls[10]; /* place to point scanner in event of error */ #else #define DUPMAX 255 #endif +#define INFINITY (DUPMAX + 1) #ifndef NDEBUG static int never = 0; /* for use in asserts; shuts lint up */ diff --git a/lib/Support/regerror.c b/lib/Support/regerror.c index 88d33b8..1d67c9a 100644 --- a/lib/Support/regerror.c +++ b/lib/Support/regerror.c @@ -45,6 +45,10 @@ #include "regutils.h" +#ifdef _MSC_VER +#define snprintf _snprintf +#endif + static const char *regatoi(const llvm_regex_t *, char *, int); static struct rerr { diff --git a/lib/Support/regutils.h b/lib/Support/regutils.h index 7150a3f..d0ee100 100644 --- a/lib/Support/regutils.h +++ b/lib/Support/regutils.h @@ -36,8 +36,6 @@ */ /* utility definitions */ -#define DUPMAX _POSIX2_RE_DUP_MAX /* xxx is this right? */ -#define INFINITY (DUPMAX + 1) #define NC (CHAR_MAX - CHAR_MIN + 1) typedef unsigned char uch; |