summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2018-02-01 14:45:56 -0500
committerAdam Jackson <ajax@redhat.com>2018-02-01 14:47:38 -0500
commit05b1963945ff8a2989c97ba1bbbee507b6328b2d (patch)
tree921d187a0ee0ac1d691005935bc665922f488507
parent627f4f40abb51a927ed91d9e8b45630d006886c2 (diff)
xproto: Move NARROWPROTO logic out of configure time
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--configure.ac20
-rw-r--r--include/X11/Xfuncproto.h.in5
2 files changed, 3 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac
index 4c2db89..f20c0e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,10 +65,6 @@ AC_ARG_ENABLE(nested-prototypes,
AS_HELP_STRING([--enable-nested-prototypes],
[nested prototypes are supported (default: auto)]),
[NESTEDPROTO=$enableval], [NESTEDPROTO=auto])
-AC_ARG_ENABLE(wide-prototypes,
- AS_HELP_STRING([--enable-wide-prototypes],
- [widen function prototypes (default: auto)]),
- [WIDEPROTO=$enableval], [WIDEPROTO=auto])
AC_CHECK_HEADERS([sys/select.h sys/param.h sys/types.h sys/time.h])
@@ -219,22 +215,6 @@ else
fi
fi
-AC_MSG_CHECKING([whether to widen function prototypes])
-if test "x$WIDEPROTO" = xauto; then
- case $host_os in
- linux*) WIDEPROTO=no ;;
- freebsd*) WIDEPROTO=no ;;
- netbsd*) WIDEPROTO=no ;;
- openbsd*) WIDEPROTO=no ;;
- *) WIDEPROTO=yes ;;
- esac
-fi
-AC_MSG_RESULT([$WIDEPROTO])
-
-if test "x$WIDEPROTO" = xno; then
- AC_DEFINE(NARROWPROTO, [], [Narrow prototypes])
-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 b88493d..3259366 100644
--- a/include/X11/Xfuncproto.h.in
+++ b/include/X11/Xfuncproto.h.in
@@ -48,8 +48,9 @@ in this Software without prior written authorization from The Open Group.
#endif /* _Xconst */
/* Function prototype configuration (see configure for more info) */
-#ifndef NARROWPROTO
-#undef NARROWPROTO
+#if !defined(NARROWPROTO) && \
+ (defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__))
+#define NARROWPROTO
#endif
#ifndef FUNCPROTO
#undef FUNCPROTO