summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-libs/openmotif/files/openmotif-2.1.30-imake-tmpdir.patch')
-rw-r--r--x11-libs/openmotif/files/openmotif-2.1.30-imake-tmpdir.patch43
1 files changed, 0 insertions, 43 deletions
diff --git a/x11-libs/openmotif/files/openmotif-2.1.30-imake-tmpdir.patch b/x11-libs/openmotif/files/openmotif-2.1.30-imake-tmpdir.patch
deleted file mode 100644
index b1b2804ab394..000000000000
--- a/x11-libs/openmotif/files/openmotif-2.1.30-imake-tmpdir.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- config/imake/imake.c~ 2000-06-04 00:34:05.000000000 +0200
-+++ config/imake/imake.c 2003-09-17 03:41:46.000000000 +0200
-@@ -961,23 +961,38 @@
- static void get_libc_version(inFile)
- FILE* inFile;
- {
-- char *aout = tmpnam (NULL);
-+ char aout[PATH_MAX];
- FILE *fp;
- const char *format = "%s -o %s -x c -";
- char *cc;
- int len;
- char *command;
-+ char *tmpdir;
-+ int tmpfd;
-+
-+ if((tmpdir = getenv("TMPDIR")) != NULL && strlen(tmpdir) < (PATH_MAX-13))
-+ strcpy(aout, tmpdir);
-+ else
-+ strcpy(aout, "/tmp");
-+ strcat(aout, "/imakeXXXXXX");
-+
-+ if((tmpfd = mkstemp(aout)) == -1) {
-+ perror("mkstemp");
-+ abort();
-+ }
-
- cc = getenv ("CC");
- if (cc == NULL)
- cc = "gcc";
- len = strlen (aout) + strlen (format) + strlen (cc);
- if (len < 128) len = 128;
-- command = alloca (len);
-+ if((command = alloca (len)) == NULL)
-+ abort();
-
- if (snprintf (command , len, format, cc, aout) == len)
- abort ();
-
-+ close(tmpfd);
- fp = popen (command, "w");
- if (fp == NULL || fprintf (fp, "%s\n", libc_c) < 0
- || pclose (fp) != 0)