Better fixes for compiling on FreeBSD and OpenBSD.

This commit is contained in:
crs 2004-05-01 12:11:28 +00:00
parent 975d888d65
commit 320cc754a2
3 changed files with 16 additions and 11 deletions

View File

@ -66,8 +66,15 @@ ac_ext=cpp
dnl check compiler
ACX_CHECK_CXX
dnl macros we should do testing with
dnl different platforms have somewhat incompatible requirements for
dnl BSD and Posix macros.
case $host in
*-*-openbsd* | *-*-freebsd*)
;;
*)
CXXFLAGS="$CXXFLAGS -D_BSD_SOURCE -D_XOPEN_SOURCE=500"
;;
esac
dnl checks for libraries
if test x"$acx_host_arch" = xUNIX; then

View File

@ -43,6 +43,10 @@
# endif
#endif
#if !HAVE_INET_ATON
# include <stdio.h>
#endif
#if HAVE_ALLOCA_H
# define freea(x_)
#else

View File

@ -67,12 +67,6 @@
#define __FP__
#endif
// Need this on FreeBSD to get nanosleep. We can't define this on, say,
// Linux because that unconditionally defines it.
#if defined(__FreeBSD__)
#define _POSIX_VERSION 199506L
#endif
// define NULL
#ifndef NULL
#define NULL 0