[PATCH 1/5] Remove unused function checks from configure.ac & include/*.h.in

Alan Coopersmith alan.coopersmith at oracle.com
Fri Dec 2 10:48:12 PST 2011


The code that used getisax to check for MMX support was moved to pixman
and removed from the X server by commit eb2d7fe02f9cbc.

The code that used HAVE_MKSTEMP was deleted by the Xprint removal in
commit 1c8bd318fbaf.

All alloca calls were removed by the patch series end in commit 5e363500c8,
and used custom X checks instead of the autoconf HAVE_ALLOCA anyway.

I can find no record of HAVE_GETUID, HAVE_GETEUID, HAVE_LINK, HAVE_MEMMOVE,
HAVE_MEMSET, HAVE_STRCHR, HAVE_STRRCHR, HAVE_GETOPT, HAVE_GETOPT_LONG,
HAVE_DOPRNT, or HAVE_VPRINTF ever being used, and the calls to those
functions are not wrapped in #ifdefs.
(Most of those are in our baseline requirements of C89 & Unix98 anyway.)

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 configure.ac             |    7 ++-----
 include/dix-config.h.in  |   30 ------------------------------
 include/xwin-config.h.in |    3 ---
 3 files changed, 2 insertions(+), 38 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8345cc9..3005dc4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -213,11 +213,8 @@ AC_CHECK_FUNC([dlopen], [],
 AC_SUBST(DLOPEN_LIBS)
 
 dnl Checks for library functions.
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
-		strtol getopt getopt_long vsnprintf walkcontext backtrace \
-		getisax getzoneid shmctl64 strcasestr ffs vasprintf])
-AC_FUNC_ALLOCA
+AC_CHECK_FUNCS([vsnprintf walkcontext backtrace \
+		getzoneid shmctl64 strcasestr ffs vasprintf])
 AC_CHECK_FUNCS([strndup], [HAVE_STRNDUP=yes], [HAVE_STRNDUP=no])
 AM_CONDITIONAL(NEED_STRNDUP, [test x$HAVE_STRNDUP = xno])
 dnl Old HAS_* names used in os/*.c.
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index e1d3a9e..d5129fe 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -94,24 +94,12 @@
 /* Define to 1 if you have the <dlfcn.h> header file. */
 #undef HAVE_DLFCN_H
 
-/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
-#undef HAVE_DOPRNT
-
 /* Have execinfo.h */
 #undef HAVE_EXECINFO_H
 
 /* Define to 1 if you have the <fcntl.h> header file. */
 #undef HAVE_FCNTL_H
 
-/* Define to 1 if you have the `geteuid' function. */
-#undef HAVE_GETEUID
-
-/* Define to 1 if you have the `getisax' function. */
-#undef HAVE_GETISAX
-
-/* Define to 1 if you have the `getuid' function. */
-#undef HAVE_GETUID
-
 /* Define to 1 if you have the `getzoneid' function. */
 #undef HAVE_GETZONEID
 
@@ -136,9 +124,6 @@
 /* Define to 1 if you have the libdispatch (GCD) available */
 #undef HAVE_LIBDISPATCH
 
-/* Define to 1 if you have the `link' function. */
-#undef HAVE_LINK
-
 /* Define to 1 if you have the <linux/agpgart.h> header file. */
 #undef HAVE_LINUX_AGPGART_H
 
@@ -148,9 +133,6 @@
 /* Define to 1 if you have the <linux/fb.h> header file. */
 #undef HAVE_LINUX_FB_H
 
-/* Define to 1 if you have the `mkstemp' function. */
-#undef HAVE_MKSTEMP
-
 /* Define to 1 if you have the <ndbm.h> header file. */
 #undef HAVE_NDBM_H
 
@@ -181,9 +163,6 @@
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
-/* Define to 1 if you have the `strchr' function. */
-#undef HAVE_STRCHR
-
 /* Define to 1 if you have the <strings.h> header file. */
 #undef HAVE_STRINGS_H
 
@@ -193,12 +172,6 @@
 /* Define to 1 if you have the `strndup' function. */
 #undef HAVE_STRNDUP
 
-/* Define to 1 if you have the `strrchr' function. */
-#undef HAVE_STRRCHR
-
-/* Define to 1 if you have the `strtol' function. */
-#undef HAVE_STRTOL
-
 /* Define to 1 if SYSV IPC is available */
 #undef HAVE_SYSV_IPC
 
@@ -234,9 +207,6 @@
 /* Have /dev/urandom */
 #undef HAVE_URANDOM
 
-/* Define to 1 if you have the `vprintf' function. */
-#undef HAVE_VPRINTF
-
 /* Define to 1 if you have the `vasprintf' function. */
 #undef HAVE_VASPRINTF
 
diff --git a/include/xwin-config.h.in b/include/xwin-config.h.in
index 13b51ca..8122f55 100644
--- a/include/xwin-config.h.in
+++ b/include/xwin-config.h.in
@@ -20,9 +20,6 @@
 /* Define to 1 if unsigned long is 64 bits. */
 #undef _XSERVER64
 
-/* Do we require our own snprintf? */
-#undef NEED_SNPRINTF
-
 /* Short vendor name */
 #undef XVENDORNAMESHORT
 
-- 
1.7.3.2



More information about the xorg-devel mailing list