aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorK.Kosako <kosako@sofnec.co.jp>2020-01-14 17:35:14 +0900
committerK.Kosako <kosako@sofnec.co.jp>2020-01-14 17:35:14 +0900
commit59fcf45fce0c82dd27116058ec8df00a99f65fe8 (patch)
tree50fdd27f36059ce70a8e1476c0e72ea7f812dc7e
parent781f9e801109f7e225ebde052ae80e10720ed42c (diff)
downloadoniguruma-59fcf45fce0c82dd27116058ec8df00a99f65fe8.zip
oniguruma-59fcf45fce0c82dd27116058ec8df00a99f65fe8.tar.gz
oniguruma-59fcf45fce0c82dd27116058ec8df00a99f65fe8.tar.bz2
enclose all inclusions of system header by ONIGURUMA_SYS_UEFI (#170)
-rw-r--r--src/onigposix.h4
-rw-r--r--src/regenc.h5
-rw-r--r--src/regposerr.c4
3 files changed, 10 insertions, 3 deletions
diff --git a/src/onigposix.h b/src/onigposix.h
index 20bd0e3..66888dd 100644
--- a/src/onigposix.h
+++ b/src/onigposix.h
@@ -4,7 +4,7 @@
onigposix.h - 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
@@ -28,7 +28,9 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
+#ifndef ONIGURUMA_SYS_UEFI
#include <stddef.h>
+#endif
#ifdef __cplusplus
extern "C" {
diff --git a/src/regenc.h b/src/regenc.h
index a21a8b3..e368bbb 100644
--- a/src/regenc.h
+++ b/src/regenc.h
@@ -4,7 +4,7 @@
regenc.h - 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
@@ -34,7 +34,10 @@
#endif
#include "config.h"
+
+#ifndef ONIGURUMA_SYS_UEFI
#include <stddef.h>
+#endif
#ifdef ONIG_ESCAPE_UCHAR_COLLISION
#undef ONIG_ESCAPE_UCHAR_COLLISION
diff --git a/src/regposerr.c b/src/regposerr.c
index ce14673..e988f6d 100644
--- a/src/regposerr.c
+++ b/src/regposerr.c
@@ -37,7 +37,10 @@
#include "config.h"
#include "onigposix.h"
+#ifndef ONIGURUMA_SYS_UEFI
#include <string.h>
+#include <stdio.h>
+#endif
#if defined(__GNUC__)
# define ARG_UNUSED __attribute__ ((unused))
@@ -88,7 +91,6 @@ static char* ESTRING[] = {
"invalid argument" /* REG_EONIG_BADARG */
};
-#include <stdio.h>
extern size_t