summaryrefslogtreecommitdiff
path: root/3rdparty/libconfig/extra
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-03-31 16:46:01 -0400
committergumi <git@gumi.ca>2020-05-07 16:09:28 -0400
commited061fe91e164c8fb8516768d5b233a9c4b0aa06 (patch)
tree3b3c27b65319705b4552162ffcb9809c9c8cc1a2 /3rdparty/libconfig/extra
parent01dd499bcafa6fd29bfa70c505636a911b5f24a2 (diff)
downloadhercules-ed061fe91e164c8fb8516768d5b233a9c4b0aa06.tar.gz
hercules-ed061fe91e164c8fb8516768d5b233a9c4b0aa06.tar.bz2
hercules-ed061fe91e164c8fb8516768d5b233a9c4b0aa06.tar.xz
hercules-ed061fe91e164c8fb8516768d5b233a9c4b0aa06.zip
libconfig: rebuild libconfig
Diffstat (limited to '3rdparty/libconfig/extra')
-rw-r--r--3rdparty/libconfig/extra/.gitignore2
-rw-r--r--3rdparty/libconfig/extra/gen/Makefile4
-rw-r--r--3rdparty/libconfig/extra/gen/clangwarnings.patch14
3 files changed, 11 insertions, 9 deletions
diff --git a/3rdparty/libconfig/extra/.gitignore b/3rdparty/libconfig/extra/.gitignore
index 03f1609a0..abc0e5b2d 100644
--- a/3rdparty/libconfig/extra/.gitignore
+++ b/3rdparty/libconfig/extra/.gitignore
@@ -2,4 +2,6 @@
/config.status
/gen/*.c
/gen/*.h
+/gen/*.orig
+/gen/*.rej
/autom4te.cache
diff --git a/3rdparty/libconfig/extra/gen/Makefile b/3rdparty/libconfig/extra/gen/Makefile
index 0b2e0655e..2e952e221 100644
--- a/3rdparty/libconfig/extra/gen/Makefile
+++ b/3rdparty/libconfig/extra/gen/Makefile
@@ -19,9 +19,9 @@ LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS)
YLWRAP = ../aux-build/ylwrap
YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS)
LEX = flex
-LEXLIB = -ll
+LEXLIB = -lfl
LEX_OUTPUT_ROOT = lex.yy
-SHELL = /bin/sh
+SHELL = /bin/bash
YACC = bison -y
YFLAGS =
diff --git a/3rdparty/libconfig/extra/gen/clangwarnings.patch b/3rdparty/libconfig/extra/gen/clangwarnings.patch
index 0270dfc44..ecae69c0e 100644
--- a/3rdparty/libconfig/extra/gen/clangwarnings.patch
+++ b/3rdparty/libconfig/extra/gen/clangwarnings.patch
@@ -10,7 +10,7 @@ index 3595578..26444f8 100644
- yymsg = "Deleting";
- YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+ YY_SYMBOL_PRINT (yymsg != NULL ? yymsg : "Deleting", yytype, yyvaluep, yylocationp);
-
+
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
YYUSE (yytype);
diff --git a/scanner.c b/scanner.c
@@ -22,15 +22,15 @@ index 60882db..8b8af33 100644
#include <errno.h>
#include <stdlib.h>
+#include <assert.h>
-
+
/* end standard C headers. */
-
+
@@ -1702,6 +1703,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
- libconfig_yy_create_buffer(yyin,YY_BUF_SIZE ,yyscanner);
+ yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
}
-
+
+ assert(YY_CURRENT_BUFFER != NULL); // Fixes compiler warning -Wnull-dereference on gcc-6 and -O3
+
- libconfig_yy_init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner);
- libconfig_yy_load_buffer_state(yyscanner );
+ yy_init_buffer( YY_CURRENT_BUFFER, input_file , yyscanner);
+ yy_load_buffer_state( yyscanner );
}