diff options
author | Julien Boeuf <jboeuf@google.com> | 2015-02-04 17:00:08 -0800 |
---|---|---|
committer | Julien Boeuf <jboeuf@google.com> | 2015-02-04 17:00:08 -0800 |
commit | 7413f108325d7965de44837704567e7ecb4f836a (patch) | |
tree | 9925bb32935fac3a965b51caa402bd70bbfa6432 | |
parent | 05618967516ca807d4deadea05e90b439c3f2e7c (diff) |
Adding linux specific env implementation.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | build.json | 1 | ||||
-rw-r--r-- | include/grpc/support/port_platform.h | 2 | ||||
-rw-r--r-- | src/core/support/env_posix.c | 7 | ||||
-rw-r--r-- | vsprojects/vs2013/gpr.vcxproj | 2 | ||||
-rw-r--r-- | vsprojects/vs2013/gpr.vcxproj.filters | 3 |
6 files changed, 10 insertions, 7 deletions
@@ -1216,6 +1216,7 @@ LIBGPR_SRC = \ src/core/support/cmdline.c \ src/core/support/cpu_linux.c \ src/core/support/cpu_posix.c \ + src/core/support/env_linux.c \ src/core/support/env_posix.c \ src/core/support/env_win32.c \ src/core/support/file.c \ @@ -1310,6 +1311,7 @@ objs/$(CONFIG)/src/core/support/cancellable.o: objs/$(CONFIG)/src/core/support/cmdline.o: objs/$(CONFIG)/src/core/support/cpu_linux.o: objs/$(CONFIG)/src/core/support/cpu_posix.o: +objs/$(CONFIG)/src/core/support/env_linux.o: objs/$(CONFIG)/src/core/support/env_posix.o: objs/$(CONFIG)/src/core/support/env_win32.o: objs/$(CONFIG)/src/core/support/file.o: diff --git a/build.json b/build.json index ea75e42a47..704c1bd36d 100644 --- a/build.json +++ b/build.json @@ -241,6 +241,7 @@ "src/core/support/cmdline.c", "src/core/support/cpu_linux.c", "src/core/support/cpu_posix.c", + "src/core/support/env_linux.c", "src/core/support/env_posix.c", "src/core/support/env_win32.c", "src/core/support/file.c", diff --git a/include/grpc/support/port_platform.h b/include/grpc/support/port_platform.h index 4ffadde450..e99099c651 100644 --- a/include/grpc/support/port_platform.h +++ b/include/grpc/support/port_platform.h @@ -76,7 +76,7 @@ #define GPR_LINUX_EVENTFD 1 #define GPR_POSIX_SOCKET 1 #define GPR_POSIX_SOCKETADDR 1 -#define GPR_POSIX_ENV 1 +#define GPR_LINUX_ENV 1 #define GPR_POSIX_FILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SYNC 1 diff --git a/src/core/support/env_posix.c b/src/core/support/env_posix.c index 79b8fcd7d7..bcbff9a177 100644 --- a/src/core/support/env_posix.c +++ b/src/core/support/env_posix.c @@ -31,11 +31,6 @@ * */ -/* for secure_getenv. */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE -#endif - #include <grpc/support/port_platform.h> #ifdef GPR_POSIX_ENV @@ -49,7 +44,7 @@ #include "src/core/support/string.h" char *gpr_getenv(const char *name) { - char *result = secure_getenv(name); + char *result = getenv(name); return result == NULL ? result : gpr_strdup(result); } diff --git a/vsprojects/vs2013/gpr.vcxproj b/vsprojects/vs2013/gpr.vcxproj index da8ab6bbf2..3cbbfc24e8 100644 --- a/vsprojects/vs2013/gpr.vcxproj +++ b/vsprojects/vs2013/gpr.vcxproj @@ -117,6 +117,8 @@ </ClCompile> <ClCompile Include="..\..\src\core\support\cpu_posix.c"> </ClCompile> + <ClCompile Include="..\..\src\core\support\env_linux.c"> + </ClCompile> <ClCompile Include="..\..\src\core\support\env_posix.c"> </ClCompile> <ClCompile Include="..\..\src\core\support\env_win32.c"> diff --git a/vsprojects/vs2013/gpr.vcxproj.filters b/vsprojects/vs2013/gpr.vcxproj.filters index 72b620a9fe..eb79b8d5ca 100644 --- a/vsprojects/vs2013/gpr.vcxproj.filters +++ b/vsprojects/vs2013/gpr.vcxproj.filters @@ -16,6 +16,9 @@ <ClCompile Include="..\..\src\core\support\cpu_posix.c"> <Filter>src\core\support</Filter> </ClCompile> + <ClCompile Include="..\..\src\core\support\env_linux.c"> + <Filter>src\core\support</Filter> + </ClCompile> <ClCompile Include="..\..\src\core\support\env_posix.c"> <Filter>src\core\support</Filter> </ClCompile> |