forked from simsong/tcpflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
applied Dima patches and brought up to current be13_api, dfxml and ht…
…tp-parser
- Loading branch information
Showing
5 changed files
with
164 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
################################################################ | ||
# | ||
# Enable all the compiler debugging we can find | ||
# Simson L. Garfinkel | ||
# | ||
# This is originally from PhotoRec, but modified substantially by Simson | ||
# Figure out which flags we can use with the compiler. | ||
# | ||
# These I don't like: | ||
# -Wdeclaration-after-statement -Wconversion | ||
# doesn't work: -Wunreachable-code | ||
# causes configure to crash on gcc-4.2.1: -Wsign-compare-Winline | ||
# causes warnings with unistd.h: -Wnested-externs | ||
# Just causes too much annoyance: -Wmissing-format-attribute | ||
|
||
# First, see if we are using CLANG | ||
using_clang=no | ||
if (g++ --version 2>&1 | grep clang > /dev/null) ; | ||
then | ||
AC_MSG_NOTICE([g++ is really clang++]) | ||
using_clang=yes | ||
fi | ||
if test x$CXX == "xclang++" ; then | ||
using_clang=yes | ||
fi | ||
|
||
|
||
|
||
# Check GCC | ||
C_WARNINGS_TO_TEST="-MD -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes \ | ||
-Wshadow -Wwrite-strings -Wcast-align -Waggregate-return \ | ||
-Wbad-function-cast -Wcast-qual -Wundef -Wredundant-decls -Wdisabled-optimization \ | ||
-Wfloat-equal -Wmultichar -Wc++-compat -Wmissing-noreturn " | ||
|
||
if test x"${mingw}" != "xyes" ; then | ||
# add the warnings we do not want to do on mingw | ||
C_WARNINGS_TO_TEST="$C_WARNINGS_TO_TEST -Wall -Wstrict-prototypes" | ||
fi | ||
|
||
if test $using_clang == "no" ; then | ||
# -Wstrict-null-sentinel is not supported under clang | ||
CXX_WARNINGS_TO_TEST="$CXX_WARNINGS_TO_TEST -Wstrict-null-sentinel" | ||
fi | ||
|
||
|
||
|
||
echo "C Warnings to test: $C_WARNINGS_TO_TEST" | ||
|
||
for option in $C_WARNINGS_TO_TEST | ||
do | ||
SAVE_CFLAGS="$CFLAGS" | ||
CFLAGS="$CFLAGS $option" | ||
AC_MSG_CHECKING([whether gcc understands $option]) | ||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], | ||
[has_option=yes], | ||
[has_option=no; CFLAGS="$SAVE_CFLAGS"]) | ||
AC_MSG_RESULT($has_option) | ||
unset has_option | ||
unset SAVE_CFLAGS | ||
if test $option = "-Wmissing-format-attribute" ; then | ||
AC_DEFINE(HAVE_MISSING_FORMAT_ATTRIBUTE_WARNING,1, | ||
[Indicates that we have the -Wmissing-format-attribute G++ warning]) | ||
fi | ||
done | ||
unset option | ||
|
||
|
||
# Check G++ | ||
# We don't use these warnings: | ||
# -Waggregate-return -- aggregate returns are GOOD; they simplify code design | ||
# We can use these warnings after ZLIB gets upgraded: | ||
# -Wundef --- causes problems with zlib | ||
# -Wcast-qual | ||
# -Wmissing-format-attribute --- Just too annoying | ||
AC_LANG_PUSH(C++) | ||
AC_CHECK_HEADERS([string]) | ||
CXX_WARNINGS_TO_TEST="-Wall -MD -D_FORTIFY_SOURCE=2 -Wpointer-arith \ | ||
-Wshadow -Wwrite-strings -Wcast-align \ | ||
-Wredundant-decls -Wdisabled-optimization \ | ||
-Wfloat-equal -Wmultichar -Wmissing-noreturn \ | ||
-Woverloaded-virtual -Wsign-promo \ | ||
-funit-at-a-time" | ||
|
||
if test x"${mingw}" != "xyes" ; then | ||
# add the warnings we don't want to do on mingw | ||
CXX_WARNINGS_TO_TEST="$CXX_WARNINGS_TO_TEST -Weffc++" | ||
fi | ||
|
||
echo "C++ Warnings to test: $CXX_WARNINGS_TO_TEST" | ||
|
||
for option in $CXX_WARNINGS_TO_TEST | ||
do | ||
SAVE_CXXFLAGS="$CXXFLAGS" | ||
CXXFLAGS="$CXXFLAGS $option" | ||
AC_MSG_CHECKING([whether g++ understands $option]) | ||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], | ||
[has_option=yes], | ||
[has_option=no; CXXFLAGS="$SAVE_CXXFLAGS"]) | ||
AC_MSG_RESULT($has_option) | ||
unset has_option | ||
unset SAVE_CXXFLAGS | ||
done | ||
unset option | ||
AC_LANG_POP() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
if test x"${mingw}" != "xyes" ; then | ||
|
||
case $host in | ||
*mingw*) | ||
AC_MSG_NOTICE([Compiling under mingw; will not search other directories.]) | ||
;; | ||
*) | ||
AC_MSG_NOTICE(Compiling under $host.) | ||
# Bring additional directories where things might be found into our | ||
# search path. I don't know why autoconf doesn't do this by default | ||
for spfx in /usr/local /opt/local /sw /usr/local/ssl; do | ||
AC_MSG_NOTICE([checking ${spfx}/include]) | ||
if test -d ${spfx}/include; then | ||
CPPFLAGS="-I${spfx}/include $CPPFLAGS" | ||
LDFLAGS="-L${spfx}/lib $LDFLAGS" | ||
AC_MSG_NOTICE([ *** ADDING ${spfx}/include to CPPFLAGS *** ]) | ||
AC_MSG_NOTICE([ *** ADDING ${spfx}/lib to LDFLAGS *** ]) | ||
fi | ||
done | ||
AC_MSG_NOTICE([ CPPFLAGS = ${CPPFLAGS} ]) | ||
AC_MSG_NOTICE([ LDFLAGS = ${LDFLAGS} ]) | ||
;; | ||
esac | ||
fi | ||
|
||
|
Submodule be13_api
updated
from cc3951 to 20b02b
Submodule dfxml
updated
14 files
+6 −1 | src/COPYING | |
+2 −0 | src/Makefile.am | |
+9 −1 | src/README | |
+3 −0 | src/bootstrap.sh | |
+4 −0 | src/configure.ac | |
+5 −0 | src/cppmutex.h | |
+8 −0 | src/cpu_info.c | |
+5 −0 | src/cpu_stat.cpp | |
+4 −0 | src/dfxml_configure.m4 | |
+9 −0 | src/dfxml_demo.cpp | |
+12 −0 | src/dfxml_reader.cpp | |
+6 −0 | src/dfxml_reader.h | |
+0 −13 | src/dfxml_writer.cpp | |
+6 −1 | src/hash_t.h |