build cleanups

pull/196/head
Victor Julien 13 years ago
parent 7293040ed8
commit 042d0c6ee8

@ -50,13 +50,12 @@ AC_INIT(configure.ac)
if test "$gccvernum" -ge "400"; then
dnl gcc 4.0 or later
CFLAGS="$CFLAGS -Wextra -Werror-implicit-function-declaration"
# remove optimization options that break our code
# VJ 2010/06/27: no-tree-pre added. It breaks ringbuffers code.
CFLAGS="$CFLAGS -fno-tree-pre"
else
CFLAGS="$CFLAGS -W"
fi
# remove optimization options that break our code
# VJ 2010/06/27: no-tree-pre added. It breaks ringbuffers code.
CFLAGS="$CFLAGS -fno-tree-pre"
fi
CFLAGS="$CFLAGS -Wall -fno-strict-aliasing"
CFLAGS="$CFLAGS -Wno-unused-parameter"
@ -95,7 +94,7 @@ AC_INIT(configure.ac)
# Checks for libraries.
# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h inttypes.h limits.h netdb.h poll.h signal.h stdint.h stdlib.h string.h syslog.h sys/ioctl.h sys/prctl.h sys/socket.h sys/syscall.h netinet/in.h sys/time.h unistd.h windows.h winsock2.h ws2tcpip.h])
AC_CHECK_HEADERS([arpa/inet.h inttypes.h limits.h netdb.h poll.h signal.h stdint.h stdlib.h string.h syslog.h sys/ioctl.h sys/prctl.h sys/socket.h sys/syscall.h netinet/in.h sys/time.h unistd.h windows.h winsock2.h ws2tcpip.h sched.h assert.h])
AC_CHECK_HEADERS([sys/socket.h net/if.h sys/mman.h], [], [],
[[#ifdef HAVE_SYS_SOCKET_H
#include <sys/types.h>
@ -1299,16 +1298,12 @@ AC_INIT(configure.ac)
REVISION=`cat ./revision`
CFLAGS="${CFLAGS} -DREVISION=\"${REVISION}\""
else
AC_MSG_CHECKING(git command available)
GIT=`which git`
if [ test "$GIT" != ""]; then
AC_MSG_RESULT(yes)
AC_PATH_PROG(HAVE_GIT_CMD, git, "no")
if test "$HAVE_GIT_CMD" != "no"; then
if [ test -d .git ]; then
REVISION=`git rev-parse --short HEAD`
CFLAGS="${CFLAGS} -DREVISION=\"${REVISION}\""
fi
else
AC_MSG_RESULT(no)
fi
fi

@ -25,8 +25,6 @@
#ifndef __SOURCE_IPFW_H__
#define __SOURCE_IPFW_H__
#include <pthread.h>
#define IPFW_MAX_QUEUE 16
/* per packet IPFW vars (Not used) */

@ -36,13 +36,21 @@
#define _GNU_SOURCE
#define __USE_GNU
#if HAVE_CONFIG_H
#include <config.h>
#endif
#include <stdio.h>
#include <stdint.h>
#include <stdarg.h>
#include <stdlib.h>
#include <errno.h>
#if HAVE_UNISTD_H
#include <unistd.h>
#endif
#if HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#include <limits.h>
#include <ctype.h>
#include <string.h>
@ -57,15 +65,16 @@
#include <syscall.h>
#endif
#if HAVE_SYS_TYPES_H
#include <sys/types.h> /* for gettid(2) */
#endif
#if HAVE_SCHED_H
#include <sched.h> /* for sched_setaffinity(2) */
#endif
#include <pcre.h>
#if HAVE_CONFIG_H
#include <config.h>
#endif
#ifdef HAVE_SYSLOG_H
#include <syslog.h>
#else
@ -79,7 +88,9 @@
#include "win32-service.h"
#endif /* OS_WIN32 */
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#if HAVE_POLL_H
#include <poll.h>
@ -93,7 +104,9 @@
#include <signal.h>
#endif
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#if HAVE_SYS_SOCKET_H
#include <sys/socket.h>
@ -128,8 +141,12 @@
#include <ws2tcpip.h>
#endif
#ifdef HAVE_ASSERT_H
#include <assert.h>
#define BUG_ON(x) assert(!(x))
#else
#define BUG_ON(x)
#endif
#ifdef HAVE_PCAP_H
#include <pcap.h>

Loading…
Cancel
Save