Fix Pre-defined Compiler Macros
- Use #if defined() instead of ifdef. This should fix freebsd/kfreebsd detection/buildmaster
parent
5098cf7266
commit
39066554e8
|
@ -45,25 +45,25 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#ifdef __HPUX__
|
#if defined(__HPUX__)
|
||||||
# include "wormulon/hpux.h"
|
# include "wormulon/hpux.h"
|
||||||
# include "wormulon/hpux.c"
|
# include "wormulon/hpux.c"
|
||||||
#elif __APPLE__
|
#elif defined(__APPLE__)
|
||||||
# include "src/macos.h"
|
# include "src/macos.h"
|
||||||
# include "src/macos.c"
|
# include "src/macos.c"
|
||||||
#elif __FreeBSD__ || __DragonFly__ || __FreeBSD_kernel__
|
#elif (defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__))
|
||||||
# include "wormulon/freebsd.h"
|
# include "wormulon/freebsd.h"
|
||||||
# include "wormulon/freebsd.c"
|
# include "wormulon/freebsd.c"
|
||||||
#elif __linux__
|
#elif defined(__linux__)
|
||||||
# include "wormulon/linux.h"
|
# include "wormulon/linux.h"
|
||||||
# include "wormulon/linux.c"
|
# include "wormulon/linux.c"
|
||||||
#elif __OpenBSD__ || __MicroBSD__
|
#elif (defined(__OpenBSD__) || defined(__MicroBSD__))
|
||||||
# include "wormulon/openbsd.h"
|
# include "wormulon/openbsd.h"
|
||||||
# include "wormulon/openbsd.c"
|
# include "wormulon/openbsd.c"
|
||||||
#elif __NetBSD__
|
#elif defined(__NetBSD__)
|
||||||
# include "wormulon/netbsd.h"
|
# include "wormulon/netbsd.h"
|
||||||
# include "wormulon/netbsd.c"
|
# include "wormulon/netbsd.c"
|
||||||
#elif __Solaris__
|
#elif defined(__Solaris__)
|
||||||
# include "wormulon/solaris.h"
|
# include "wormulon/solaris.h"
|
||||||
# include "wormulon/solaris.c"
|
# include "wormulon/solaris.c"
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -66,29 +66,29 @@ typedef struct
|
||||||
DataStats stats;
|
DataStats stats;
|
||||||
int up;
|
int up;
|
||||||
int up_update_count;
|
int up_update_count;
|
||||||
#ifdef __HPUX__
|
#if defined(__HPUX__)
|
||||||
int wait_pcks_counter;
|
int wait_pcks_counter;
|
||||||
nmapi_logstat* if_ptr;
|
nmapi_logstat* if_ptr;
|
||||||
#elif __FreeBSD__ || __DragonFly__ || __FreeBSD_kernel__
|
#elif (defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__))
|
||||||
int watchif;
|
int watchif;
|
||||||
int dev_opened;
|
int dev_opened;
|
||||||
#elif __NetBSD__
|
#elif defined(__NetBSD__)
|
||||||
int mib_name1[6];
|
int mib_name1[6];
|
||||||
int mib_name2[6];
|
int mib_name2[6];
|
||||||
char* buf1;
|
char* buf1;
|
||||||
char* buf2;
|
char* buf2;
|
||||||
int alloc1;
|
int alloc1;
|
||||||
int alloc2;
|
int alloc2;
|
||||||
#elif __OpenBSD__ || __MicroBSD__ || __APPLE__
|
#elif (defined(__OpenBSD__) || defined(__MicroBSD__) || defined(__APPLE__))
|
||||||
int mib_name1[6];
|
int mib_name1[6];
|
||||||
int mib_name2[6];
|
int mib_name2[6];
|
||||||
char* buf1;
|
char* buf1;
|
||||||
char* buf2;
|
char* buf2;
|
||||||
int alloc1;
|
int alloc1;
|
||||||
int alloc2;
|
int alloc2;
|
||||||
#elif __linux__
|
#elif defined(__linux__)
|
||||||
FILE* proc_net_dev;
|
FILE* proc_net_dev;
|
||||||
#elif __Solaris__
|
#elif defined(__Solaris__)
|
||||||
#else
|
#else
|
||||||
#error "OS not supported"
|
#error "OS not supported"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue