regposerr.c - Oniguruma (regular expression library)\r
**********************************************************************/\r
/*-\r
- * Copyright (c) 2002-2007 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>\r
+ * Copyright (c) 2002-2018 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>\r
* All rights reserved.\r
*\r
- * (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
- *\r
* Redistribution and use in source and binary forms, with or without\r
* modification, are permitted provided that the following conditions\r
* are met:\r
* SUCH DAMAGE.\r
*/\r
\r
-/*#include "config.h"*/\r
+/* Can't include regint.h etc.. for conflict of regex_t.\r
+ Define ONIGURUMA_EXPORT here for onigposix.h.\r
+ */\r
+#ifndef ONIGURUMA_EXPORT\r
+#define ONIGURUMA_EXPORT\r
+#endif\r
+\r
+//#include "config.h"\r
#include "onigposix.h"\r
\r
#if 0\r
# define ARG_UNUSED\r
#endif\r
\r
+#if defined(_WIN32) && !defined(__GNUC__)\r
+#define xsnprintf sprintf_s\r
+#define xstrncpy(dest,src,size) strncpy_s(dest,size,src,_TRUNCATE)\r
+#else\r
+#define xsnprintf snprintf\r
+#define xstrncpy strncpy\r
+#endif\r
+\r
static char* ESTRING[] = {\r
NULL,\r
"failed to match", /* REG_NOMATCH */\r
/* Extended errors */\r
"internal error", /* REG_EONIG_INTERNAL */\r
"invalid wide char value", /* REG_EONIG_BADWC */\r
- "invalid argument", /* REG_EONIG_BADARG */\r
- "multi-thread error" /* REG_EONIG_THREAD */\r
+ "invalid argument" /* REG_EONIG_BADARG */\r
};\r
\r
//#include <stdio.h>\r