aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arm/gnunet-service-arm.c8
-rw-r--r--src/include/platform.h2
-rw-r--r--src/nat-auto/gnunet-nat-server.c2
-rw-r--r--src/nat-auto/gnunet-service-nat-auto.c2
-rw-r--r--src/nat/gnunet-service-nat.c2
-rw-r--r--src/nse/gnunet-service-nse.c2
-rw-r--r--src/regex/gnunet-daemon-regexprofiler.c2
-rw-r--r--src/revocation/gnunet-service-revocation.c2
-rw-r--r--src/statistics/gnunet-service-statistics.c2
-rw-r--r--src/testbed/gnunet-service-testbed_cpustatus.c12
-rw-r--r--src/topology/gnunet-daemon-topology.c2
-rw-r--r--src/transport/gnunet-communicator-unix.c2
-rw-r--r--src/transport/gnunet-helper-transport-bluetooth.c12
-rw-r--r--src/transport/plugin_transport_tcp.c2
-rw-r--r--src/transport/plugin_transport_udp_broadcasting.c14
-rw-r--r--src/transport/plugin_transport_unix.c2
-rw-r--r--src/transport/tcp_connection_legacy.c2
-rw-r--r--src/transport/tcp_service_legacy.c4
-rw-r--r--src/transport/test_transport_api_reliability.c2
-rw-r--r--src/util/disk.c2
-rw-r--r--src/util/gnunet-service-resolver.c2
-rw-r--r--src/util/network.c2
-rw-r--r--src/util/os_installation.c6
-rw-r--r--src/util/test_bio.c4
24 files changed, 47 insertions, 47 deletions
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index 01bc48960..09d85ca89 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -301,7 +301,7 @@ add_unixpath (struct sockaddr **saddrs,
301 un = GNUNET_new (struct sockaddr_un); 301 un = GNUNET_new (struct sockaddr_un);
302 un->sun_family = AF_UNIX; 302 un->sun_family = AF_UNIX;
303 GNUNET_strlcpy (un->sun_path, unixpath, sizeof(un->sun_path)); 303 GNUNET_strlcpy (un->sun_path, unixpath, sizeof(un->sun_path));
304#ifdef LINUX 304#ifdef __linux__
305 if (GNUNET_YES == abstract) 305 if (GNUNET_YES == abstract)
306 un->sun_path[0] = '\0'; 306 un->sun_path[0] = '\0';
307#endif 307#endif
@@ -455,7 +455,7 @@ get_server_addresses (const char *service_name,
455 unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath); 455 unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath);
456 LOG (GNUNET_ERROR_TYPE_INFO, _ ("Using `%s' instead\n"), unixpath); 456 LOG (GNUNET_ERROR_TYPE_INFO, _ ("Using `%s' instead\n"), unixpath);
457 } 457 }
458#ifdef LINUX 458#ifdef __linux__
459 abstract = GNUNET_CONFIGURATION_get_value_yesno (cfg, 459 abstract = GNUNET_CONFIGURATION_get_value_yesno (cfg,
460 "TESTING", 460 "TESTING",
461 "USE_ABSTRACT_SOCKETS"); 461 "USE_ABSTRACT_SOCKETS");
@@ -1081,7 +1081,7 @@ create_listen_socket (struct sockaddr *sa,
1081 return; 1081 return;
1082 } 1082 }
1083 if ((AF_UNIX == sa->sa_family) 1083 if ((AF_UNIX == sa->sa_family)
1084#ifdef LINUX 1084#ifdef __linux__
1085 /* Permission settings are not required when abstract sockets are used */ 1085 /* Permission settings are not required when abstract sockets are used */
1086 && ('\0' != ((const struct sockaddr_un *) sa)->sun_path[0]) 1086 && ('\0' != ((const struct sockaddr_un *) sa)->sun_path[0])
1087#endif 1087#endif
@@ -2188,7 +2188,7 @@ main (int argc, char *const *argv)
2188} 2188}
2189 2189
2190 2190
2191#if defined(LINUX) && defined(__GLIBC__) 2191#if defined(__linux__) && defined(__GLIBC__)
2192#include <malloc.h> 2192#include <malloc.h>
2193 2193
2194/** 2194/**
diff --git a/src/include/platform.h b/src/include/platform.h
index 976c9eac7..0cf4c9e5e 100644
--- a/src/include/platform.h
+++ b/src/include/platform.h
@@ -126,7 +126,7 @@
126#include <semaphore.h> 126#include <semaphore.h>
127#include <net/if.h> 127#include <net/if.h>
128#endif 128#endif
129#if defined(LINUX) || defined(GNU) 129#if defined(__linux__) || defined(GNU)
130#include <net/if.h> 130#include <net/if.h>
131#endif 131#endif
132#ifdef SOLARIS 132#ifdef SOLARIS
diff --git a/src/nat-auto/gnunet-nat-server.c b/src/nat-auto/gnunet-nat-server.c
index 499893c70..b462b486f 100644
--- a/src/nat-auto/gnunet-nat-server.c
+++ b/src/nat-auto/gnunet-nat-server.c
@@ -381,7 +381,7 @@ GNUNET_SERVICE_MAIN
381 GNUNET_MQ_handler_end ()); 381 GNUNET_MQ_handler_end ());
382 382
383 383
384#if defined(LINUX) && defined(__GLIBC__) 384#if defined(__linux__) && defined(__GLIBC__)
385#include <malloc.h> 385#include <malloc.h>
386 386
387/** 387/**
diff --git a/src/nat-auto/gnunet-service-nat-auto.c b/src/nat-auto/gnunet-service-nat-auto.c
index 51c82f6b3..7d7c732a0 100644
--- a/src/nat-auto/gnunet-service-nat-auto.c
+++ b/src/nat-auto/gnunet-service-nat-auto.c
@@ -468,7 +468,7 @@ GNUNET_SERVICE_MAIN
468 GNUNET_MQ_handler_end ()); 468 GNUNET_MQ_handler_end ());
469 469
470 470
471#if defined(LINUX) && defined(__GLIBC__) 471#if defined(__linux__) && defined(__GLIBC__)
472#include <malloc.h> 472#include <malloc.h>
473 473
474/** 474/**
diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c
index 9a70622c4..3b7d48c82 100644
--- a/src/nat/gnunet-service-nat.c
+++ b/src/nat/gnunet-service-nat.c
@@ -2063,7 +2063,7 @@ GNUNET_SERVICE_MAIN
2063 GNUNET_MQ_handler_end ()); 2063 GNUNET_MQ_handler_end ());
2064 2064
2065 2065
2066#if defined(LINUX) && defined(__GLIBC__) 2066#if defined(__linux__) && defined(__GLIBC__)
2067#include <malloc.h> 2067#include <malloc.h>
2068 2068
2069/** 2069/**
diff --git a/src/nse/gnunet-service-nse.c b/src/nse/gnunet-service-nse.c
index d16abed71..fa9a2e950 100644
--- a/src/nse/gnunet-service-nse.c
+++ b/src/nse/gnunet-service-nse.c
@@ -1579,7 +1579,7 @@ GNUNET_SERVICE_MAIN ("nse",
1579 GNUNET_MQ_handler_end ()); 1579 GNUNET_MQ_handler_end ());
1580 1580
1581 1581
1582#if defined(LINUX) && defined(__GLIBC__) 1582#if defined(__linux__) && defined(__GLIBC__)
1583#include <malloc.h> 1583#include <malloc.h>
1584 1584
1585/** 1585/**
diff --git a/src/regex/gnunet-daemon-regexprofiler.c b/src/regex/gnunet-daemon-regexprofiler.c
index fb061acc1..eda58fdd2 100644
--- a/src/regex/gnunet-daemon-regexprofiler.c
+++ b/src/regex/gnunet-daemon-regexprofiler.c
@@ -386,7 +386,7 @@ main (int argc, char *const *argv)
386} 386}
387 387
388 388
389#if defined(LINUX) && defined(__GLIBC__) 389#if defined(__linux__) && defined(__GLIBC__)
390#include <malloc.h> 390#include <malloc.h>
391 391
392/** 392/**
diff --git a/src/revocation/gnunet-service-revocation.c b/src/revocation/gnunet-service-revocation.c
index 456b3834a..51286f49b 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -946,7 +946,7 @@ GNUNET_SERVICE_MAIN
946 GNUNET_MQ_handler_end ()); 946 GNUNET_MQ_handler_end ());
947 947
948 948
949#if defined(LINUX) && defined(__GLIBC__) 949#if defined(__linux__) && defined(__GLIBC__)
950#include <malloc.h> 950#include <malloc.h>
951 951
952/** 952/**
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c
index ba6a614c8..5d58c3743 100644
--- a/src/statistics/gnunet-service-statistics.c
+++ b/src/statistics/gnunet-service-statistics.c
@@ -1042,7 +1042,7 @@ GNUNET_SERVICE_MAIN (
1042 GNUNET_MQ_handler_end ()); 1042 GNUNET_MQ_handler_end ());
1043 1043
1044 1044
1045#if defined(LINUX) && defined(__GLIBC__) 1045#if defined(__linux__) && defined(__GLIBC__)
1046#include <malloc.h> 1046#include <malloc.h>
1047 1047
1048/** 1048/**
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c
index 5eaeaf952..cd1878467 100644
--- a/src/testbed/gnunet-service-testbed_cpustatus.c
+++ b/src/testbed/gnunet-service-testbed_cpustatus.c
@@ -57,7 +57,7 @@ static processor_cpu_load_info_t prev_cpu_load;
57 57
58#define DEBUG_STATUSCALLS GNUNET_NO 58#define DEBUG_STATUSCALLS GNUNET_NO
59 59
60#ifdef LINUX 60#ifdef __linux__
61static FILE *proc_stat; 61static FILE *proc_stat;
62#endif 62#endif
63 63
@@ -133,7 +133,7 @@ updateUsage ()
133{ 133{
134 currentIOLoad = -1; 134 currentIOLoad = -1;
135 currentCPULoad = -1; 135 currentCPULoad = -1;
136#ifdef LINUX 136#ifdef __linux__
137 /* under linux, first try %idle/usage using /proc/stat; 137 /* under linux, first try %idle/usage using /proc/stat;
138 if that does not work, disable /proc/stat for the future 138 if that does not work, disable /proc/stat for the future
139 by closing the file and use the next-best method. */ 139 by closing the file and use the next-best method. */
@@ -509,7 +509,7 @@ mem_get_usage ()
509} 509}
510 510
511 511
512#ifdef LINUX 512#ifdef __linux__
513#include <dirent.h> 513#include <dirent.h>
514/** 514/**
515 * Returns the number of processes 515 * Returns the number of processes
@@ -557,7 +557,7 @@ sample_load_task (void *cls)
557 if ((-1 == ld_cpu) || (-1 == ld_disk)) 557 if ((-1 == ld_cpu) || (-1 == ld_disk))
558 goto reschedule; 558 goto reschedule;
559 mem_usage = mem_get_usage (); 559 mem_usage = mem_get_usage ();
560#ifdef LINUX 560#ifdef __linux__
561 nproc = get_nproc (); 561 nproc = get_nproc ();
562#else 562#else
563 nproc = 0; 563 nproc = 0;
@@ -622,7 +622,7 @@ GST_stats_init (const struct GNUNET_CONFIGURATION_Handle *cfg)
622 } 622 }
623 GNUNET_free (fn); 623 GNUNET_free (fn);
624 sample_load_task_id = GNUNET_SCHEDULER_add_now (&sample_load_task, NULL); 624 sample_load_task_id = GNUNET_SCHEDULER_add_now (&sample_load_task, NULL);
625#ifdef LINUX 625#ifdef __linux__
626 proc_stat = fopen ("/proc/stat", "r"); 626 proc_stat = fopen ("/proc/stat", "r");
627 if (NULL == proc_stat) 627 if (NULL == proc_stat)
628 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, 628 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING,
@@ -642,7 +642,7 @@ GST_stats_destroy ()
642{ 642{
643 if (NULL == bw) 643 if (NULL == bw)
644 return; 644 return;
645#ifdef LINUX 645#ifdef __linux__
646 if (proc_stat != NULL) 646 if (proc_stat != NULL)
647 { 647 {
648 fclose (proc_stat); 648 fclose (proc_stat);
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index 1b6004392..261d825ea 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -1135,7 +1135,7 @@ main (int argc, char *const *argv)
1135} 1135}
1136 1136
1137 1137
1138#if defined(LINUX) && defined(__GLIBC__) 1138#if defined(__linux__) && defined(__GLIBC__)
1139#include <malloc.h> 1139#include <malloc.h>
1140 1140
1141/** 1141/**
diff --git a/src/transport/gnunet-communicator-unix.c b/src/transport/gnunet-communicator-unix.c
index 2cfb802e3..58a144ecb 100644
--- a/src/transport/gnunet-communicator-unix.c
+++ b/src/transport/gnunet-communicator-unix.c
@@ -1105,7 +1105,7 @@ main (int argc, char *const *argv)
1105} 1105}
1106 1106
1107 1107
1108#if defined(LINUX) && defined(__GLIBC__) 1108#if defined(__linux__) && defined(__GLIBC__)
1109#include <malloc.h> 1109#include <malloc.h>
1110 1110
1111/** 1111/**
diff --git a/src/transport/gnunet-helper-transport-bluetooth.c b/src/transport/gnunet-helper-transport-bluetooth.c
index 74806e630..975af7068 100644
--- a/src/transport/gnunet-helper-transport-bluetooth.c
+++ b/src/transport/gnunet-helper-transport-bluetooth.c
@@ -115,7 +115,7 @@ struct SendBuffer
115 char buf[MAXLINE * 2]; 115 char buf[MAXLINE * 2];
116}; 116};
117 117
118#ifdef LINUX 118#ifdef __linux__
119/** 119/**
120 * Devices buffer used to keep a list with all the discoverable devices in 120 * Devices buffer used to keep a list with all the discoverable devices in
121 * order to send them HELLO messages one by one when it receive a broadcast message. 121 * order to send them HELLO messages one by one when it receive a broadcast message.
@@ -567,7 +567,7 @@ check_crc_buf_osdep (const unsigned char *buf, size_t len)
567 567
568 568
569/* ************** end of clone ***************** */ 569/* ************** end of clone ***************** */
570#ifdef LINUX 570#ifdef __linux__
571/** 571/**
572 * Function for assigning a port number 572 * Function for assigning a port number
573 * 573 *
@@ -795,7 +795,7 @@ read_from_the_socket (void *sock,
795 return -1; 795 return -1;
796 } 796 }
797 797
798 #ifdef LINUX 798 #ifdef __linux__
799 /* Get the channel used */ 799 /* Get the channel used */
800 int len; 800 int len;
801 struct sockaddr_rc rc_addr = { 0 }; 801 struct sockaddr_rc rc_addr = { 0 };
@@ -1012,7 +1012,7 @@ mac_set (struct GNUNET_TRANSPORT_WLAN_Ieee80211Frame *taIeeeHeader,
1012} 1012}
1013 1013
1014 1014
1015#ifdef LINUX 1015#ifdef __linux__
1016/** 1016/**
1017 * Test if the given interface name really corresponds to a bluetooth 1017 * Test if the given interface name really corresponds to a bluetooth
1018 * device. 1018 * device.
@@ -1117,7 +1117,7 @@ stdin_send_hw (void *cls, const struct GNUNET_MessageHeader *hdr)
1117} 1117}
1118 1118
1119 1119
1120#ifdef LINUX 1120#ifdef __linux__
1121/** 1121/**
1122 * Broadcast a HELLO message for peer discovery 1122 * Broadcast a HELLO message for peer discovery
1123 * 1123 *
@@ -1382,7 +1382,7 @@ inquiry_devices: // skip the conditions and force a inquiry for new devices
1382int 1382int
1383main (int argc, char *argv[]) 1383main (int argc, char *argv[])
1384{ 1384{
1385#ifdef LINUX 1385#ifdef __linux__
1386 struct HardwareInfos dev; 1386 struct HardwareInfos dev;
1387 char readbuf[MAXLINE]; 1387 char readbuf[MAXLINE];
1388 int maxfd; 1388 int maxfd;
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index ad0766af9..4cec181b0 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -1166,7 +1166,7 @@ get_server_addresses (const char *service_name,
1166 unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath); 1166 unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath);
1167 LOG (GNUNET_ERROR_TYPE_INFO, _ ("Using `%s' instead\n"), unixpath); 1167 LOG (GNUNET_ERROR_TYPE_INFO, _ ("Using `%s' instead\n"), unixpath);
1168 } 1168 }
1169#ifdef LINUX 1169#ifdef __linux__
1170 abstract = GNUNET_CONFIGURATION_get_value_yesno (cfg, 1170 abstract = GNUNET_CONFIGURATION_get_value_yesno (cfg,
1171 "TESTING", 1171 "TESTING",
1172 "USE_ABSTRACT_SOCKETS"); 1172 "USE_ABSTRACT_SOCKETS");
diff --git a/src/transport/plugin_transport_udp_broadcasting.c b/src/transport/plugin_transport_udp_broadcasting.c
index c85124b68..5e72fad09 100644
--- a/src/transport/plugin_transport_udp_broadcasting.c
+++ b/src/transport/plugin_transport_udp_broadcasting.c
@@ -41,7 +41,7 @@
41#define LOG(kind, ...) GNUNET_log_from (kind, "transport-udp", __VA_ARGS__) 41#define LOG(kind, ...) GNUNET_log_from (kind, "transport-udp", __VA_ARGS__)
42 42
43/* *********** Cryogenic ********** */ 43/* *********** Cryogenic ********** */
44#if LINUX 44#if __linux__
45#include <sys/stat.h> 45#include <sys/stat.h>
46#include <fcntl.h> 46#include <fcntl.h>
47 47
@@ -92,7 +92,7 @@ struct BroadcastAddress
92 92
93 socklen_t addrlen; 93 socklen_t addrlen;
94 94
95#if LINUX 95#if __linux__
96 /** 96 /**
97 * Cryogenic handle. 97 * Cryogenic handle.
98 */ 98 */
@@ -277,7 +277,7 @@ udp_ipv4_broadcast_send (void *cls)
277 } 277 }
278 } 278 }
279 279
280#if LINUX 280#if __linux__
281 /* 281 /*
282 * Cryogenic 282 * Cryogenic
283 */ 283 */
@@ -359,7 +359,7 @@ udp_ipv6_broadcast_send (void *cls)
359 GNUNET_a2s ((const struct sockaddr *) &plugin->ipv6_multicast_address, 359 GNUNET_a2s ((const struct sockaddr *) &plugin->ipv6_multicast_address,
360 sizeof(struct sockaddr_in6))); 360 sizeof(struct sockaddr_in6)));
361 } 361 }
362#if LINUX 362#if __linux__
363 /* 363 /*
364 * Cryogenic 364 * Cryogenic
365 */ 365 */
@@ -448,7 +448,7 @@ iface_proc (void *cls,
448 (NULL != plugin->sockv4) && 448 (NULL != plugin->sockv4) &&
449 (addrlen == sizeof(struct sockaddr_in))) 449 (addrlen == sizeof(struct sockaddr_in)))
450 { 450 {
451#if LINUX 451#if __linux__
452 /* 452 /*
453 * setup Cryogenic FD for ipv4 broadcasting 453 * setup Cryogenic FD for ipv4 broadcasting
454 */ 454 */
@@ -503,7 +503,7 @@ iface_proc (void *cls,
503 } 503 }
504 else 504 else
505 { 505 {
506#if LINUX 506#if __linux__
507 /* 507 /*
508 * setup Cryogenic FD for ipv6 broadcasting 508 * setup Cryogenic FD for ipv6 broadcasting
509 */ 509 */
@@ -632,7 +632,7 @@ stop_broadcast (struct Plugin *plugin)
632 } 632 }
633 } 633 }
634 634
635#if LINUX 635#if __linux__
636 GNUNET_DISK_file_close (p->cryogenic_fd); 636 GNUNET_DISK_file_close (p->cryogenic_fd);
637#endif 637#endif
638 GNUNET_CONTAINER_DLL_remove (plugin->broadcast_head, 638 GNUNET_CONTAINER_DLL_remove (plugin->broadcast_head,
diff --git a/src/transport/plugin_transport_unix.c b/src/transport/plugin_transport_unix.c
index 083a1cf7f..9d3e7d354 100644
--- a/src/transport/plugin_transport_unix.c
+++ b/src/transport/plugin_transport_unix.c
@@ -1755,7 +1755,7 @@ libgnunet_plugin_transport_unix_init (void *cls)
1755 plugin->env = env; 1755 plugin->env = env;
1756 1756
1757 /* Initialize my flags */ 1757 /* Initialize my flags */
1758#ifdef LINUX 1758#ifdef __linux__
1759 plugin->is_abstract = 1759 plugin->is_abstract =
1760 GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg, 1760 GNUNET_CONFIGURATION_get_value_yesno (plugin->env->cfg,
1761 "testing", 1761 "testing",
diff --git a/src/transport/tcp_connection_legacy.c b/src/transport/tcp_connection_legacy.c
index 8eea664c4..4e8c8140d 100644
--- a/src/transport/tcp_connection_legacy.c
+++ b/src/transport/tcp_connection_legacy.c
@@ -876,7 +876,7 @@ GNUNET_CONNECTION_create_from_connect_to_unixpath (
876 un = GNUNET_new (struct sockaddr_un); 876 un = GNUNET_new (struct sockaddr_un);
877 un->sun_family = AF_UNIX; 877 un->sun_family = AF_UNIX;
878 GNUNET_strlcpy (un->sun_path, unixpath, sizeof(un->sun_path)); 878 GNUNET_strlcpy (un->sun_path, unixpath, sizeof(un->sun_path));
879#ifdef LINUX 879#ifdef __linux__
880 { 880 {
881 int abstract; 881 int abstract;
882 882
diff --git a/src/transport/tcp_service_legacy.c b/src/transport/tcp_service_legacy.c
index 54020b642..f207863f9 100644
--- a/src/transport/tcp_service_legacy.c
+++ b/src/transport/tcp_service_legacy.c
@@ -482,7 +482,7 @@ add_unixpath (struct sockaddr **saddrs,
482 un = GNUNET_new (struct sockaddr_un); 482 un = GNUNET_new (struct sockaddr_un);
483 un->sun_family = AF_UNIX; 483 un->sun_family = AF_UNIX;
484 GNUNET_strlcpy (un->sun_path, unixpath, sizeof(un->sun_path)); 484 GNUNET_strlcpy (un->sun_path, unixpath, sizeof(un->sun_path));
485#ifdef LINUX 485#ifdef __linux__
486 if (GNUNET_YES == abstract) 486 if (GNUNET_YES == abstract)
487 un->sun_path[0] = '\0'; 487 un->sun_path[0] = '\0';
488#endif 488#endif
@@ -637,7 +637,7 @@ LEGACY_SERVICE_get_server_addresses (
637 unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath); 637 unixpath = GNUNET_NETWORK_shorten_unixpath (unixpath);
638 LOG (GNUNET_ERROR_TYPE_INFO, _ ("Using `%s' instead\n"), unixpath); 638 LOG (GNUNET_ERROR_TYPE_INFO, _ ("Using `%s' instead\n"), unixpath);
639 } 639 }
640#ifdef LINUX 640#ifdef __linux__
641 abstract = GNUNET_CONFIGURATION_get_value_yesno (cfg, 641 abstract = GNUNET_CONFIGURATION_get_value_yesno (cfg,
642 "TESTING", 642 "TESTING",
643 "USE_ABSTRACT_SOCKETS"); 643 "USE_ABSTRACT_SOCKETS");
diff --git a/src/transport/test_transport_api_reliability.c b/src/transport/test_transport_api_reliability.c
index d8fd2046d..058d7d8bf 100644
--- a/src/transport/test_transport_api_reliability.c
+++ b/src/transport/test_transport_api_reliability.c
@@ -89,7 +89,7 @@ get_size (unsigned int iter)
89 size_t ret; 89 size_t ret;
90 90
91 ret = (iter * iter * iter); 91 ret = (iter * iter * iter);
92#ifndef LINUX 92#ifndef __linux__
93 /* FreeBSD/OSX etc. Unix DGRAMs do not work 93 /* FreeBSD/OSX etc. Unix DGRAMs do not work
94 * with large messages */ 94 * with large messages */
95 if (0 == strcmp ("unix", ccc->test_plugin)) 95 if (0 == strcmp ("unix", ccc->test_plugin))
diff --git a/src/util/disk.c b/src/util/disk.c
index 866dbc301..2d5e353c8 100644
--- a/src/util/disk.c
+++ b/src/util/disk.c
@@ -1505,7 +1505,7 @@ GNUNET_DISK_file_sync (const struct GNUNET_DISK_FileHandle *h)
1505 return GNUNET_SYSERR; 1505 return GNUNET_SYSERR;
1506 } 1506 }
1507 1507
1508#if ! defined(LINUX) || ! defined(GNU) 1508#if ! defined(__linux__) || ! defined(GNU)
1509 return fsync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK; 1509 return fsync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK;
1510#else 1510#else
1511 return fdatasync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK; 1511 return fdatasync (h->fd) == -1 ? GNUNET_SYSERR : GNUNET_OK;
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c
index c82a18ab8..357453da7 100644
--- a/src/util/gnunet-service-resolver.c
+++ b/src/util/gnunet-service-resolver.c
@@ -1362,7 +1362,7 @@ GNUNET_SERVICE_MAIN (
1362 GNUNET_MQ_handler_end ()); 1362 GNUNET_MQ_handler_end ());
1363 1363
1364 1364
1365#if defined(LINUX) && defined(__GLIBC__) 1365#if defined(__linux__) && defined(__GLIBC__)
1366#include <malloc.h> 1366#include <malloc.h>
1367 1367
1368/** 1368/**
diff --git a/src/util/network.c b/src/util/network.c
index 2b407d97c..52ae3d2c7 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -962,7 +962,7 @@ GNUNET_NETWORK_socket_disable_corking (struct GNUNET_NETWORK_Handle *desc)
962{ 962{
963 int ret = 0; 963 int ret = 0;
964 964
965#if LINUX 965#if __linux__
966 int value = 0; 966 int value = 0;
967 967
968 if (0 != 968 if (0 !=
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index 7aa4d1254..846ceeeec 100644
--- a/src/util/os_installation.c
+++ b/src/util/os_installation.c
@@ -134,7 +134,7 @@ GNUNET_OS_init (const struct GNUNET_OS_ProjectData *pd)
134} 134}
135 135
136 136
137#if LINUX 137#if __linux__
138/** 138/**
139 * Try to determine path by reading /proc/PID/exe 139 * Try to determine path by reading /proc/PID/exe
140 * 140 *
@@ -383,7 +383,7 @@ os_get_gnunet_path ()
383 383
384 if (NULL != (ret = get_path_from_GNUNET_PREFIX ())) 384 if (NULL != (ret = get_path_from_GNUNET_PREFIX ()))
385 return ret; 385 return ret;
386#if LINUX 386#if __linux__
387 if (NULL != (ret = get_path_from_proc_maps ())) 387 if (NULL != (ret = get_path_from_proc_maps ()))
388 return ret; 388 return ret;
389 /* try path *first*, before /proc/exe, as /proc/exe can be wrong */ 389 /* try path *first*, before /proc/exe, as /proc/exe can be wrong */
@@ -421,7 +421,7 @@ os_get_exec_path ()
421{ 421{
422 char *ret = NULL; 422 char *ret = NULL;
423 423
424#if LINUX 424#if __linux__
425 if (NULL != (ret = get_path_from_proc_exe ())) 425 if (NULL != (ret = get_path_from_proc_exe ()))
426 return ret; 426 return ret;
427#endif 427#endif
diff --git a/src/util/test_bio.c b/src/util/test_bio.c
index 8ff93c168..13ae1cf56 100644
--- a/src/util/test_bio.c
+++ b/src/util/test_bio.c
@@ -200,7 +200,7 @@ test_bigmeta_rw ()
200static int 200static int
201test_directory_r () 201test_directory_r ()
202{ 202{
203#if LINUX 203#if __linux__
204 char *msg; 204 char *msg;
205 char readResult[200]; 205 char readResult[200];
206 struct GNUNET_BIO_ReadHandle *fileR; 206 struct GNUNET_BIO_ReadHandle *fileR;
@@ -244,7 +244,7 @@ test_nullfile_rw ()
244static int 244static int
245test_fullfile_rw () 245test_fullfile_rw ()
246{ 246{
247#ifdef LINUX 247#ifdef __linux__
248 /* /dev/full only seems to exist on Linux */ 248 /* /dev/full only seems to exist on Linux */
249 char *msg; 249 char *msg;
250 int64_t testNum; 250 int64_t testNum;