[Define to the canonical Emacs configuration name.])
AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "${emacs_config_options}",
[Define to the options passed to configure.])
-AH_TEMPLATE(config_opsysfile, [Some platforms that do not use configure
- define this to include extra configuration information.])
-
-case $opsys in
- mingw32)
- AC_DEFINE(config_opsysfile, <ms-w32.h>, [])
- ;;
-esac
XMENU_OBJ=
XOBJ=
#include <stdarg.h>
#include <ctype.h>
#include <stdio.h>
+#include <stdlib.h>
#include <getopt.h>
#include <unistd.h>
#include <config.h>
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1 /* enables some compiler checks on GNU */
-#endif
-
/* WIN32_NATIVE is for XEmacs.
MSDOS, WINDOWSNT, DOS_NT are for Emacs. */
#ifdef WIN32_NATIVE
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
#include <ctype.h>
#include <binary-io.h>
#include <config.h>
#include <stdarg.h>
-#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
-#include <stdlib.h> /* config.h unconditionally includes this anyway */
+#include <stdlib.h>
+#include <string.h>
#ifdef WINDOWSNT
/* Defined to be sys_fopen in ms-w32.h, but only #ifdef emacs, so this
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
-#include <stdbool.h>
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <time.h>
extern struct servent *hes_getservbyname (/* char *, char * */);
#endif
+#include <alloca.h>
#include <pwd.h>
#include <netdb.h>
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <inttypes.h>
#include <stdio.h>
+#include <stdlib.h>
#include <intprops.h>
#include <systime.h>
#include <errno.h>
#include <inttypes.h>
#include <limits.h>
-#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
This should never happen with Emacs. */
#include <config.h>
#include "openat.h"
+#include <stdlib.h>
void openat_save_fail (int errnum) { abort (); }
void openat_restore_fail (int errnum) { abort (); }
#include <unistd.h>
#include <stdio.h>
+#include <stdlib.h>
#include <setjmp.h>
#include <X11/StringDefs.h>
#include <sys/types.h>
#include <stdio.h>
+#include <stdlib.h>
#include "lwlib-int.h"
#include "lwlib-utils.h"
#include <X11/StringDefs.h>
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
#include <limits.h> /* For CHAR_BIT. */
#include <signal.h> /* For SIGABRT, SIGDANGER. */
#include <sys/param.h>
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <verify.h>
#include <config.h>
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
#include <stdio.h>
+#include <stdlib.h>
#include <unistd.h>
#include <limits.h>
#include <sys/types.h>
You should have received a copy of the GNU General Public License
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-/* Commentary:
+/* Put the code here rather than in configure.ac using AH_BOTTOM.
+ This way, the code does not get processed by autoheader. For
+ example, undefs here are not commented out.
- Rather than writing this code directly in AH_BOTTOM, we include it
- via this file. This is so that it does not get processed by
- autoheader. Eg, any undefs here would otherwise be commented out.
-*/
+ To help make dependencies clearer elsewhere, this file typically
+ does not #include other files. The exceptions are first stdbool.h
+ because it is unlikely to interfere with configuration and bool is
+ such a core part of the C language, and second ms-w32.h (DOS_NT
+ only) because it historically was included here and changing that
+ would take some work. */
-/* Code: */
+#include <stdbool.h>
-/* Include any platform specific configuration file. */
-#ifdef config_opsysfile
-# include config_opsysfile
+#if defined DOS_NT && !defined DEFER_MS_W32_H
+# include <ms-w32.h>
#endif
-#include <stdbool.h>
-
/* GNUC_PREREQ (V, W, X) is true if this is GNU C version V.W.X or later.
It can be used in a preprocessor expression. */
#ifndef __GNUC_MINOR__
typedef bool bool_bf;
#endif
-#ifndef WINDOWSNT
-/* On AIX 3 this must be included before any other include file. */
-#include <alloca.h>
-#if ! HAVE_ALLOCA
-# error "alloca not available on this machine"
-#endif
-#endif
-
/* Simulate __has_attribute on compilers that lack it. It is used only
on arguments like alloc_size that are handled in this simulation. */
#ifndef __has_attribute
extern char *emacs_getenv_TZ (void);
extern int emacs_setenv_TZ (char const *);
-#include <string.h>
-#include <stdlib.h>
-
#if __GNUC__ >= 3 /* On GCC 3.0 we might get a warning. */
#define NO_INLINE __attribute__((noinline))
#else
#else
# define UNINIT /* empty */
#endif
-
-/* conf_post.h ends here */
#ifdef HAVE_DBUS
#include <stdio.h>
+#include <stdlib.h>
#include <dbus/dbus.h>
#include "lisp.h"
#include <config.h>
#include "sysstdio.h"
+#include <stdlib.h>
#include <unistd.h>
#include "lisp.h"
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include <float.h>
#include <unistd.h>
#include <limits.h>
#include <limits.h>
#include <intprops.h>
+#include <stdlib.h>
#include <strftime.h>
#include <verify.h>
#include "emacs-module.h"
-#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
-#include <string.h>
#include "lisp.h"
#include "dynlib.h"
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/file.h>
#include <config.h>
#include <limits.h>
#include <stdio.h>
+#include <stdlib.h>
#include "lisp.h"
#include "blockinput.h"
#include "commands.h"
#include <sys/stat.h>
#include <signal.h>
#include <stdio.h>
+#include <stdlib.h>
#ifdef HAVE_PWD_H
#include <pwd.h>
#include <config.h>
+#include <stdlib.h>
#include <unistd.h>
#include <filevercmp.h>
#include <intprops.h>
#include <config.h>
#include <float.h>
#include <stdio.h>
+#include <stdlib.h>
#include <c-ctype.h>
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include "lisp.h"
#include "blockinput.h"
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <limits.h>
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include "lisp.h"
#include "commands.h"
#ifndef EMACS_LISP_H
#define EMACS_LISP_H
+#include <alloca.h>
#include <setjmp.h>
#include <stdalign.h>
#include <stdarg.h>
#include <stddef.h>
+#include <string.h>
#include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <config.h>
#include "sysstdio.h"
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <sys/types.h> /* Some typedefs are used in sys/file.h. */
#include <sys/file.h>
#include <config.h>
#include <stddef.h>
+#include <stdlib.h>
#ifdef emacs
/* We need this for `regex.h', and perhaps for the Emacs include files. */
#else /* not REGEX_MALLOC */
-/* Emacs already defines alloca, sometimes. */
-# ifndef alloca
-
-/* Make alloca work the best possible way. */
-# ifdef __GNUC__
-# define alloca __builtin_alloca
-# else /* not __GNUC__ */
-# ifdef HAVE_ALLOCA_H
-# include <alloca.h>
-# endif /* HAVE_ALLOCA_H */
-# endif /* not __GNUC__ */
-
-# endif /* not alloca */
-
# ifdef emacs
# define REGEX_USE_SAFE_ALLOCA USE_SAFE_ALLOCA
# define REGEX_SAFE_FREE() SAFE_FREE ()
# define REGEX_ALLOCATE SAFE_ALLOCA
# else
+# include <alloca.h>
# define REGEX_ALLOCATE alloca
# endif
#include <grp.h>
#endif /* HAVE_PWD_H */
#include <limits.h>
+#include <stdlib.h>
#include <unistd.h>
#include <c-ctype.h>
#include <fcntl.h>
#endif /* not DOS_NT */
-#include <stdbool.h>
#include <sys/ioctl.h>
#ifdef HPUX
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
+#include <stdlib.h>
#include <sys/file.h>
#include <sys/time.h>
#include <unistd.h>
#include <config.h>
#include "unexec.h"
#include "lisp.h"
-#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <a.out.h>
be changed accordingly.
*/
-/* Enable GNU extensions in gnulib replacement headers. */
-#define _GNU_SOURCE 1
-
-/* config.h #define:s malloc/realloc/free and then includes stdlib.h.
- We want the undefined versions, but if config.h includes stdlib.h
- with the #define:s in place, the prototypes will be wrong and we get
- warnings. To prevent that, include stdlib.h before config.h. */
-
-#include <stdlib.h>
#include <config.h>
+
+/* Although <config.h> redefines malloc to unexec_malloc, etc., this
+ file wants stdlib.h to declare the originals. */
#undef malloc
#undef realloc
#undef free
+#include <stdlib.h>
+
#include "unexec.h"
#include "lisp.h"
Geoff Voelker (voelker@cs.washington.edu) 7-29-94
*/
-/* Enable GNU extensions in gnulib replacement headers. */
-#define _GNU_SOURCE 1
+#define DEFER_MS_W32_H
+#include <config.h>
#include <mingw_time.h>
#include <stddef.h> /* for offsetof */
#include <sys/utime.h>
#include <math.h>
-/* must include CRT headers *before* config.h */
+/* Include CRT headers *before* ms-w32.h. */
+#include <ms-w32.h>
-#include <config.h>
#include <mbstring.h> /* for _mbspbrk, _mbslwr, _mbsrchr, ... */
#undef access
thread to exit. The main thread waits for some time for the worker
thread to exit, and if it doesn't, terminates it forcibly. */
-/* Enable GNU extensions in gnulib replacement headers. */
-#define _GNU_SOURCE 1
+#define DEFER_MS_W32_H
+#include <config.h>
#include <stddef.h>
#include <errno.h>
-/* must include CRT headers *before* config.h */
-#include <config.h>
+/* Include CRT headers *before* ms-w32.h. */
+#include <ms-w32.h>
#include <windows.h>
Adapted from alarm.c by Tim Fleehart
*/
-/* Enable GNU extensions in gnulib replacement headers. */
-#define _GNU_SOURCE 1
+#define DEFER_MS_W32_H
+#include <config.h>
#include <mingw_time.h>
#include <stdio.h>
#include <mbstring.h>
#include <locale.h>
-/* must include CRT headers *before* config.h */
-#include <config.h>
+/* Include CRT headers *before* ms-w32.h. */
+#include <ms-w32.h>
#undef signal
#undef wait
#include "widget.h"
#include <stdio.h>
+#include <stdlib.h>
#include "lisp.h"
#include "xterm.h"
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include <limits.h>
#include "lisp.h"
used to fill in unspecified attributes of the default face. */
#include <config.h>
+#include <stdlib.h>
#include "sysstdio.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include <math.h>
#include <unistd.h>
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include <X11/Xlib.h>
#include "lisp.h"
#include <glib.h>
#include <errno.h>
-#include <stdbool.h>
#include "blockinput.h"
#include "systime.h"
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#ifdef USE_CAIRO
#include <math.h>
#endif