summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2009-09-06 12:26:28 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2009-09-06 12:26:28 +0000
commit2b37efaf533086cf00c51c30df08dad6636f1281 (patch)
treefb24300ac21c34071b9743f296773b1b2fd70651
parent8234cdb68fc749431c077bb3f3242f4e3f5aecd8 (diff)
downloadbcm5719-llvm-2b37efaf533086cf00c51c30df08dad6636f1281.tar.gz
bcm5719-llvm-2b37efaf533086cf00c51c30df08dad6636f1281.zip
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. llvm-svn: 81114
-rw-r--r--llvm/lib/Support/regcomp.c1
-rw-r--r--llvm/lib/Support/regerror.c4
-rw-r--r--llvm/lib/Support/regutils.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Support/regcomp.c b/llvm/lib/Support/regcomp.c
index 9ae66f3fa5f..16ca8d3f75c 100644
--- a/llvm/lib/Support/regcomp.c
+++ b/llvm/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/llvm/lib/Support/regerror.c b/llvm/lib/Support/regerror.c
index 88d33b8862a..1d67c9a2b03 100644
--- a/llvm/lib/Support/regerror.c
+++ b/llvm/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/llvm/lib/Support/regutils.h b/llvm/lib/Support/regutils.h
index 7150a3f0825..d0ee100a382 100644
--- a/llvm/lib/Support/regutils.h
+++ b/llvm/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;
OpenPOWER on IntegriCloud