[PATCH v2] Remove superfluous configure checks

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


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

Update #3409.
---
 cpukit/Makefile.am  | 49 ++++++++++++--------------
 cpukit/configure.ac | 99 +----------------------------------------------------
 2 files changed, 23 insertions(+), 125 deletions(-)

diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index f6be43ab87..efba58a115 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -390,6 +390,28 @@ librtemscpu_a_SOURCES += libfs/src/devfs/devopen.c
 librtemscpu_a_SOURCES += libfs/src/devfs/devread.c
 librtemscpu_a_SOURCES += libfs/src/devfs/devstat.c
 librtemscpu_a_SOURCES += libfs/src/devfs/devwrite.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/fat.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/fat_fat_operations.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/fat_file.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_conv.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_conv_default.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_conv_utf8.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_create.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_dir.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_eval.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_file.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_format.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_free.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_fsunmount.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_handlers_dir.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_handlers_file.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_init.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_initsupp.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_misc.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_mknod.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_rename.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_rmnod.c
+librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_statvfs.c
 librtemscpu_a_SOURCES += libfs/src/imfs/deviceio.c
 librtemscpu_a_SOURCES += libfs/src/imfs/imfs_chown.c
 librtemscpu_a_SOURCES += libfs/src/imfs/imfs_config.c
@@ -1124,33 +1146,6 @@ librtemscpu_a_SOURCES += libdl/rtl-unwind-dw2.c
 
 endif
 
-if LIBDOSFS
-
-librtemscpu_a_SOURCES += libfs/src/dosfs/fat.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/fat_fat_operations.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/fat_file.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_conv.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_conv_default.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_conv_utf8.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_create.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_dir.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_eval.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_file.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_format.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_free.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_fsunmount.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_handlers_dir.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_handlers_file.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_init.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_initsupp.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_misc.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_mknod.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_rename.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_rmnod.c
-librtemscpu_a_SOURCES += libfs/src/dosfs/msdos_statvfs.c
-
-endif
-
 if LIBDRVMGR
 
 librtemscpu_a_SOURCES += libdrvmgr/drvmgr_by_id.c
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index cb7a0a0479..e216fb838e 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>])
 
@@ -388,10 +295,6 @@ AM_CONDITIONAL([LIBGNAT],[test x"$rtems_cv_HAS_POSIX_API" = x"yes" \
 
 AM_CONDITIONAL([LIBUTF8PROC],[test $ac_cv_sizeof_size_t -gt 2])
 
-AM_CONDITIONAL([LIBDOSFS],[dnl
-test x"$ac_cv_type_uint8_t" = xyes \
-&& test x"$ac_cv_type_uint16_t" = xyes])
-
 AC_CONFIG_HEADER(config.h)
 
 ## These are needed by the NFS Client
-- 
2.16.4



More information about the devel mailing list