[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Let m4-1.4.2 build on systems lacking mkstemp(3)
From: |
Noah Misch |
Subject: |
Let m4-1.4.2 build on systems lacking mkstemp(3) |
Date: |
Sun, 16 Jan 2005 17:01:41 -0800 |
User-agent: |
Mutt/1.5.6i |
m4-1.4.2 (and probably m4-1.4.1, but not m4-1.4) does not build on a system
lacking mkstemp(3); src/output.c ships a static replacement, but the 2001-02-01
src/builtin.c change introduced a mkstemp(3) dependency there. In the interest
of simplicitly, this patch merely makes the output.c replacement non-static and
independent of the need to replace tmpfile(3).
Patch is -p0 style. All regressions pass on the affected platform.
2005-01-16 Noah Misch <address@hidden>
* src/output.c (mkstemp): Make non-static, and build regardless of
HAVE_TMPFILE; src/builtin.c also needs this replacement.
* NEWS: Update.
--- ./NEWS~ Sat Aug 21 08:06:03 2004
+++ ./NEWS Sun Jan 16 19:46:08 2005
@@ -1,5 +1,9 @@
GNU m4 NEWS - User visible changes.
-Copyright (C) 1992, 1993, 1994, 2004 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 2004, 2005 Free Software Foundation, Inc.
+
+Version 1.4.3 - ?, by ?
+
+* Portability fix for systems lacking mkstemp(3).
Version 1.4.2 - August 2004, by Paul Eggert
--- ./src/output.c~ Sat Aug 21 06:29:00 2004
+++ ./src/output.c Sun Jan 16 19:44:54 2005
@@ -1,6 +1,6 @@
/* GNU m4 -- A simple macro processor
- Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2004 Free
+ Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 2004, 2005 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -102,8 +102,6 @@
output_unused = 0;
}
-#ifndef HAVE_TMPFILE
-
#ifndef HAVE_MKSTEMP
/* This implementation of mkstemp(3) does not avoid any races, but its
@@ -111,7 +109,7 @@
#include <fcntl.h>
-static int
+int
mkstemp (const char *tmpl)
{
mktemp (tmpl);
@@ -119,6 +117,8 @@
}
#endif /* not HAVE_MKSTEMP */
+
+#ifndef HAVE_TMPFILE
/* Implement tmpfile(3) for non-USG systems. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Let m4-1.4.2 build on systems lacking mkstemp(3),
Noah Misch <=