From c9120fbdcec3bd8b52d97dd8a91e6e02b36c374e Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 1 Feb 2018 14:50:32 -0500 Subject: xproto: Stop "computing" a value for FUNCPROTO This macro is apparently an imake-ism for how much C89 you support. Seeing as it's 2018 the answer is "all of it", and if that's not actually true for your platform you need a better compiler. Signed-off-by: Adam Jackson --- configure.ac | 107 -------------------------------------------- include/X11/Xfuncproto.h.in | 2 +- 2 files changed, 1 insertion(+), 108 deletions(-) diff --git a/configure.ac b/configure.ac index f20c0e6..bc0892b 100644 --- a/configure.ac +++ b/configure.ac @@ -48,25 +48,6 @@ AC_ARG_ENABLE(legacy, [LEGACY=$enableval], [LEGACY=no]) AM_CONDITIONAL(LEGACY, [test "x$LEGACY" = "xyes"]) -# Check for enable/disable options -AC_ARG_ENABLE(function-prototypes, - AS_HELP_STRING([--enable-function-prototypes], - [force function prototypes (default: auto)]), - [FUNCPROTO=$enableval], [FUNCPROTO=auto]) -AC_ARG_ENABLE(varargs-prototypes, - AS_HELP_STRING([--enable-varargs-prototypes], - [varargs prototypes are supported (default: auto)]), - [VAPROTO=$enableval], [VAPROTO=auto]) -AC_ARG_ENABLE(const-prototypes, - AS_HELP_STRING([--enable-const-prototypes], - [const is supported (default: auto)]), - [CONSTPROTO=$enableval], [CONSTPROTO=auto]) -AC_ARG_ENABLE(nested-prototypes, - AS_HELP_STRING([--enable-nested-prototypes], - [nested prototypes are supported (default: auto)]), - [NESTEDPROTO=$enableval], [NESTEDPROTO=auto]) - - AC_CHECK_HEADERS([sys/select.h sys/param.h sys/types.h sys/time.h]) # Handle Xpoll.h.in @@ -127,94 +108,6 @@ fi AC_SUBST([USE_FDS_BITS]) - -# Handle Xfuncproto.h -AC_MSG_CHECKING([whether const prototypes are supported]) -if test "x$CONSTPROTO" = xauto; then - case $host_os in - linux*) CONSTPROTO=yes ;; - freebsd*) CONSTPROTO=yes ;; - netbsd*) CONSTPROTO=yes ;; - openbsd*) CONSTPROTO=yes ;; - solaris*) CONSTPROTO=yes ;; - *) CONSTPROTO=no ;; - esac -fi -AC_MSG_RESULT([$CONSTPROTO]) - -AC_MSG_CHECKING([whether varargs prototypes are supported]) -if test "x$VAPROTO" = xauto; then - case $host_os in - linux*) VAPROTO=yes ;; - freebsd*) VAPROTO=yes ;; - netbsd*) VAPROTO=yes ;; - openbsd*) VAPROTO=yes ;; - solaris*) VAPROTO=yes ;; - *) VAPROTO=no ;; - esac -fi -AC_MSG_RESULT([$VAPROTO]) - -AC_MSG_CHECKING([whether nested prototypes are supported]) -if test "x$NESTEDPROTO" = xauto; then - case $host_os in - linux*) NESTEDPROTO=yes ;; - freebsd*) NESTEDPROTO=yes ;; - netbsd*) NESTEDPROTO=yes ;; - openbsd*) NESTEDPROTO=yes ;; - solaris*) NESTEDPROTO=yes ;; - *) NESTEDPROTO=no ;; - esac -fi -AC_MSG_RESULT([$NESTEDPROTO]) - -AC_MSG_CHECKING([whether to force function prototypes]) -if test "x$FUNCPROTO" = xauto; then - case $host_os in - linux*) FUNCPROTO=yes ;; - freebsd*) FUNCPROTO=yes ;; - netbsd*) FUNCPROTO=yes ;; - openbsd*) FUNCPROTO=yes ;; - *) - if test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then - FUNCPROTO=yes - else - FUNCPROTO=no - fi - ;; - esac -fi -AC_MSG_RESULT([$FUNCPROTO]) - -# Logic for this was taken from Imake.tmpl -if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes && test "x$CONSTPROTO" = xyes; then - AC_DEFINE(FUNCPROTO, [15], [FUNCPROTO]) -else - if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then - AC_DEFINE(FUNCPROTO, [11], [FUNCPROTO]) - else - if test "x$FUNCPROTO" = xyes && test "x$NESTEDPROTO" = xyes; then - AC_DEFINE(FUNCPROTO, [9], [FUNCPROTO]) - else - if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes && test "x$CONSTPROTO" = xyes; then - AC_DEFINE(FUNCPROTO, [7], [FUNCPROTO]) - else - if test "x$FUNCPROTO" = xyes && test "x$CONSTPROTO" = xyes; then - AC_DEFINE(FUNCPROTO, [5], [FUNCPROTO]) - else - if test "x$FUNCPROTO" = xyes && test "x$VAPROTO" = xyes; then - AC_DEFINE(FUNCPROTO, [3], [FUNCPROTO]) - else - if test "x$FUNCPROTO" = xyes; then - AC_DEFINE(FUNCPROTO, [], [FUNCPROTO]) - fi - fi - fi - fi - fi - fi -fi - AC_CONFIG_FILES([applewmproto.pc bigreqsproto.pc compositeproto.pc diff --git a/include/X11/Xfuncproto.h.in b/include/X11/Xfuncproto.h.in index 3259366..89bc96f 100644 --- a/include/X11/Xfuncproto.h.in +++ b/include/X11/Xfuncproto.h.in @@ -53,7 +53,7 @@ in this Software without prior written authorization from The Open Group. #define NARROWPROTO #endif #ifndef FUNCPROTO -#undef FUNCPROTO +#define FUNCPROTO 15 #endif #ifndef NeedWidePrototypes -- cgit v1.2.3