AC_PATH_XTRA
],
[*freebsd*],[
- AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
- AC_DEFINE_UNQUOTED(FREEBSD,1,[This is a FreeBSD system])
CFLAGS="-D_THREAD_SAFE $CFLAGS"
build_target="freebsd"
LIBPREFIX=
UNIXONLY="#"
],
[*openbsd*],[
- AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
- AC_DEFINE_UNQUOTED(OPENBSD,1,[This is an OpenBSD system])
LIBS=`echo $LIBS | sed -e "s/-ldl//"`
build_target="openbsd"
LIBPREFIX=
UNIXONLY="#"
],
[*netbsd*],[
- AC_DEFINE_UNQUOTED(SOMEBSD,1,[This is a BSD system])
- AC_DEFINE_UNQUOTED(NETBSD,1,[This is a NetBSD system])
build_target="netbsd"
LIBPREFIX=
DLLDIR=lib
#include <time.h>
#endif
#endif
-
-#ifdef SOMEBSD
+#ifdef BSD
#include <net/if.h>
#endif
-#ifdef FREEBSD
+#if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__)
#include <semaphore.h>
#endif
#ifdef DARWIN
#include <sys/mman.h>
-#ifdef FREEBSD
+/* FreeBSD_kernel is not defined on the now discontinued kFreeBSD */
+#if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__)
#define __BYTE_ORDER BYTE_ORDER
#define __BIG_ENDIAN BIG_ENDIAN
#endif
off = 0;
ip_pkt.vers_ihl = 0x45;
ip_pkt.tos = 0;
-#ifdef FREEBSD
+ /* should this be BSD only? */
+#if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__)
ip_pkt.pkt_len = sizeof(packet); /* Workaround PR kern/21737 */
#else
ip_pkt.pkt_len = htons (sizeof(packet));
off = 0;
ip_pkt.vers_ihl = 0x45;
ip_pkt.tos = 0;
-#ifdef FREEBSD
+#if defined(BSD) && defined(__FreeBSD__) && defined(__FreeBSD_kernel__)
ip_pkt.pkt_len = sizeof(packet); /* Workaround PR kern/21737 */
#else
ip_pkt.pkt_len = htons (sizeof(packet));
(GNUNET_MQ_PRIO_BACKGROUND | GNUNET_MQ_PREF_UNRELIABLE \
| GNUNET_MQ_PREF_CORK_ALLOWED)
-#if FREEBSD
+#if BSD
#define log2(a) (log (a) / log (2))
#endif
#include <kvm.h>
#endif
#endif
-#if SOMEBSD
+#if BSD
#if HAVE_KVM_H
#include <kvm.h>
#endif
return GNUNET_SYSERR;
}
-#if defined(FREEBSD) || defined(OPENBSD) || defined(DARWIN)
+#if ! defined(LINUX) || ! defined(GNU)
return fsync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK;
#else
return fdatasync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK;