diff options
Diffstat (limited to 'src/transport')
-rw-r--r-- | src/transport/gnunet-communicator-unix.c | 2 | ||||
-rw-r--r-- | src/transport/gnunet-helper-transport-bluetooth.c | 12 | ||||
-rw-r--r-- | src/transport/plugin_transport_tcp.c | 2 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp_broadcasting.c | 14 | ||||
-rw-r--r-- | src/transport/plugin_transport_unix.c | 2 | ||||
-rw-r--r-- | src/transport/tcp_connection_legacy.c | 2 | ||||
-rw-r--r-- | src/transport/tcp_service_legacy.c | 4 | ||||
-rw-r--r-- | src/transport/test_transport_api_reliability.c | 2 |
8 files changed, 20 insertions, 20 deletions
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 | |||
1382 | int | 1382 | int |
1383 | main (int argc, char *argv[]) | 1383 | main (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)) |