aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-08-31 13:49:54 +0000
committerDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-08-31 13:49:54 +0000
commit6dbdd9127b4a68f7b546479fed303c21233e8bf0 (patch)
tree24d186518fec13c2cc5b59cf1cf1b4a4a43a39cb
parentfcbc97b421cbd3658bdb8a3f18fcc51138f53b69 (diff)
downloadports-6dbdd9127b4a68f7b546479fed303c21233e8bf0.tar.gz
ports-6dbdd9127b4a68f7b546479fed303c21233e8bf0.zip
Revert patch to original state
Submitted by: tkato@prontomail.com
Notes
Notes: svn path=/head/; revision=47227
-rw-r--r--graphics/xpaint/files/patch-ae31
1 files changed, 18 insertions, 13 deletions
diff --git a/graphics/xpaint/files/patch-ae b/graphics/xpaint/files/patch-ae
index 605bc04ca04a..7e524c66b6a5 100644
--- a/graphics/xpaint/files/patch-ae
+++ b/graphics/xpaint/files/patch-ae
@@ -1,10 +1,10 @@
---- readRC.c.orig Tue Jun 25 18:50:39 1996
-+++ readRC.c Fri Nov 3 21:51:02 2000
+--- readRC.c.orig Sun Sep 3 07:07:09 2000
++++ readRC.c Fri Mar 9 03:31:53 2001
@@ -30,11 +30,13 @@
#include <unistd.h>
#endif
-+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
++#ifndef HAVE_MKSTEMP
#ifdef __STDC__
extern char *mktemp(char *);
#else
@@ -14,31 +14,36 @@
#define RC_FILENAME ".XPaintrc"
-@@ -64,6 +66,9 @@
+@@ -64,19 +66,32 @@
static FILE *
openTemp(char **np)
{
-+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++#ifdef HAVE_MKSTEMP
+ int fd;
+#endif
char *n;
char xx[256];
-@@ -72,11 +77,19 @@
+ if ((n = getenv("TMPDIR")) == NULL)
+ n = "/tmp";
- strcpy(xx, n);
- strcat(xx, "/XPaintXXXXXXX");
-+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
++#ifdef HAVE_MKSTEMP
++ snprintf(xx, 256, "%s/%s", n, "/XPaintXXXXXXX");
+ fd = mkstemp(xx);
-+ tempName[++tempIndex] = XtNewString(xx);
-+ if (np != NULL)
-+ *np = tempName[tempIndex];
-+ return (fd < 0) ? (FILE *)NULL : fdopen(fd, "w");
++ n = xx;
+#else
+ strcpy(xx, n);
+ strcat(xx, "/XPaintXXXXXXX");
n = mktemp(xx);
++#endif
tempName[++tempIndex] = XtNewString(n);
if (np != NULL)
*np = tempName[tempIndex];
++#ifdef HAVE_MKSTEMP
++ return fdopen(fd, "w");
++#else
return fopen(tempName[tempIndex], "w");
+#endif
}
+
+ static void