summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/cbasetypes.h5
-rw-r--r--src/common/strlib.c9
-rw-r--r--src/common/strlib.h4
3 files changed, 7 insertions, 11 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index 0e419c013..78e5512ba 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -252,16 +252,13 @@ typedef uintptr_t uintptr;
#if defined(__BORLANDC__) || _MSC_VER < 1900
#define snprintf _snprintf
#endif
-#if defined(_MSC_VER) && _MSC_VER < 1400
-#define vsnprintf _vsnprintf
-#endif
#else
#define strcmpi strcasecmp
#define stricmp strcasecmp
#define strncmpi strncasecmp
#define strnicmp strncasecmp
#endif
-#if defined(_MSC_VER) && _MSC_VER > 1200
+#if defined(_MSC_VER)
#define strtoull _strtoui64
#define strtoll _strtoi64
#endif
diff --git a/src/common/strlib.c b/src/common/strlib.c
index 8a2de1ee0..9690151b4 100644
--- a/src/common/strlib.c
+++ b/src/common/strlib.c
@@ -271,10 +271,9 @@ char* strlib_strtok_r(char *s1, const char *s2, char **lasts)
size_t strlib_strnlen(const char *string, size_t maxlen)
{
-// TODO: The _MSC_VER check can probably be removed (we no longer support VS
-// versions <= 2003, do we?), but this implementation might be still necessary
-// for NetBSD 5.x and possibly some Solaris versions.
-#if !(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN)
+// TODO: Verify whether this implementation is still necessary for NetBSD 5.x
+// and possibly some Solaris versions.
+#if !(defined(WIN32) && defined(_MSC_VER)) && !defined(HAVE_STRNLEN)
/* Find the length of STRING, but scan at most MAXLEN characters.
* If no '\0' terminator is found in that many characters, return MAXLEN.
*/
@@ -1114,7 +1113,7 @@ void strlib_defaults(void) {
strlib->normalize_name_ = strlib_normalize_name;
strlib->stristr_ = strlib_stristr;
-#if !(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN)
+#if !(defined(WIN32) && defined(_MSC_VER)) && !defined(HAVE_STRNLEN)
strlib->strnlen_ = strlib_strnlen;
#else
strlib->strnlen_ = NULL;
diff --git a/src/common/strlib.h b/src/common/strlib.h
index 36dceef2d..fa7d577eb 100644
--- a/src/common/strlib.h
+++ b/src/common/strlib.h
@@ -33,7 +33,7 @@
#define normalize_name(str,delims) (strlib->normalize_name_((str),(delims)))
#define stristr(haystack,needle) (strlib->stristr_((haystack),(needle)))
-#if !(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN)
+#if !(defined(WIN32) && defined(_MSC_VER)) && !defined(HAVE_STRNLEN)
#define strnlen(string,maxlen) (strlib->strnlen_((string),(maxlen)))
#endif
@@ -98,7 +98,7 @@ struct strlib_interface {
char *(*normalize_name_) (char* str,const char* delims);
const char *(*stristr_) (const char *haystack, const char *needle);
- /* only used when '!(defined(WIN32) && defined(_MSC_VER) && _MSC_VER >= 1400) && !defined(HAVE_STRNLEN)', needs to be defined at all times however */
+ /* only used when '!(defined(WIN32) && defined(_MSC_VER)) && !defined(HAVE_STRNLEN)', needs to be defined at all times however */
size_t (*strnlen_) (const char* string, size_t maxlen);
/* only used when 'WIN32' */