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
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)
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
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)
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
+++ /dev/null
-#include "libcompat.h"
-
-int
-unsetenv (const char *name CK_ATTRIBUTE_UNUSED)
-{
- assert (0);
- return 0;
-}