summaryrefslogtreecommitdiff
path: root/src/common/strlib.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-05-08 17:39:22 +0200
committerHaru <haru@dotalux.com>2016-05-08 19:53:59 +0200
commit578b9d8a266a43372717ded4fddbcdbb58b5c810 (patch)
tree7668bc4437bdf34c2124c74a88215f82201f3d9d /src/common/strlib.c
parent1cca070e1a3b82c33a1aecaa6ec9bfc72516a640 (diff)
downloadhercules-578b9d8a266a43372717ded4fddbcdbb58b5c810.tar.gz
hercules-578b9d8a266a43372717ded4fddbcdbb58b5c810.tar.bz2
hercules-578b9d8a266a43372717ded4fddbcdbb58b5c810.tar.xz
hercules-578b9d8a266a43372717ded4fddbcdbb58b5c810.zip
Removed some legacy checks for MSVC <= 2003
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/common/strlib.c')
-rw-r--r--src/common/strlib.c9
1 files changed, 4 insertions, 5 deletions
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;