Skip to content

Commit 367a871

Browse files
committed
Bump the C++ version from C++11 to C++17
This will allow the usage of more modern features in the future.
1 parent ca5f516 commit 367a871

File tree

11 files changed

+14
-15
lines changed

11 files changed

+14
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Windows build is not ready yet.
7676

7777
## Dependencies
7878

79-
This library is written in C++ using the C++11 standards. It also uses Flex
79+
This library is written in C++ using the C++17 standards. It also uses Flex
8080
and Yacc to produce the “Sec Rules Language” parser. Other, mandatory dependencies include YAJL, as ModSecurity uses JSON for producing logs and its testing framework, libpcre (not yet mandatory) for processing regular expressions in SecRules, and libXML2 (not yet mandatory) which is used for parsing XML requests.
8181

8282
All others dependencies are related to operators specified within SecRules or configuration directives and may not be required for compilation. A short list of such dependencies is as follows:

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ AC_PROG_MAKE_SET
5252
PKG_PROG_PKG_CONFIG
5353

5454

55-
# Check if the compiler is c++11 compatible.
56-
# AX_CXX_COMPILE_STDCXX_11(,mandatory)
55+
# Check if the compiler is c++17 compatible.
56+
# AX_CXX_COMPILE_STDCXX_17(,mandatory)
5757

5858
# Check for libinjection
5959
if ! test -f "${srcdir}/others/libinjection/src/libinjection_html5.c"; then

examples/reading_logs_via_rule_message/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ simple_request_LDFLAGS = \
3232

3333
simple_request_CPPFLAGS = \
3434
$(GLOBAL_CFLAGS) \
35-
-std=c++11 \
35+
-std=c++17 \
3636
-I$(top_builddir)/headers \
3737
-I$(top_builddir) \
3838
-g \

examples/reading_logs_with_offset/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ read_LDFLAGS = \
3232

3333
read_CPPFLAGS = \
3434
$(GLOBAL_CFLAGS) \
35-
-std=c++11 \
35+
-std=c++17 \
3636
-I$(top_builddir)/headers \
3737
-I$(top_builddir) \
3838
-g \

examples/using_bodies_in_chunks/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ simple_request_LDFLAGS = \
3333

3434
simple_request_CPPFLAGS = \
3535
$(GLOBAL_CFLAGS) \
36-
-std=c++11 \
36+
-std=c++17 \
3737
-I$(top_builddir)/headers \
3838
-I$(top_builddir) \
3939
-g \

src/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ libmodsecurity_la_CFLAGS =
311311

312312

313313
libmodsecurity_la_CPPFLAGS = \
314-
-std=c++11 \
314+
-std=c++17 \
315315
-I.. \
316316
-g \
317317
-I../others \

src/parser/Makefile.am

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@ libmodsec_parser_la_SOURCES = \
1111
test.cc
1212

1313
libmodsec_parser_la_CPPFLAGS = \
14-
-std=c++11 \
14+
-std=c++17 \
1515
-I../.. \
1616
-I../../headers \
1717
-I../../others \
18-
-std=c++11 \
1918
-I.. \
2019
-g \
2120
-fPIC \

test/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ unit_tests_LDFLAGS = \
7070

7171

7272
unit_tests_CPPFLAGS = \
73-
-std=c++11 \
73+
-std=c++17 \
7474
-Icommon \
7575
-I../ \
7676
-g \
@@ -126,7 +126,7 @@ regression_tests_LDFLAGS = \
126126

127127

128128
regression_tests_CPPFLAGS = \
129-
-std=c++11 \
129+
-std=c++17 \
130130
-Icommon \
131131
-I../ \
132132
-g \
@@ -179,7 +179,7 @@ rules_optimization_LDFLAGS = \
179179
$(YAJL_LDFLAGS)
180180

181181
rules_optimization_CPPFLAGS = \
182-
-std=c++11 \
182+
-std=c++17 \
183183
-Icommon \
184184
-I../ \
185185
-g \

test/benchmark/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ benchmark_LDFLAGS = \
3232
$(LUA_LDFLAGS)
3333

3434
benchmark_CPPFLAGS = \
35-
-std=c++11 \
35+
-std=c++17 \
3636
-I$(top_builddir)/headers \
3737
$(GLOBAL_CPPFLAGS) \
3838
$(PCRE_CFLAGS) \

test/fuzzer/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ afl_fuzzer_LDADD = \
3030

3131

3232
afl_fuzzer_CPPFLAGS = \
33-
-std=c++11 \
33+
-std=c++17 \
3434
-Icommon \
3535
-I../ \
3636
-I../../ \

tools/rules-check/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ modsec_rules_check_LDFLAGS = \
2828
$(YAJL_LDFLAGS)
2929

3030
modsec_rules_check_CPPFLAGS = \
31-
-std=c++11 \
31+
-std=c++17 \
3232
-I$(top_builddir)/headers \
3333
$(GLOBAL_CPPFLAGS) \
3434
$(PCRE_CFLAGS) \

0 commit comments

Comments
 (0)