[Xfce4-commits] [panel-plugins/xfce4-netload-plugin] 01/01: Fix Pre-defined Compiler Macros
noreply at xfce.org
noreply at xfce.org
Thu Nov 2 23:20:19 CET 2017
This is an automated email from the git hooks/post-receive script.
s k u n n y k p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-netload-plugin.
commit 39066554e8436d9e3dae646415c0544192612ee0
Author: Skunnyk <skunnyk at alteroot.org>
Date: Thu Nov 2 23:18:42 2017 +0100
Fix Pre-defined Compiler Macros
- Use #if defined() instead of ifdef. This should fix freebsd/kfreebsd detection/build
---
panel-plugin/net.c | 14 +++++++-------
panel-plugin/net.h | 12 ++++++------
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/panel-plugin/net.c b/panel-plugin/net.c
index 6e8276c..fde4ab1 100644
--- a/panel-plugin/net.c
+++ b/panel-plugin/net.c
@@ -45,25 +45,25 @@
#include <sys/types.h>
#include <errno.h>
-#ifdef __HPUX__
+#if defined(__HPUX__)
# include "wormulon/hpux.h"
# include "wormulon/hpux.c"
-#elif __APPLE__
+#elif defined(__APPLE__)
# include "src/macos.h"
# include "src/macos.c"
-#elif __FreeBSD__ || __DragonFly__ || __FreeBSD_kernel__
+#elif (defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__))
# include "wormulon/freebsd.h"
# include "wormulon/freebsd.c"
-#elif __linux__
+#elif defined(__linux__)
# include "wormulon/linux.h"
# include "wormulon/linux.c"
-#elif __OpenBSD__ || __MicroBSD__
+#elif (defined(__OpenBSD__) || defined(__MicroBSD__))
# include "wormulon/openbsd.h"
# include "wormulon/openbsd.c"
-#elif __NetBSD__
+#elif defined(__NetBSD__)
# include "wormulon/netbsd.h"
# include "wormulon/netbsd.c"
-#elif __Solaris__
+#elif defined(__Solaris__)
# include "wormulon/solaris.h"
# include "wormulon/solaris.c"
#else
diff --git a/panel-plugin/net.h b/panel-plugin/net.h
index a268088..4c17e46 100644
--- a/panel-plugin/net.h
+++ b/panel-plugin/net.h
@@ -66,29 +66,29 @@ typedef struct
DataStats stats;
int up;
int up_update_count;
-#ifdef __HPUX__
+#if defined(__HPUX__)
int wait_pcks_counter;
nmapi_logstat* if_ptr;
-#elif __FreeBSD__ || __DragonFly__ || __FreeBSD_kernel__
+#elif (defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__))
int watchif;
int dev_opened;
-#elif __NetBSD__
+#elif defined(__NetBSD__)
int mib_name1[6];
int mib_name2[6];
char* buf1;
char* buf2;
int alloc1;
int alloc2;
-#elif __OpenBSD__ || __MicroBSD__ || __APPLE__
+#elif (defined(__OpenBSD__) || defined(__MicroBSD__) || defined(__APPLE__))
int mib_name1[6];
int mib_name2[6];
char* buf1;
char* buf2;
int alloc1;
int alloc2;
-#elif __linux__
+#elif defined(__linux__)
FILE* proc_net_dev;
-#elif __Solaris__
+#elif defined(__Solaris__)
#else
#error "OS not supported"
#endif
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list