summaryrefslogtreecommitdiff
path: root/src/regposerr.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-04-20 20:33:51 +0200
committerJörg Frings-Fürst <debian@jff.email>2020-04-20 20:33:51 +0200
commit6b986090d954dbac91bbb3c43ce7c3328c91a780 (patch)
tree34b34e41a3f7b7f4794c75be4482bb14695f36a9 /src/regposerr.c
parent4216de6a3336cbc6dddb572cb7e6ab6193bf3729 (diff)
New upstream version 6.9.5upstream/6.9.5
Diffstat (limited to 'src/regposerr.c')
-rw-r--r--src/regposerr.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/regposerr.c b/src/regposerr.c
index e1747c5..12d95a9 100644
--- a/src/regposerr.c
+++ b/src/regposerr.c
@@ -2,7 +2,7 @@
regposerr.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2019 K.Kosako
+ * Copyright (c) 2002-2020 K.Kosako
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -37,7 +37,10 @@
#include "config.h"
#include "onigposix.h"
+#ifndef ONIG_NO_STANDARD_C_HEADERS
#include <string.h>
+#include <stdio.h>
+#endif
#if defined(__GNUC__)
# define ARG_UNUSED __attribute__ ((unused))
@@ -46,13 +49,26 @@
#endif
#if defined(_WIN32) && !defined(__GNUC__)
+
+#ifndef xsnprintf
#define xsnprintf sprintf_s
+#endif
+#ifndef xstrncpy
#define xstrncpy(dest,src,size) strncpy_s(dest,size,src,_TRUNCATE)
+#endif
+
#else
+
+#ifndef xsnprintf
#define xsnprintf snprintf
+#endif
+#ifndef xstrncpy
#define xstrncpy strncpy
#endif
+#endif
+
+
static char* ESTRING[] = {
NULL,
"failed to match", /* REG_NOMATCH */
@@ -75,7 +91,6 @@ static char* ESTRING[] = {
"invalid argument" /* REG_EONIG_BADARG */
};
-#include <stdio.h>
extern size_t