diff options
author | David W. Chapman Jr. <dwcjr@FreeBSD.org> | 2001-08-31 02:58:01 +0000 |
---|---|---|
committer | David W. Chapman Jr. <dwcjr@FreeBSD.org> | 2001-08-31 02:58:01 +0000 |
commit | 7b514ed2ca4923918f82ba1cb282b8e56102bf99 (patch) | |
tree | 9f36a3611bb6499d4333800a3088629b26e1ca3a /graphics/xpaint | |
parent | c846e2f1871248a676e60b77c5879ef22b4568e3 (diff) | |
download | ports-7b514ed2ca4923918f82ba1cb282b8e56102bf99.tar.gz ports-7b514ed2ca4923918f82ba1cb282b8e56102bf99.zip |
Notes
Diffstat (limited to 'graphics/xpaint')
-rw-r--r-- | graphics/xpaint/Makefile | 2 | ||||
-rw-r--r-- | graphics/xpaint/files/patch-ae | 31 |
2 files changed, 14 insertions, 19 deletions
diff --git a/graphics/xpaint/Makefile b/graphics/xpaint/Makefile index 1844d002222c..a40243cf0b03 100644 --- a/graphics/xpaint/Makefile +++ b/graphics/xpaint/Makefile @@ -7,7 +7,7 @@ PORTNAME= xpaint PORTVERSION= 2.6.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= http://home.worldonline.dk/~torsten/xpaint/ \ ftp://ftp.win.ne.jp/pub/graphics/ diff --git a/graphics/xpaint/files/patch-ae b/graphics/xpaint/files/patch-ae index 7e524c66b6a5..605bc04ca04a 100644 --- a/graphics/xpaint/files/patch-ae +++ b/graphics/xpaint/files/patch-ae @@ -1,10 +1,10 @@ ---- readRC.c.orig Sun Sep 3 07:07:09 2000 -+++ readRC.c Fri Mar 9 03:31:53 2001 +--- readRC.c.orig Tue Jun 25 18:50:39 1996 ++++ readRC.c Fri Nov 3 21:51:02 2000 @@ -30,11 +30,13 @@ #include <unistd.h> #endif -+#ifndef HAVE_MKSTEMP ++#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__) #ifdef __STDC__ extern char *mktemp(char *); #else @@ -14,36 +14,31 @@ #define RC_FILENAME ".XPaintrc" -@@ -64,19 +66,32 @@ +@@ -64,6 +66,9 @@ static FILE * openTemp(char **np) { -+#ifdef HAVE_MKSTEMP ++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) + int fd; +#endif char *n; char xx[256]; - if ((n = getenv("TMPDIR")) == NULL) - n = "/tmp"; +@@ -72,11 +77,19 @@ -+#ifdef HAVE_MKSTEMP -+ snprintf(xx, 256, "%s/%s", n, "/XPaintXXXXXXX"); -+ fd = mkstemp(xx); -+ n = xx; -+#else strcpy(xx, n); strcat(xx, "/XPaintXXXXXXX"); ++#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) ++ fd = mkstemp(xx); ++ tempName[++tempIndex] = XtNewString(xx); ++ if (np != NULL) ++ *np = tempName[tempIndex]; ++ return (fd < 0) ? (FILE *)NULL : fdopen(fd, "w"); ++#else 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 |