CVSROOT: /sources/m4
Module name: m4
Changes by: Eric Blake <ericb> 06/10/23 18:16:08
Index: modules/m4.c
===================================================================
RCS file: /sources/m4/m4/modules/m4.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -b -r1.85 -r1.86
--- modules/m4.c 21 Oct 2006 22:15:52 -0000 1.85
+++ modules/m4.c 23 Oct 2006 18:16:08 -0000 1.86
@@ -21,8 +21,9 @@
#include <assert.h>
#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
+
+#include "stdlib--.h"
+#include "unistd--.h"
#if HAVE_SYS_WAIT_H
# include <sys/wait.h>
@@ -56,6 +57,10 @@
extern void m4_make_temp (m4 *context, m4_obstack *obs, const char *macro,
const char *name, bool dir);
+/* stdlib--.h defines mkstemp to a safer replacement, but this
+ interferes with our preprocessor table of builtin definitions. */
+#undef mkstemp
+
/* Maintain each of the builtins implemented in this modules along
with their details in a single table for easy maintenance.
@@ -706,7 +711,7 @@
if (dir)
fd = mkdtemp (obstack_base (obs)) ? 0 : -1;
else
- fd = mkstemp (obstack_base (obs));
+ fd = mkstemp_safer (obstack_base (obs));
if (fd < 0)
{
/* This use of _() will need to change if xgettext ever changes