From 6b986090d954dbac91bbb3c43ce7c3328c91a780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 20 Apr 2020 20:33:51 +0200 Subject: New upstream version 6.9.5 --- src/regposerr.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/regposerr.c') 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 +#include +#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 extern size_t -- cgit v1.2.3