summaryrefslogtreecommitdiff
path: root/graphics/xpaint/patches/patch-ad
blob: 454cbb1669df6e5b6e3f7d172e0726eb54bda23e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
$NetBSD: patch-ad,v 1.4 1998/12/20 14:18:02 christos Exp $
--- readRC.c	1998/02/04 16:36:16	1.1
+++ readRC.c	1998/02/04 16:41:52
@@ -64,6 +64,9 @@
 static FILE *
 openTemp(char **np)
 {
+#ifdef __NetBSD__
+    int	fd;
+#endif
     char *n;
     char xx[256];
 
@@ -72,11 +75,20 @@
 
     strcpy(xx, n);
     strcat(xx, "/XPaintXXXXXXX");
+#ifdef __NetBSD__
+    if ((fd = mkstemp(xx)) < 0)
+	    return (FILE *) NULL;
+    tempName[++tempIndex] = XtNewString(xx);
+    if (np != NULL)
+	*np = tempName[tempIndex];
+    return fdopen(fd, "w");
+#else
     n = mktemp(xx);
     tempName[++tempIndex] = XtNewString(n);
     if (np != NULL)
 	*np = tempName[tempIndex];
     return fopen(tempName[tempIndex], "w");
+#endif
 }
 
 static void 
--- Local.config.orig	Wed Aug 13 19:36:11 1997
+++ Local.config	Wed Feb  4 17:44:44 1998
@@ -130,9 +130,11 @@
 #if defined(FreeBSDArchitecture) || defined(NetBSDArchitecture) ||  \
     defined(BSD386Architecture)
 ARCH_DEFINES = -DHAVE_PARAM_H
-TIFF_INCLUDE = -I/usr/local/include
-TIFF_LIB     = -L/usr/local/lib -ltiff
-JPEG_INCLUDE = -I/usr/local/include
-JPEG_LIB     = -L/usr/local/lib -ljpeg
-XPM_INCLUDE = -I/usr/X11R6/include/X11
+TIFF_INCLUDE = -I${LOCALBASE}/include
+TIFF_LIB     = -L${LOCALBASE}/lib -ltiff
+JPEG_INCLUDE = -I${LOCALBASE}/include
+JPEG_LIB     = -L${LOCALBASE}/lib -ljpeg
+PNG_INCLUDE = -I${LOCALBASE}/include/png
+PNG_LIB     = -L${LOCALBASE}/lib -lpng -lz
+XPM_INCLUDE = -I${X11BASE}/include/X11
 #endif