diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2020-04-21 06:47:36 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2020-04-21 06:47:36 +0200 |
commit | a792c4308d32f68f34131ff89e124190e4513c38 (patch) | |
tree | 68d5ba9857cafd597ea84011077a83e43f2d1620 /src/regposerr.c | |
parent | 9e629c8f43b43617fa5b7d3654f7d81e81b8a427 (diff) | |
parent | d1ffcb88ee95aded1bc4aef56f4f39951ad03ceb (diff) |
Merge branch 'release/debian/6.9.5-1'debian/6.9.5-1
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 |