This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A patch for stdlib/isomac.c


On Sun, Apr 01, 2001 at 10:31:54AM +0200, Andreas Jaeger wrote:
> "H . J . Lu" <hjl@lucon.org> writes:
> 
> > Without this patch, I cannot run "make check" in more then one
> > build directories at the same time.
> 
> In that case annexc.c should also get changed.
> 

You ar right. Here is a new patch.


H.J.
----
2001-04-01  H.J. Lu  <hjl@gnu.org>

	* posix/annexc.c (TMPFILE): Change it to tmpnam (NULL).
	* stdlib/isomac.c (TMPFILE): Likewise.

Index: posix/annexc.c
===================================================================
RCS file: /work/cvs/gnu/glibc/posix/annexc.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 annexc.c
--- posix/annexc.c	2000/08/27 22:48:06	1.1.1.2
+++ posix/annexc.c	2001/04/01 16:42:27
@@ -25,7 +25,11 @@
 #include <signal.h>
 #include <sys/wait.h>
 
+#if 0
 #define TMPFILE             "/tmp/macros"
+#else
+static const char *TMPFILE;
+#endif
 #define HEADER_MAX          256
 
 /* <aio.h>.  */
@@ -711,6 +715,8 @@ get_null_defines (void)
   size_t result_max = 0;
   FILE *input;
   int first = 1;
+
+  TMPFILE = tmpnam (NULL);
 
   command = malloc (sizeof fmt + sizeof "/dev/null" + 2 * strlen (CC)
 		    + strlen (INC) + strlen (TMPFILE));
Index: stdlib/isomac.c
===================================================================
RCS file: /work/cvs/gnu/glibc/stdlib/isomac.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 isomac.c
--- stdlib/isomac.c	2001/04/01 03:53:20	1.1.1.2
+++ stdlib/isomac.c	2001/04/01 06:03:06
@@ -75,7 +75,11 @@
 #include <stdlib.h>
 #include <string.h>
 
+#if 0
 #define TMPFILE             "/tmp/macros"
+#else
+static const char *TMPFILE;
+#endif
 #define HEADER_MAX          256
 
 /* ISO C header names including Amendment 1 (without ".h" suffix).  */
@@ -246,6 +250,8 @@ get_null_defines (void)
   size_t result_max = 0;
   FILE *input;
   int first = 1;
+
+  TMPFILE = tmpnam (NULL);
 
   command = malloc (sizeof fmt + sizeof "/dev/null" + 2 * strlen (CC)
 		    + strlen (INC) + strlen (TMPFILE));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]