empserver/m4
Markus Armbruster d6c5c263b9 Fix build for systems that don't provide POSIX.1-2001 by default
We require POSIX.1-2001.  Some systems provide it only with feature
test macro _POSIX_C_SOURCE defined to 200112L.  Since we don't define
it, the build fails there.  Observed on Solaris 10.

We actually require the XSI extension.  The GNU C Library provides it
by default.  With _POSIX_C_SOURCE 200112L, however, you have to define
feature test macro _XOPEN_SOURCE to get it.  But then _POSIX_C_SOURCE
is redundant.

Make configure put #define _XOPEN_SOURCE 600 into config.h.  Drop the
two existing #define _XOPEN_SOURCE 500 in .c files.

Now Solaris cc refuses to play ball unless switched to C99.  Replace
AC_PROG_CC by AC_PROG_CC_STDC to mollify it.

Unfortunately, use of _XOPEN_SOURCE exposes bugs in AIX libc and old
versions of GNU libc:

* AIX defines struct in6_addr's member s6_addr as a macro expanding
  into the actual member.  Without _ALL_SOURCE (the default), the
  expansion is wrong and doesn't compile.  Observed with AIX V7.2.

* GNU lib's IN6_IS_ADDR_V4MAPPED() is unusable without
  _DEFAULT_SOURCE (default) or _GNU_SOURCE.  Observed with Debian 8.
  Tracked at <https://sourceware.org/bugzilla/show_bug.cgi?id=16421>,
  fixed in version 2.25.

Affects just sockaddr_ntop()'s special case from commit 372cdb136 "Use
IPv4 format for IPv4-mapped addresses", v4.3.31.  Disable the special
case and use IPv6 format on such systems.  This is a very minor
usability regression.  Could be avoided, I guess, but it's not worth
the trouble.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
2021-01-23 07:08:03 +01:00
..
ax_append_flag.m4 m4: Refresh macros from autoconf-archive commit fd1d25c148 2021-01-23 07:08:03 +01:00
ax_append_link_flags.m4 m4: Refresh macros from autoconf-archive commit fd1d25c148 2021-01-23 07:08:03 +01:00
ax_check_compile_flag.m4 m4: Refresh macros from autoconf-archive commit fd1d25c148 2021-01-23 07:08:03 +01:00
ax_check_link_flag.m4 m4: Refresh macros from autoconf-archive commit fd1d25c148 2021-01-23 07:08:03 +01:00
ax_lib_socket_nsl.m4 m4: Refresh macros from autoconf-archive commit fd1d25c148 2021-01-23 07:08:03 +01:00
ax_pthread.m4 m4: Refresh macros from autoconf-archive commit fd1d25c148 2021-01-23 07:08:03 +01:00
ax_require_defined.m4 m4: Refresh macros from autoconf-archive commit fd1d25c148 2021-01-23 07:08:03 +01:00
my_append_compile_flags.m4 configure: Use -fstack-protector-strong when available 2015-12-05 13:19:38 +01:00
my_func_makecontext.m4 LWP doesn't work with Darwin due to OS bugs, avoid it for now 2008-12-07 17:25:35 -05:00
my_lib_readline.m4 client: New configure --with-readline 2017-08-06 11:22:29 +02:00
my_terminfo.m4 m4: Make MY_WITH_TERMINFO consistent with MY_WITH_READLINE 2017-08-06 11:22:29 +02:00
my_windows_api.m4 Fix portability bug in configure test for Windows API 2012-08-11 15:36:56 +02:00
my_working_in6_is_addr_v4mapped.m4 Fix build for systems that don't provide POSIX.1-2001 by default 2021-01-23 07:08:03 +01:00