diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2020-04-20 20:33:58 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2020-04-20 20:33:58 +0200 |
commit | 73c6133c32cddae59813cbadf655cb50a3a7356a (patch) | |
tree | 0935fb6da7f1d9728b42ddf08395a0e977e1c228 /src/regposerr.c | |
parent | 043fff5b6f2461aeccb1c62cb771826cfe301832 (diff) | |
parent | 6b986090d954dbac91bbb3c43ce7c3328c91a780 (diff) |
Update upstream source from tag 'upstream/6.9.5'
Update to upstream version '6.9.5'
with Debian dir 1312d9badb7f1c47d032cf09765074e8fd80c991
Diffstat (limited to 'src/regposerr.c')
-rw-r--r-- | src/regposerr.c | 19 |
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 |