aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-13 15:48:57 -0800
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-02-13 15:48:57 -0800
commit44cdd6ec1af7bb761274ded521dbc14dc8721157 (patch)
treeddd29ad70eb1df3bd5e0a5e8cc61ae4ff23d0ddf /src/core
parent3609f786fd99aa825fea1491decac3131c52110e (diff)
parentfbdd7abdca3a22b70576ab359f42710765735188 (diff)
Merge pull request #522 from nicolasnoble/posix
Cleaning up our posix definition / usage.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/iomgr/socket_utils_linux.c5
-rw-r--r--src/core/support/file_posix.c13
-rw-r--r--src/core/support/log_posix.c10
-rw-r--r--src/core/support/string_posix.c7
-rw-r--r--src/core/support/sync_posix.c7
-rw-r--r--src/core/support/time_posix.c8
6 files changed, 1 insertions, 49 deletions
diff --git a/src/core/iomgr/socket_utils_linux.c b/src/core/iomgr/socket_utils_linux.c
index 7ef58940c2..f3c22187d7 100644
--- a/src/core/iomgr/socket_utils_linux.c
+++ b/src/core/iomgr/socket_utils_linux.c
@@ -31,12 +31,9 @@
*
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <grpc/support/port_platform.h>
-#ifdef GPR_LINUX
+#ifdef GPR_LINUX_SOCKETUTILS
#include "src/core/iomgr/socket_utils_posix.h"
diff --git a/src/core/support/file_posix.c b/src/core/support/file_posix.c
index cb48b3d52f..e1765666db 100644
--- a/src/core/support/file_posix.c
+++ b/src/core/support/file_posix.c
@@ -31,19 +31,6 @@
*
*/
-/* Posix code for gpr fdopen and mkstemp support. */
-
-#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 200112L
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 200112L
-#endif
-
-/* Don't know why I have to do this for mkstemp, looks like _POSIX_C_SOURCE
- should be enough... */
-#ifndef _BSD_SOURCE
-#define _BSD_SOURCE
-#endif
-
#include <grpc/support/port_platform.h>
#ifdef GPR_POSIX_FILE
diff --git a/src/core/support/log_posix.c b/src/core/support/log_posix.c
index 05f45de130..36479baeed 100644
--- a/src/core/support/log_posix.c
+++ b/src/core/support/log_posix.c
@@ -31,16 +31,6 @@
*
*/
-#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 200112L
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 200112L
-#endif
-
-/* FIXME: "posix" files probably shouldn't depend on _GNU_SOURCE */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include <grpc/support/port_platform.h>
#if defined(GPR_POSIX_LOG)
diff --git a/src/core/support/string_posix.c b/src/core/support/string_posix.c
index a6bb8058e6..b6f0cd4af0 100644
--- a/src/core/support/string_posix.c
+++ b/src/core/support/string_posix.c
@@ -31,13 +31,6 @@
*
*/
-/* Posix code for gpr snprintf support. */
-
-#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 200112L
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 200112L
-#endif
-
#include <grpc/support/port_platform.h>
#ifdef GPR_POSIX_STRING
diff --git a/src/core/support/sync_posix.c b/src/core/support/sync_posix.c
index a28a4c6bf4..94fc1b0bec 100644
--- a/src/core/support/sync_posix.c
+++ b/src/core/support/sync_posix.c
@@ -31,13 +31,6 @@
*
*/
-/* Posix gpr synchroization support code. */
-
-#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 199309L
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 199309L
-#endif
-
#include <grpc/support/port_platform.h>
#ifdef GPR_POSIX_SYNC
diff --git a/src/core/support/time_posix.c b/src/core/support/time_posix.c
index 3f2a81ec05..4af537d974 100644
--- a/src/core/support/time_posix.c
+++ b/src/core/support/time_posix.c
@@ -31,14 +31,6 @@
*
*/
-/* Posix code for gpr time support. */
-
-/* So we get nanosleep and clock_* */
-#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 199309L
-#undef _POSIX_C_SOURCE
-#define _POSIX_C_SOURCE 199309L
-#endif
-
#include <grpc/support/port_platform.h>
#ifdef GPR_POSIX_TIME