From ed6f3f1786d7aac384e267cdcfbdf566d598258a Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Mon, 29 Nov 2021 17:31:58 -0600 Subject: [PATCH] autoconf: Remove unused tests --- cf/Makefile.am.common | 2 -- cf/capabilities.m4 | 14 ---------- cf/krb-func-getcwd-broken.m4 | 41 ----------------------------- cf/roken-frag.m4 | 7 ----- configure.ac | 30 --------------------- include/config.h.w32 | 51 ------------------------------------ 6 files changed, 145 deletions(-) delete mode 100644 cf/capabilities.m4 delete mode 100644 cf/krb-func-getcwd-broken.m4 diff --git a/cf/Makefile.am.common b/cf/Makefile.am.common index a81f3681d..1b134f5b7 100644 --- a/cf/Makefile.am.common +++ b/cf/Makefile.am.common @@ -31,8 +31,6 @@ LIB_gethostbyname = @LIB_gethostbyname@ LIB_getpwent_r = @LIB_getpwent_r@ LIB_getpwnam_r = @LIB_getpwnam_r@ LIB_getsockopt = @LIB_getsockopt@ -LIB_logout = @LIB_logout@ -LIB_logwtmp = @LIB_logwtmp@ LIB_odm_initialize = @LIB_odm_initialize@ LIB_openpty = @LIB_openpty@ LIB_pidfile = @LIB_pidfile@ diff --git a/cf/capabilities.m4 b/cf/capabilities.m4 deleted file mode 100644 index 4178b3c0a..000000000 --- a/cf/capabilities.m4 +++ /dev/null @@ -1,14 +0,0 @@ -dnl -dnl $Id$ -dnl - -dnl -dnl Test SGI capabilities -dnl - -AC_DEFUN([KRB_CAPABILITIES],[ - -AC_CHECK_HEADERS(capability.h sys/capability.h) - -AC_CHECK_FUNCS(sgi_getcapabilitybyname cap_set_proc) -]) diff --git a/cf/krb-func-getcwd-broken.m4 b/cf/krb-func-getcwd-broken.m4 deleted file mode 100644 index 08b079351..000000000 --- a/cf/krb-func-getcwd-broken.m4 +++ /dev/null @@ -1,41 +0,0 @@ -dnl $Id$ -dnl -dnl -dnl test for broken getcwd in (SunOS braindamage) -dnl - -AC_DEFUN([AC_KRB_FUNC_GETCWD_BROKEN], [ -if test "$ac_cv_func_getcwd" = yes; then -AC_MSG_CHECKING(if getcwd is broken) -AC_CACHE_VAL(ac_cv_func_getcwd_broken, [ -ac_cv_func_getcwd_broken=no - -AC_RUN_IFELSE([AC_LANG_SOURCE([[ -#include -char *getcwd(char*, int); - -void *popen(char *cmd, char *mode) -{ - errno = ENOTTY; - return 0; -} - -int main(int argc, char **argv) -{ - char *ret; - ret = getcwd(0, 1024); - if(ret == 0 && errno == ENOTTY) - return 0; - return 1; -} -]])], [ac_cv_func_getcwd_broken=yes],[:],[:]) -]) -if test "$ac_cv_func_getcwd_broken" = yes; then - AC_DEFINE(BROKEN_GETCWD, 1, [Define if getcwd is broken (like in SunOS 4).])dnl - AC_LIBOBJ(getcwd) - AC_MSG_RESULT($ac_cv_func_getcwd_broken) -else - AC_MSG_RESULT([seems ok]) -fi -fi -]) diff --git a/cf/roken-frag.m4 b/cf/roken-frag.m4 index 0557acfa2..1dfcb1860 100644 --- a/cf/roken-frag.m4 +++ b/cf/roken-frag.m4 @@ -170,10 +170,6 @@ AM_CONDITIONAL(have_vis_h, test "$ac_cv_header_vis_h" = yes) dnl Check for functions and libraries -AC_FIND_FUNC(socket, socket) -AC_FIND_FUNC(gethostbyname, nsl) -AC_FIND_FUNC(syslog, syslog) - AC_KRB_IPV6 AC_FIND_FUNC(gethostbyname2, inet6 ip6) @@ -192,7 +188,6 @@ AC_CHECK_FUNCS([ \ getconfattr \ getprogname \ getrlimit \ - getspnam \ issetugid \ memmem \ mkdtemp \ @@ -537,8 +532,6 @@ AC_FIND_FUNC_NO_LIBS(crypt, crypt)dnl AC_REQUIRE([rk_BROKEN_REALLOC])dnl -dnl AC_KRB_FUNC_GETCWD_BROKEN - dnl strerror_r is great fun, on linux it exists before sus catched up, dnl so the return type is diffrent, lets check for both diff --git a/configure.ac b/configure.ac index 39c311085..e1d2aa90f 100644 --- a/configure.ac +++ b/configure.ac @@ -499,16 +499,6 @@ rk_WIN32_EXPORT(BUILD_GSSAPI_LIB, GSSAPI_LIB) dnl Checks for libraries. -AC_FIND_FUNC_NO_LIBS(logwtmp, util,[ -#ifdef HAVE_UTIL_H -#include -#endif -],[0,0,0]) -AC_FIND_FUNC_NO_LIBS(logout, util,[ -#ifdef HAVE_UTIL_H -#include -#endif -],[0]) AC_FIND_FUNC_NO_LIBS(openpty, util,[ #ifdef HAVE_UTIL_H #include @@ -527,7 +517,6 @@ AC_FIND_FUNC_NO_LIBS(tgetent, termcap ncurses curses tinfo,[ dnl Checks for library functions. AC_CHECK_FUNCS([ \ - _getpty \ _scrsize \ arc4random \ backtrace \ @@ -540,31 +529,18 @@ AC_CHECK_FUNCS([ \ getresgid \ getresuid \ grantpt \ - kill \ - mktime \ ptsname \ rand \ - revoke \ - select \ setitimer \ - setpcred \ - setpgid \ - setproctitle \ setregid \ setresgid \ setresuid \ setreuid \ setsid \ - setutent \ sigaction \ - strstr \ - ttyname \ - ttyslot \ umask \ unlockpt \ - vhangup \ waitpid \ - yp_get_default_domain \ ]) AC_MSG_CHECKING([checking for __sync_add_and_fetch]) @@ -578,7 +554,6 @@ AC_MSG_RESULT($ac_rk_have___sync_add_and_fetch) AC_FUNC_MMAP -KRB_CAPABILITIES rk_DLADDR AC_CHECK_GETPWNAM_R_POSIX @@ -630,11 +605,6 @@ fi AC_CHECK_SIZEOF([time_t]) -dnl Cray stuff -AC_CHECK_FUNCS(getudbnam setlim) - -dnl AC_KRB_FUNC_GETCWD_BROKEN - AC_CHECK_TYPES([int8_t, int16_t, int32_t, int64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t, uint8_t, uint16_t, uint32_t, uint64_t],,,[ diff --git a/include/config.h.w32 b/include/config.h.w32 index 04eb469ed..644378420 100644 --- a/include/config.h.w32 +++ b/include/config.h.w32 @@ -433,9 +433,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define if you have the function `getgid'. */ /* #define HAVE_GETGID 1 */ -/* Define to 1 if you have the `gethostbyname' function. */ -#define HAVE_GETHOSTBYNAME 1 - /* Define to 1 if you have the `gethostbyname2' function. */ /* #undef HAVE_GETHOSTBYNAME2 */ @@ -600,12 +597,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define to 1 if you have the header file. */ #define HAVE_LOCALE_H 1 -/* Define to 1 if you have the `logout' function. */ -/* #define HAVE_LOGOUT 1 */ - -/* Define to 1 if you have the `logwtmp' function. */ -/* #define HAVE_LOGWTMP 1 */ - /* Define to 1 if the system has the type `long long'. */ #define HAVE_LONG_LONG 1 @@ -624,9 +615,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define if you have the function `mkstemp'. */ /* #define HAVE_MKSTEMP 1 */ -/* Define to 1 if you have the `mktime' function. */ -#define HAVE_MKTIME 1 - /* Define to 1 if you have a working `mmap' system call. */ /* #undef HAVE_MMAP */ @@ -748,9 +736,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define to 1 if you have the `res_search' function. */ /* #undef HAVE_RES_SEARCH */ -/* Define to 1 if you have the `revoke' function. */ -/* #define HAVE_REVOKE 1 */ - /* Define to 1 if you have the header file. */ /* #undef HAVE_RPCSVC_YPCLNT_H */ @@ -787,15 +772,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define to 1 if you have the `setlogin' function. */ /* #undef HAVE_SETLOGIN */ -/* Define to 1 if you have the `setpcred' function. */ -/* #undef HAVE_SETPCRED */ - -/* Define to 1 if you have the `setpgid' function. */ -/* #define HAVE_SETPGID 1 */ - -/* Define to 1 if you have the `setproctitle' function. */ -/* #undef HAVE_SETPROCTITLE */ - /* Define to 1 if you have the `setprogname' function. */ /* #define HAVE_SETPROGNAME 1 */ @@ -820,9 +796,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define to 1 if you have the `setstate' function. */ /* #define HAVE_SETSTATE 1 */ -/* Define to 1 if you have the `setutent' function. */ -/* #define HAVE_SETUTENT 1 */ - /* Define to 1 if you have the `sgi_getcapabilitybyname' function. */ /* #undef HAVE_SGI_GETCAPABILITYBYNAME */ @@ -846,9 +819,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } not C99 compliant. */ /* #define HAVE_SNPRINTF 1 */ -/* Define to 1 if you have the `socket' function. */ -#define HAVE_SOCKET 1 - /* Define to 1 if the system has the type `socklen_t'. */ #define HAVE_SOCKLEN_T 1 @@ -914,9 +884,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define if you have the function `strsep_copy'. */ /* #undef HAVE_STRSEP_COPY */ -/* Define to 1 if you have the `strstr' function. */ -#define HAVE_STRSTR 1 - /* Define to 1 if you have the `strsvis' function. */ /* #undef HAVE_STRSVIS */ @@ -982,9 +949,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* syslog is provided for _win32 in lib/roken */ -/* Define to 1 if you have the `syslog' function. */ -#define HAVE_SYSLOG 1 - /* Define to 1 if you have the header file. */ #define HAVE_SYSLOG_H 1 @@ -1123,12 +1087,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define to 1 if you have the header file. */ /* #undef HAVE_TMPDIR_H */ -/* Define to 1 if you have the `ttyname' function. */ -/* #define HAVE_TTYNAME 1 */ - -/* Define to 1 if you have the `ttyslot' function. */ -/* #define HAVE_TTYSLOT 1 */ - /* Define to 1 if you have the header file. */ /* #undef HAVE_UDB_H */ @@ -1198,9 +1156,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* Define if you have the function `verrx'. */ /* #define HAVE_VERRX 1 */ -/* Define to 1 if you have the `vhangup' function. */ -/* #define HAVE_VHANGUP 1 */ - /* Define to 1 if you have the `vis' function. */ /* #undef HAVE_VIS */ @@ -1242,12 +1197,6 @@ static const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg } /* define if struct winsize has ws_ypixel */ /* #define HAVE_WS_YPIXEL 1 */ -/* Define to 1 if you have the `yp_get_default_domain' function. */ -/* #undef HAVE_YP_GET_DEFAULT_DOMAIN */ - -/* Define to 1 if you have the `_getpty' function. */ -/* #undef HAVE__GETPTY */ - /* Define if you have the `_res' variable. */ /* #undef HAVE__RES */