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
This commit is contained in:
Benjamin Kramer 2009-09-06 12:26:28 +00:00
parent 613c581b81
commit 8b3594afdb
3 changed files with 5 additions and 2 deletions

View File

@ -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 */

View File

@ -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 {

View File

@ -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;