Changeset 1798
- Timestamp:
- 04/14/07 13:49:51 (21 months ago)
- Location:
- trunk
- Files:
-
- 5 modified
-
configure.in (modified) (6 diffs)
-
src/common/sendpacket.c (modified) (2 diffs)
-
src/common/tcpdump.c (modified) (1 diff)
-
src/config.h.in (modified) (1 diff)
-
src/flow/flownode.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure.in
r1794 r1798 24 24 AC_SUBST(TCPREPLAY_RELEASE) 25 25 26 CFLAGS="$CFLAGS -Wall -O2 -funroll-loops -std=gnu99" # -std=c99 -Wno-variadic-macros"26 CFLAGS="$CFLAGS -Wall -O2 -funroll-loops -std=gnu99" 27 27 28 28 dnl Determine OS … … 79 79 AC_CHECK_TYPE(u_int64_t, uint64_t) 80 80 81 dnl Older versions of GCC don't support these options 82 AC_MSG_CHECKING(for $CC -Wextra support) 83 OLD_CFLAGS=$CFLAGS 84 CFLAGS="$CFLAGS -Wextra" 85 wextra="" 86 AC_COMPILE_IFELSE([#include <stdlib.h> 87 int main(int argc, char *argv[]) { return(0); }], 88 [ AC_MSG_RESULT(yes) 89 wextra="-Wextra" ], 90 [ AC_MSG_RESULT(no) ]) 91 CFLAGS="$OLD_CFLAGS $wextra" 92 93 AC_MSG_CHECKING(for $CC -Wno-variadic-macros support) 94 OLD_CFLAGS=$CFLAGS 95 CFLAGS="$CFLAGS -Wno-variadic-macros" 96 wno_variadic_macros="" 97 AC_COMPILE_IFELSE([#include <stdlib.h> 98 int main(int argc, char *argv[]) { return(0); }], 99 [ AC_MSG_RESULT(yes) 100 wno_variadic_macros="-Wno-variadic-macros" ], 101 [ AC_MSG_RESULT(no) ]) 102 CFLAGS="$OLD_CFLAGS $wno_variadic_macros" 103 104 AC_MSG_CHECKING(for $CC -Wfatal-errors support) 105 OLD_CFLAGS=$CFLAGS 106 CFLAGS="$CFLAGS -Wfatal-erors" 107 wfatal_errors="" 108 AC_COMPILE_IFELSE([#include <stdlib.h> 109 int main(int argc, char *argv[]) { return(0); }], 110 [ AC_MSG_RESULT(yes) 111 wfatal_errors="-Wfatal-errors" ], 112 [ AC_MSG_RESULT(no) ]) 113 CFLAGS="$OLD_CFLAGS $wfatal_errors" 114 115 81 116 dnl Check for other header files 82 AC_CHECK_HEADERS([fcntl.h stddef.h sys/socket.h arpa/inet.h sys/time.h signal.h string.h strings.h sys/types.h sys/select.h netinet/in.h poll.h sys/poll.h unistd.h net/route.h sys/sysctl.h]) 117 AC_CHECK_HEADERS([fcntl.h stddef.h sys/socket.h arpa/inet.h sys/time.h signal.h string.h strings.h sys/types.h sys/select.h netinet/in.h poll.h sys/poll.h unistd.h sys/param.h]) 118 119 dnl OpenBSD has special requirements 120 AC_CHECK_HEADERS([sys/sysctl.h net/route.h], [], [], [ 121 [#if HAVE_SYS_PARAM_H 122 #include <sys/param.h> 123 #endif 124 #if HAVE_SYS_TYPES_H 125 #include <sys/types.h> 126 #endif 127 #if HAVE_SYS_SOCKET_H 128 #include <sys/socket.h> 129 #endif 130 ]]) 131 83 132 84 133 dnl Checks for libraries. … … 92 141 AC_TYPE_SIGNAL 93 142 AC_FUNC_VPRINTF 143 AC_CHECK_MEMBERS([struct timeval.tv_sec]) 144 94 145 AC_CHECK_FUNCS([gettimeofday ctime memset regcomp strdup strchr strerror strtol strncpy strtoull poll ntohll mmap snprintf vsnprintf]) 95 146 … … 98 149 AM_CONDITIONAL(SYSTEM_STRLCPY, [test x$have_strlcpy = xtrue]) 99 150 100 AC_CHECK_MEMBERS([struct timeval.tv_sec])101 102 151 AC_C_BIGENDIAN 103 152 AM_CONDITIONAL([WORDS_BIGENDIAN], [ test x$ac_cv_c_bigendian = xyes ]) 153 104 154 105 155 dnl Enable debugging in code/compiler options … … 108 158 AC_HELP_STRING([--enable-debug], [Enable debugging code and support for the -d option]), 109 159 [ if test x$enableval = xyes; then 110 debug=yes 111 # check for gcc 4.0 flags -Wfatal-errors & -Wno-variadic-macros support 112 CFLAGS="-ggdb -std=gnu99 -Wall -Wextra -Wfatal-errors -Wno-variadic-macros" 113 AC_COMPILE_IFELSE([#include <stdlib.h> 114 int main(int argc, char *argv[]) { return(0); }], 115 [CFLAGS="-ggdb -std=gnu99 -Wall -Wextra -Wfatal-errors -Wno-variadic-macros"], 116 [CFLAGS="-ggdb -std=gnu99 -Wall -Wextra"]) 160 debug=yes 161 CFLAGS="-ggdb -std=gnu99 -Wall $wextra $wfatal_errors $wno_variadic_macros" 117 162 # We may also want to add: 118 163 # -Wformat-security -Wswitch-default -Wunused-paramter -Wpadded" … … 120 165 AC_DEFINE([DEBUG], [1], [Enable debuging code and support for the -d option]) 121 166 fi]) 167 122 168 123 169 AC_ARG_ENABLE(pedantic, -
trunk/src/common/sendpacket.c
r1792 r1798 107 107 #include <sys/ioctl.h> 108 108 #include <sys/file.h> 109 #include <sys/socket.h> 110 #ifdef HAVE_SYS_PARAM_H 111 #include <sys/param.h> 112 #endif 109 113 #ifdef HAVE_SYS_SYSCTL_H 110 114 #include <sys/sysctl.h> … … 118 122 #ifdef HAVE_PF_PACKET 119 123 #include <fcntl.h> 120 #include <sys/socket.h>121 124 #include <sys/utsname.h> 122 125 #include <net/if.h> -
trunk/src/common/tcpdump.c
r1773 r1798 55 55 #include <errno.h> 56 56 #include <string.h> 57 #ifdef HAVE_SIGNAL_H 58 #include <signal.h> 59 #endif 57 60 58 61 #include "tcpdump.h" -
trunk/src/config.h.in
r1795 r1798 15 15 /* Enable building flowreplay (alpha) */ 16 16 #undef ENABLE_FLOWREPLAY 17 18 /* Do we have tcpdump and pcap_dump_fopen()? */19 #undef ENABLE_VERBOSE20 17 21 18 /* fopen(3) accepts a 'b' in the mode flag */ -
trunk/src/flow/flownode.c
r1757 r1798 44 44 #include <errno.h> 45 45 #include <unistd.h> 46 #ifdef HAVE_SYS_SOCKET_H 47 #include <sys/socket.h> 48 #endif 46 49 47 50 extern struct session_tree tcproot, udproot;
