]> granicus.if.org Git - check/commitdiff
libcompat: remove unsetenv replacement
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Thu, 2 Jan 2014 02:42:37 +0000 (02:42 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Thu, 2 Jan 2014 02:42:37 +0000 (02:42 +0000)
no system to date has been found that provides setenv
but not unsetenv. If setenv is unavailable, all related
tests are disabled at compile time. This stub replacement
does not serve any purpose. If in the future a system
with unsetenv is found that does provide setenv, then
the unit tests will need to disable all tests that
require unsetenv.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@987 64e312b2-a51f-0410-8e61-82d0ca0eb02a

CMakeLists.txt
configure.ac
lib/CMakeLists.txt
lib/libcompat.h
lib/unsetenv.c [deleted file]

index 7bdd6934c3d9241589c1934dd1d24509f598c921..90ae92cf013b54fb59a0136571528260c31b1530 100644 (file)
@@ -109,7 +109,6 @@ check_function_exists(snprintf HAVE_SNPRINTF)
 check_function_exists(strdup HAVE_DECL_STRDUP)
 check_function_exists(strerror HAVE_STRERROR)
 check_function_exists(strsignal HAVE_DECL_STRSIGNAL)
-check_function_exists(unsetenv HAVE_DECL_UNSETENV)
 check_function_exists(_getpid HAVE__GETPID)
 check_function_exists(_localtime64_s HAVE__LOCALTIME64_S)
 check_function_exists(_strdup HAVE__STRDUP)
index 9639f3f379ebac1304bf2804cbf40d412294479c..8760502f97648fc760e2f6d35c9b96615be48a4d 100644 (file)
@@ -267,8 +267,8 @@ AC_FUNC_REALLOC
 HW_LIBRT_TIMERS
 
 # The following checks will replace missing functions from libcompat
-AC_REPLACE_FUNCS([alarm clock_gettime gettimeofday localtime_r sleep strdup strsignal unsetenv])
-AC_CHECK_DECLS([alarm, clock_gettime, gettimeofday, localtime_r, sleep, strdup, strsignal, unsetenv])
+AC_REPLACE_FUNCS([alarm clock_gettime gettimeofday localtime_r sleep strdup strsignal])
+AC_CHECK_DECLS([alarm, clock_gettime, gettimeofday, localtime_r, sleep, strdup, strsignal])
 
 # The following checks are to only detect if the functions exist, but
 # not replace them
index 26b0ab24517b1bd37b4b118b8a22f2ee0c95ba99..4270039a14afbf6751d00eabc286b59c3ce26a34 100644 (file)
@@ -64,11 +64,6 @@ if(NOT HAVE_DECL_STRSIGNAL)
   set(SOURCES ${SOURCES} strsignal.c)
 endif(NOT HAVE_DECL_STRSIGNAL)
 
-if(NOT HAVE_DECL_UNSETENV)
-  set(SOURCES ${SOURCES} unsetenv.c)
-endif(NOT HAVE_DECL_UNSETENV)
-
-
 
 set(HEADERS libcompat.h)
 
index 6ee9d995316b08785ce8bca23f6279b66e1b3da7..7a842e0f90e0ec41554656e2dc91824a9c70c859 100644 (file)
@@ -120,10 +120,6 @@ CK_DLL_EXP char *strdup (const char *str);
 CK_DLL_EXP const char *strsignal (int sig);
 #endif /* !HAVE_DECL_STRSIGNAL */
 
-#if !HAVE_DECL_UNSETENV
-CK_DLL_EXP int unsetenv (const char *name);
-#endif /* !HAVE_DECL_UNSETENV */
-
 /* 
  * On systems where clock_gettime() is not available, or
  * on systems where some clocks may not be supported, the
diff --git a/lib/unsetenv.c b/lib/unsetenv.c
deleted file mode 100644 (file)
index 4375c1f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "libcompat.h"
-
-int
-unsetenv (const char *name CK_ATTRIBUTE_UNUSED)
-{
-    assert (0);
-    return 0;
-}