[PATCH 8/8] Remove superfluous configure checks

Sebastian Huber sebastian.huber at embedded-brains.de
Thu Oct 18 13:00:14 UTC 2018


The results of these checks are unused, covered by other checks or check
obvious things.

Update #3409.
---
 cpukit/configure.ac | 95 +----------------------------------------------------
 1 file changed, 1 insertion(+), 94 deletions(-)

diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index cb7a0a0479..dbb93089d5 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -55,50 +55,9 @@ AM_CONDITIONAL([HACK_TO_AVOID_LONG_ARG_LIST], [test "${hack_to_avoid_long_arg_li
 
 RTEMS_CHECK_NEWLIB
 
-# BSD-isms, used throughout the sources
-# Not really used by this configure script
-# FIXME: They should be eliminated if possible.
-AC_CHECK_FUNCS([strcasecmp snprintf])
-AC_CHECK_FUNCS([strdup strndup strncasecmp])
-AC_CHECK_FUNCS([bcopy bcmp])
-AC_CHECK_FUNCS([isascii fileno])
-
-# <FIXME>
-#   Check for functions supplied by newlib >= 1.17.0
-# Newlib's posix/ directory
-AC_CHECK_FUNCS([creat \
-  opendir closedir readdir rewinddir scandir seekdir \
-  sleep \
-  telldir \
-  usleep],,
-  [RTEMS_TOOL_CHAIN_ERROR])
-AC_CHECK_FUNCS([execl execlp execle execv execvp execve])
-AC_CHECK_FUNCS([regcomp regexec regerror regfree])
-
 # Newlib proprietary
 AC_CHECK_MEMBER([struct _Thread_queue_Queue._name],[],[RTEMS_TOOL_CHAIN_ERROR],[#include <sys/lock.h>])
 
-# Mandated by POSIX, older newlibs bogusly provided CLOCK_PROCESS_CPUTIME+CLOCK_THREAD_CPUTIME
-AC_CHECK_DECL([CLOCK_PROCESS_CPUTIME_ID],[],[RTEMS_TOOL_CHAIN_ERROR],[#include <time.h>])
-AC_CHECK_DECL([CLOCK_THREAD_CPUTIME_ID],[],[RTEMS_TOOL_CHAIN_ERROR],[#include <time.h>])
-
-# Mandated by POSIX, decls not present in some versions of newlib,
-# some versions stubbed in newlib's rtems crt0
-RTEMS_CHECK_FUNC([seteuid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([geteuid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([setegid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([getegid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([setuid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([getuid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([setgid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([getgid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([setsid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([getsid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([setpgid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([getpgid],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([setpgrp],[#include <unistd.h>])
-RTEMS_CHECK_FUNC([getpgrp],[#include <unistd.h>])
-
 # pthread-functions not declared in some versions of newlib.
 RTEMS_CHECK_FUNC([pthread_attr_getguardsize],[#include <pthread.h>])
 RTEMS_CHECK_FUNC([pthread_attr_setguardsize],[#include <pthread.h>])
@@ -155,30 +114,6 @@ AC_MSG_RESULT([no])
 ])
 AC_LANG_POP(C)
 
-# Check if the installed toolchain provides these headers
-# and error out if not.
-AC_CHECK_HEADERS([errno.h sched.h semaphore.h sys/cdefs.h sys/queue.h tar.h threads.h],,
-  [RTEMS_TOOL_CHAIN_ERROR])
-
-## error out if libc doesn't provide stdint.h
-AS_IF([test x"${ac_cv_header_stdint_h}" != xyes],
-[RTEMS_TOOL_CHAIN_ERROR])
-
-## error out if libc doesn't provide inttypes.h
-AS_IF([test x"${ac_cv_header_inttypes_h}" != xyes],
-[RTEMS_TOOL_CHAIN_ERROR])
-
-AC_HEADER_STDBOOL
-AS_IF([test x"${ac_cv_header_stdbool_h}" != xyes],
-[RTEMS_TOOL_CHAIN_ERROR])
-
-AC_CHECK_TYPES([ uint8_t,  int8_t])
-AC_CHECK_TYPES([uint16_t, int16_t])
-AC_CHECK_TYPES([uint32_t, int32_t])
-AC_CHECK_TYPES([uint64_t, int64_t])
-AC_CHECK_TYPES([uintmax_t, intmax_t])
-AC_CHECK_TYPES([uintptr_t, intptr_t])
-
 # Some toolchain sanity checks and diagnostics
 RTEMS_CHECK_GCC_SANITY
 
@@ -193,14 +128,6 @@ AC_CHECK_HEADER([pthread.h],[
   AC_CHECK_TYPES([struct _Priority_Node],[],[RTEMS_TOOL_CHAIN_ERROR],[#include <pthread.h>])
 ])
 
-AC_CHECK_HEADER([signal.h],[
-  AC_CHECK_TYPES([sighandler_t])
-])
-
-if test x"$RTEMS_USE_NEWLIB" = xyes ; then
-  AC_CHECK_DECLS([__getreent],[],[RTEMS_TOOL_CHAIN_ERROR],[#include <sys/reent.h>])
-fi
-
 RTEMS_CHECK_MULTIPROCESSING
 RTEMS_CHECK_POSIX_API
 RTEMS_CHECK_NETWORKING
@@ -346,29 +273,9 @@ AC_MSG_RESULT([$HAVE_ASSIGNABLE_STDIO])
 # libmisc/serdbg exploits weak symbols
 RTEMS_CHECK_GCC_WEAK
 
-# FIXME: These checks are only in here to provide
-# configuration-time diagnostics and are not really used.
-AC_CHECK_DECLS([_POSIX_LOGIN_NAME_MAX],,,[#include <limits.h>])
-AC_CHECK_DECLS([CHAR_BIT],,,[#include <limits.h>])
-
-# FIXME: Mandatory in SUSv4, optional in SUSv3.
-#   Not implemented in GCC/newlib, so far.
-AC_CHECK_DECLS([WORD_BIT],,,[#include <limits.h>])
-AC_CHECK_DECLS([LONG_BIT],,,[#include <limits.h>])
-
-## BSD-ism, excluded from POSIX, but available on most platforms
-AC_CHECK_DECLS([sbrk],,,[#include <unistd.h>])
+# Used by legacy network stack
 AC_CHECK_DECLS([rcmd],,,[#include <unistd.h>])
 
-## Check if libc provides decl of utime
-## FIXME: utime has been deprecated in SUSv4.
-##        and is likely to be removed in future versions.
-## FIXME (BUG in newlib): SUSv4 saids including <utime.h> should be sufficient.
-AC_CHECK_DECLS([utime],,,[#include <sys/types.h>
-#include <utime.h>])
-## Check if libc provides decl of utimes
-AC_CHECK_DECLS([utimes],,,[#include <sys/time.h>])
-
 # Ensure that Newlib does not provide things now in <machine/_timecounter.h>
 AC_CHECK_DECLS([_Timecounter_Time_second],[RTEMS_TOOL_CHAIN_ERROR],,[#include <sys/time.h>])
 
-- 
2.16.4



More information about the devel mailing list