summaryrefslogtreecommitdiff
path: root/print/ghostscript-gnu/files
diff options
context:
space:
mode:
authorDmitry Sivachenko <demon@FreeBSD.org>2001-11-04 07:35:38 +0000
committerDmitry Sivachenko <demon@FreeBSD.org>2001-11-04 07:35:38 +0000
commit9c45f91fe676941baaafa1e7f811cd23d36329fa (patch)
treee109850c51367da160b9eda35405ec3480949c72 /print/ghostscript-gnu/files
parentUpdate to 7.03 (diff)
Update to 6.52
PR: 31724 Submitted by: KATO Tsuguru <tkato@prontomail.com>
Notes
Notes: svn path=/head/; revision=49552
Diffstat (limited to 'print/ghostscript-gnu/files')
-rw-r--r--print/ghostscript-gnu/files/patch-src:gp_unifs.c68
-rw-r--r--print/ghostscript-gnu/files/patch-src:unix-gcc.mak47
2 files changed, 83 insertions, 32 deletions
diff --git a/print/ghostscript-gnu/files/patch-src:gp_unifs.c b/print/ghostscript-gnu/files/patch-src:gp_unifs.c
index e7db705ace5f..ba0f9597e6e5 100644
--- a/print/ghostscript-gnu/files/patch-src:gp_unifs.c
+++ b/print/ghostscript-gnu/files/patch-src:gp_unifs.c
@@ -1,34 +1,60 @@
---- src/gp_unifs.c.orig Tue Jun 5 15:38:58 2001
-+++ src/gp_unifs.c Wed Jun 20 04:18:03 2001
-@@ -29,6 +29,7 @@
+--- src/gp_unifs.c.orig Tue Jun 5 15:31:44 2001
++++ src/gp_unifs.c Sun Jul 15 22:57:50 2001
+@@ -28,6 +27,8 @@
+ #include "gsutil.h" /* for string_match */
#include "stat_.h"
#include "dirent_.h"
++#include "unistd_.h"
++#include <stdlib.h> /* for mkstemp/mktemp */
#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.)
-@@ -59,6 +60,8 @@
+@@ -57,22 +58,44 @@
+ FILE *
+ gp_open_scratch_file(const char *prefix, char fname[gp_file_name_sizeof],
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_gettmpdir(fname, &len) != 0)
+-{ /* The -8 is for XXXXXX plus a possible final / and -. */
+- int len = gp_file_name_sizeof - strlen(prefix) - 8;
+-
+- if (gp_gettmpdir(fname, &len) != 0)
++{ /* The -8 is for XXXXXX plus a possible final / and -. */
++ int prefix_length = strlen(prefix);
++ int len = gp_file_name_sizeof - prefix_length - 8;
++
++ if (gp_file_name_is_absolute(prefix, prefix_length))
++ *fname = 0;
++ else if (gp_gettmpdir(fname, &len) != 0)
strcpy(fname, "/tmp/");
-@@ -71,8 +74,12 @@
+ else {
+ if (strlen(fname) != 0 && fname[strlen(fname) - 1] != '/')
+ strcat(fname, "/");
+ }
++ if (strlen(fname) + prefix_length + 8 >= gp_file_name_sizeof)
++ return 0; /* file name too long */
+ strcat(fname, prefix);
+ /* Prevent trailing X's in path from being converted by mktemp. */
if (*fname != 0 && fname[strlen(fname) - 1] == 'X')
strcat(fname, "-");
strcat(fname, "XXXXXX");
-- mktemp(fname);
-- return gp_fopentemp(fname, mode);
-+ fd = mkstemp(fname);
-+ if (fd == -1)
-+ return NULL;
-+ if ((f = fdopen(fd, mode)) == NULL)
-+ close(fd);
-+ return f;
++
++#ifdef HAVE_MKSTEMP
++ {
++ int file;
++ FILE *fp;
++
++ file = mkstemp(fname);
++ if (file < -1)
++ return NULL;
++ fp = fdopen(file, mode);
++ if (fp == NULL)
++ close(file);
++
++ return fp;
++ }
++#else
+ mktemp(fname);
+ return gp_fopentemp(fname, mode);
++#endif
}
/* Open a file with the given name, as a stream of uninterpreted bytes. */
diff --git a/print/ghostscript-gnu/files/patch-src:unix-gcc.mak b/print/ghostscript-gnu/files/patch-src:unix-gcc.mak
index 6780bad5bf08..ac8c89578df3 100644
--- a/print/ghostscript-gnu/files/patch-src:unix-gcc.mak
+++ b/print/ghostscript-gnu/files/patch-src:unix-gcc.mak
@@ -1,5 +1,5 @@
---- src/unix-gcc.mak.orig Tue Jun 5 16:54:10 2001
-+++ src/unix-gcc.mak Wed Sep 12 22:41:20 2001
+--- src/unix-gcc.mak.orig Tue Jul 10 12:01:06 2001
++++ src/unix-gcc.mak Sat Nov 3 05:10:14 2001
@@ -27,14 +27,15 @@
# source, generated intermediate file, and object directories
# for the graphics library (GL) and the PostScript/PDF interpreter (PS).
@@ -46,7 +46,23 @@
datadir = $(prefix)/share
gsdir = $(datadir)/ghostscript
gsdatadir = $(gsdir)/$(GS_DOT_VERSION)
-@@ -129,7 +130,7 @@
+@@ -104,6 +105,15 @@
+
+ GENOPT=
+
++# Choose capability options.
++
++# -DHAVE_MKSTEMP
++# uses mkstemp instead of mktemp
++# This gets rid of several security warnings that look
++# ominous. Enable this if you wish to get rid of them.
++
++CAPOPT= -DHAVE_MKSTEMP
++
+ # Define the name of the executable file.
+
+ GS=gs
+@@ -129,7 +139,7 @@
# You may need to change this if the IJG library version changes.
# See jpeg.mak for more information.
@@ -55,13 +71,13 @@
JVERSION=6
# Choose whether to use a shared version of the IJG JPEG library (-ljpeg).
-@@ -149,14 +150,14 @@
+@@ -149,14 +159,14 @@
# You may need to change this if the libpng version changes.
# See libpng.mak for more information.
-PSRCDIR=libpng
+PSRCDIR=${LOCALBASE}/include
- PVERSION=10008
+ PVERSION=10012
# Choose whether to use a shared version of the PNG library, and if so,
# what its name is.
@@ -72,7 +88,7 @@
LIBPNG_NAME=png
# Define the directory where the zlib sources are stored.
-@@ -168,7 +169,7 @@
+@@ -168,7 +178,7 @@
# what its name is (usually libz, but sometimes libgz).
# See gs.mak and Make.htm for more information.
@@ -81,7 +97,7 @@
#ZLIB_NAME=gz
ZLIB_NAME=z
-@@ -183,7 +184,7 @@
+@@ -183,7 +193,7 @@
# Define the name of the C compiler.
@@ -90,7 +106,7 @@
# Define the name of the linker for the final link step.
# Normally this is the same as the C compiler.
-@@ -216,9 +217,11 @@
+@@ -216,9 +226,11 @@
# We don't include -ansi, because this gets in the way of the platform-
# specific stuff that <math.h> typically needs; nevertheless, we expect
# gcc to accept ANSI-style function prototypes and function definitions.
@@ -104,7 +120,7 @@
# Define platform flags for ld.
# SunOS 4.n may need -Bstatic.
-@@ -227,7 +230,7 @@
+@@ -227,7 +239,7 @@
# -R /usr/local/xxx/lib:/usr/local/lib
# giving the full path names of the shared library directories.
# XLDFLAGS can be set from the command line.
@@ -113,7 +129,7 @@
LDFLAGS=$(XLDFLAGS) -fno-common
-@@ -260,7 +263,7 @@
+@@ -260,7 +272,7 @@
# Note that x_.h expects to find the header files in $(XINCLUDE)/X11,
# not in $(XINCLUDE).
@@ -122,7 +138,7 @@
# Define the directory/ies and library names for the X11 library files.
# XLIBDIRS is for ld and should include -L; XLIBDIR is for LD_RUN_PATH
-@@ -272,12 +275,12 @@
+@@ -272,12 +284,12 @@
# Solaris and other SVR4 systems with dynamic linking probably want
#XLIBDIRS=-L/usr/openwin/lib -R/usr/openwin/lib
# X11R6 (on any platform) may need
@@ -138,3 +154,12 @@
# Define whether this platform has floating point hardware:
# FPU_TYPE=2 means floating point is faster than fixed point.
+@@ -406,7 +418,7 @@
+
+ # Define the compilation rules and flags.
+
+-CCFLAGS=$(GENOPT) $(CFLAGS)
++CCFLAGS=$(GENOPT) $(CAPOPT) $(CFLAGS)
+ CC_=$(CC) `cat $(AK)` $(CCFLAGS)
+ CCAUX=$(CC) `cat $(AK)`
+ CC_LEAF=$(CC_) -fomit-frame-pointer