Sophie

Sophie

distrib > Mandriva > current > i586 > media > contrib-release-src > by-pkgid > 96123f4e8280e38abaabd0a24b3505d8 > files > 6

fvwm-1.24r-31mdv2010.1.src.rpm

--- fvwm-1.24r/fvwm/configure.c.marc	Thu Jan  4 10:35:31 1996
+++ fvwm-1.24r/fvwm/configure.c	Tue Jan  9 10:35:28 1996
@@ -1976,6 +1976,7 @@
     char *vc;			/* Visual Class */
     FILE *tmpf;
     struct passwd *pwent;
+    int fd;
     /* Generate a temporary filename.  Honor the TMPDIR environment variable,
        if set. Hope nobody deletes this file! */
 
@@ -1993,12 +1994,18 @@
 	exit(0377);
       }
 
+    if ((fd = open(tmp_name, O_WRONLY|O_EXCL|O_CREAT, S_IRUSR|S_IWUSR)) < 0) {
+      perror("exclusive open for tmp_name failed in m4_defs");
+      exit(0377);
+    }
+    close(fd);
+
     /*
      * Create the appropriate command line to run m4, and
      * open a pipe to the command.
      */
 
-    sprintf(options, "%s %s %s > %s\n",
+    sprintf(options, "%s %s %s >& %s\n",
 	    m4_prog,
 	    ((m4_prefix == 0) ? "" : "--prefix-builtins"),
 	    m4_options, tmp_name);