o Add a printer driver for EPSON laser printer (LP-8XXX, LP-3000C, etc) crerated by EPSON KOWA Corp. (www.epkowa.co.jp) o Update several printer drivers (epag-3.09 and gdevalps-0.21) o Use ${PORTSDIR}/graphics/{png,jpeg} instead of the files jpegsrc.v6b and libpng-1.0.2 fetched by this port when compiling. o Fix PLIST (two entries "bin/ert") o Add bmp16m driver to defalut printer drivers. o Use CC/CFLAGS/PREFIX defined in make.conf Submitted by: "KATO Tsuguru" <tkato@prontomail.ne.jp> Obtained from: ports-jp@jp.freebsd.org
34 lines
1 KiB
Text
34 lines
1 KiB
Text
--- gp_unifs.c.orig Mon Feb 14 11:28:25 2000
|
|
+++ gp_unifs.c Fri Jul 28 23:53:04 2000
|
|
@@ -33,6 +33,7 @@
|
|
#include "stat_.h"
|
|
#include "dirent_.h"
|
|
#include <sys/param.h> /* for MAXPATHLEN */
|
|
+#include <unistd.h>
|
|
|
|
/* Some systems (Interactive for example) don't define MAXPATHLEN,
|
|
* so we define it here. (This probably should be done via a Config-Script.)
|
|
@@ -63,6 +64,8 @@
|
|
const char *mode)
|
|
{ /* The -8 is for XXXXXX plus a possible final / and -. */
|
|
int len = gp_file_name_sizeof - strlen(prefix) - 8;
|
|
+ int fd;
|
|
+ FILE *f;
|
|
|
|
if (gp_getenv("TEMP", fname, &len) != 0)
|
|
strcpy(fname, "/tmp/");
|
|
@@ -75,8 +78,12 @@
|
|
if (*fname != 0 && fname[strlen(fname) - 1] == 'X')
|
|
strcat(fname, "-");
|
|
strcat(fname, "XXXXXX");
|
|
- mktemp(fname);
|
|
- return fopen(fname, mode);
|
|
+ fd = mkstemp(fname);
|
|
+ if (fd == -1)
|
|
+ return NULL;
|
|
+ if ((f = fdopen(fd, mode)) == NULL)
|
|
+ close(fd);
|
|
+ return f;
|
|
}
|
|
|
|
/* Open a file with the given name, as a stream of uninterpreted bytes. */
|