Use AC_USE_SYSTEM_EXTENSIONS

Defining _XOPEN_SOURCE explicitly in the source file leads to all kinds
of cross-platform headaches, plus incompatibilities between
configure-time capabilities and compile-time features. Let autoconf sort
out how to expose the largest number of functions in a way that is
consistent between configuration and compilation.
This commit is contained in:
Evan Miller 2021-08-20 08:06:19 -04:00
parent 89c7aa27b4
commit f71924dab6
2 changed files with 2 additions and 3 deletions

View File

@ -17,6 +17,8 @@ AC_SUBST(VERSION_INFO)
AM_MAINTAINER_MODE([enable]) AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes]) AM_SILENT_RULES([yes])
AC_USE_SYSTEM_EXTENSIONS
AC_PROG_CC(gcc) AC_PROG_CC(gcc)
AC_PROG_CXX AC_PROG_CXX
AX_TLS([FOO=bar], AC_MSG_ERROR([$CC does not support thread-local storage. A newer compiler is required.])) AX_TLS([FOO=bar], AC_MSG_ERROR([$CC does not support thread-local storage. A newer compiler is required.]))

View File

@ -17,9 +17,6 @@
*/ */
#include <stdarg.h> #include <stdarg.h>
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 700
#endif
#include "mdbsql.h" #include "mdbsql.h"
#ifdef HAVE_STRPTIME #ifdef HAVE_STRPTIME