summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2010-06-29 17:17:45 +0000
committerHenry Stiles <henry.stiles@artifex.com>2010-06-29 17:17:45 +0000
commit119e5b2ba13afd06ba8bf8e7b749f0a84b60cc5a (patch)
tree30cdb3b642e96589673864c57b7e061fa9475c46
parentd760dfdf536999bee6b0b7dfe22a51298c7788c1 (diff)
revert back to 11450.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11462 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r--common/msvc_top.mak2
-rw-r--r--gs/base/Makefile.in1
-rw-r--r--gs/base/bcwin32.mak1
-rw-r--r--gs/base/gdevxcmp.c6
-rw-r--r--gs/base/gp_unifn.c4
-rw-r--r--gs/base/gs_dll_call.h2
-rw-r--r--gs/base/lib.mak24
-rw-r--r--gs/base/macos-mcp.mak1
-rw-r--r--gs/base/macosx.mak1
-rw-r--r--gs/base/msvclib.mak1
-rw-r--r--gs/base/openvms.mak1
-rw-r--r--gs/base/ugcclib.mak1
-rw-r--r--gs/base/unix-dll.mak21
-rw-r--r--gs/base/unix-gcc.mak1
-rw-r--r--gs/base/unixansi.mak1
-rw-r--r--gs/base/watclib.mak1
-rw-r--r--gs/base/watcw32.mak1
-rw-r--r--gs/doc/Make.htm10
-rwxr-xr-xgs/jpeg/config.guess1538
-rwxr-xr-xgs/jpeg/config.sub958
-rw-r--r--gs/libpng/ANNOUNCE65
-rw-r--r--gs/libpng/CHANGES62
-rw-r--r--gs/libpng/CMakeLists.txt76
-rw-r--r--gs/libpng/INSTALL4
-rw-r--r--gs/libpng/KNOWNBUG2
-rw-r--r--gs/libpng/LICENSE4
-rw-r--r--gs/libpng/README14
-rw-r--r--gs/libpng/Y2KINFO4
-rwxr-xr-xgs/libpng/contrib/pngminim/decoder/gather.sh2
-rw-r--r--gs/libpng/contrib/pngminim/decoder/makefile2
-rwxr-xr-xgs/libpng/contrib/pngminim/encoder/gather.sh2
-rw-r--r--gs/libpng/contrib/pngminim/encoder/makefile2
-rwxr-xr-xgs/libpng/contrib/pngminim/preader/gather.sh2
-rw-r--r--gs/libpng/contrib/pngminim/preader/makefile2
-rw-r--r--gs/libpng/example.c5
-rw-r--r--gs/libpng/libpng-1.2.42.txt (renamed from gs/libpng/libpng-1.2.44.txt)10
-rw-r--r--gs/libpng/libpng.328
-rw-r--r--gs/libpng/libpngpf.34
-rw-r--r--gs/libpng/png.52
-rw-r--r--gs/libpng/png.c15
-rw-r--r--gs/libpng/png.h41
-rw-r--r--gs/libpng/pngconf.h24
-rw-r--r--gs/libpng/pngget.c9
-rw-r--r--gs/libpng/pngmem.c10
-rw-r--r--gs/libpng/pngpread.c130
-rw-r--r--gs/libpng/pngread.c40
-rw-r--r--gs/libpng/pngrio.c7
-rw-r--r--gs/libpng/pngrtran.c38
-rw-r--r--gs/libpng/pngrutil.c432
-rw-r--r--gs/libpng/pngset.c4
-rw-r--r--gs/libpng/pngtest.c34
-rw-r--r--gs/libpng/pngwio.c2
-rw-r--r--gs/libpng/pngwrite.c23
-rw-r--r--gs/libpng/pngwtran.c7
-rw-r--r--gs/libpng/pngwutil.c16
-rw-r--r--gs/libpng/projects/wince.txt4
-rw-r--r--gs/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj4
-rw-r--r--gs/libpng/scripts/README.txt14
-rwxr-xr-xgs/libpng/scripts/libpng-config-head.in2
-rw-r--r--gs/libpng/scripts/libpng.pc.in2
-rw-r--r--gs/libpng/scripts/makefile.32sunu2
-rw-r--r--gs/libpng/scripts/makefile.64sunu2
-rw-r--r--gs/libpng/scripts/makefile.aix4
-rw-r--r--gs/libpng/scripts/makefile.beos2
-rw-r--r--gs/libpng/scripts/makefile.cegcc2
-rw-r--r--gs/libpng/scripts/makefile.cygwin2
-rw-r--r--gs/libpng/scripts/makefile.darwin2
-rw-r--r--gs/libpng/scripts/makefile.dec2
-rw-r--r--gs/libpng/scripts/makefile.elf2
-rw-r--r--gs/libpng/scripts/makefile.gcmmx2
-rw-r--r--gs/libpng/scripts/makefile.hp642
-rw-r--r--gs/libpng/scripts/makefile.hpgcc2
-rw-r--r--gs/libpng/scripts/makefile.hpux2
-rw-r--r--gs/libpng/scripts/makefile.linux2
-rw-r--r--gs/libpng/scripts/makefile.mingw6
-rw-r--r--gs/libpng/scripts/makefile.ne12bsd2
-rw-r--r--gs/libpng/scripts/makefile.netbsd2
-rw-r--r--gs/libpng/scripts/makefile.nommx2
-rw-r--r--gs/libpng/scripts/makefile.openbsd2
-rw-r--r--gs/libpng/scripts/makefile.sco2
-rw-r--r--gs/libpng/scripts/makefile.sggcc2
-rw-r--r--gs/libpng/scripts/makefile.sgi2
-rw-r--r--gs/libpng/scripts/makefile.so92
-rw-r--r--gs/libpng/scripts/makefile.solaris2
-rw-r--r--gs/libpng/scripts/makefile.solaris-x862
-rw-r--r--gs/libpng/scripts/png32ce.def2
-rw-r--r--gs/libpng/scripts/pngos2.def2
-rw-r--r--gs/libpng/scripts/pngw32.def2
-rw-r--r--gs/psi/msvc32.mak1
-rw-r--r--language_switch/pspcl6_msvc.mak7
-rw-r--r--main/pcl6_gcc.mak1
-rw-r--r--main/pcl6_msvc.mak1
-rw-r--r--xps/xps_msvc.mak1
-rw-r--r--xps/xpsglyphs.c16
-rw-r--r--xps/xpsgradient.c33
-rw-r--r--xps/xpsimage.c8
-rw-r--r--xps/xpsopacity.c10
-rw-r--r--xps/xpspage.c26
-rw-r--r--xps/xpspath.c15
-rw-r--r--xps/xpstile.c22
100 files changed, 1024 insertions, 2905 deletions
diff --git a/common/msvc_top.mak b/common/msvc_top.mak
index 25d666d6f..bb28ab31f 100644
--- a/common/msvc_top.mak
+++ b/common/msvc_top.mak
@@ -107,7 +107,6 @@ $(GENDIR)/ldgs.tr: FORCE
GLGENDIR="$(GLGENDIR)" GLOBJDIR="$(GLOBJDIR)" \
EXPATSRCDIR="$(EXPATSRCDIR)" SHARE_EXPAT="$(SHARE_EXPAT)" \
EXPAT_CFLAGS="$(EXPAT_CFLAGS)" LCMSSRCDIR="$(LCMSSRCDIR)" \
- LCMSPLATFORM="$(LCMSPLATFORM)" \
ICCSRCDIR="$(ICCSRCDIR)" IMDISRCDIR="$(IMDISRCDIR)" \
PNGSRCDIR="$(PNGSRCDIR)" \
SHARE_LIBPNG="$(SHARE_LIBPNG)" \
@@ -155,7 +154,6 @@ $(GENDIR)/ldgs.tr: FORCE
GLGENDIR="$(GLGENDIR)" GLOBJDIR="$(GLOBJDIR)" \
EXPATSRCDIR="$(EXPATSRCDIR)" SHARE_EXPAT="$(SHARE_EXPAT)" \
EXPAT_CFLAGS="$(EXPAT_CFLAGS)" LCMSSRCDIR="$(LCMSSRCDIR)" \
- LCMSPLATFORM="$(LCMSPLATFORM)" \
ICCSRCDIR="$(ICCSRCDIR)" IMDISRCDIR="$(IMDISRCDIR)" \
PNGSRCDIR="$(PNGSRCDIR)" \
SHARE_LIBPNG="$(SHARE_LIBPNG)" \
diff --git a/gs/base/Makefile.in b/gs/base/Makefile.in
index 60deaca91..d916afc0a 100644
--- a/gs/base/Makefile.in
+++ b/gs/base/Makefile.in
@@ -246,7 +246,6 @@ ICCSRCDIR=icclib
# options for lcms color management library
SHARE_LCMS=0
LCMSSRCDIR=lcms
-LCMSPLATFORM=unix
# Define the directory where the ijs source is stored,
# and the process forking method to use for the server.
diff --git a/gs/base/bcwin32.mak b/gs/base/bcwin32.mak
index dfbc35e6a..9b1e2aac6 100644
--- a/gs/base/bcwin32.mak
+++ b/gs/base/bcwin32.mak
@@ -221,7 +221,6 @@ JPXSRCDIR=jasper
!ifndef LCMSSRCDIR
LCMSSRCDIR=lcms
-LCMSPLATFORM=win32
!endif
# Define the directory where the ijs source is stored,
diff --git a/gs/base/gdevxcmp.c b/gs/base/gdevxcmp.c
index 566880662..14207cefb 100644
--- a/gs/base/gdevxcmp.c
+++ b/gs/base/gdevxcmp.c
@@ -605,7 +605,7 @@ gdev_x_map_rgb_color(gx_device * dev, const gx_color_value cv[])
if (xdev->cman.std_cmap.map) {
const XStandardColormap *cmap = xdev->cman.std_cmap.map;
- if (xdev->color_info.num_components > 1) {
+ if (gx_device_has_color(xdev)) {
uint cr, cg, cb; /* rgb cube indices */
X_color_value cvr, cvg, cvb; /* color value on cube */
@@ -659,7 +659,7 @@ gdev_x_map_rgb_color(gx_device * dev, const gx_color_value cv[])
/* If there is no standard colormap, check the dither cube/ramp */
if (xdev->cman.dither_ramp) {
- if (xdev->color_info.num_components > 1) {
+ if (gx_device_has_color(xdev)) {
uint cr, cg, cb; /* rgb cube indices */
X_color_value cvr, cvg, cvb; /* color value on cube */
int dither_rgb = xdev->color_info.dither_colors;
@@ -839,7 +839,7 @@ gdev_x_map_color_rgb(gx_device * dev, gx_color_index color,
* are likely to be small enough to index color_to_rgb.
*/
if (xdev->cman.dither_ramp) {
- if (xdev->color_info.num_components > 1) {
+ if (gx_device_has_color(xdev)) {
int size = xdev->color_info.dither_colors;
int size3 = size * size * size;
int i;
diff --git a/gs/base/gp_unifn.c b/gs/base/gp_unifn.c
index 35bd9d6fb..dc120352d 100644
--- a/gs/base/gp_unifn.c
+++ b/gs/base/gp_unifn.c
@@ -26,8 +26,8 @@ const char gp_file_name_list_separator = ':';
const char gp_fmode_binary_suffix[] = "";
/* Define the file modes for binary reading or writing. */
-const char gp_fmode_rb[] = "rb";
-const char gp_fmode_wb[] = "wb";
+const char gp_fmode_rb[] = "r";
+const char gp_fmode_wb[] = "w";
/* -------------- Helpers for gp_file_name_combine_generic ------------- */
diff --git a/gs/base/gs_dll_call.h b/gs/base/gs_dll_call.h
index 761f173b6..b968d72fa 100644
--- a/gs/base/gs_dll_call.h
+++ b/gs/base/gs_dll_call.h
@@ -19,10 +19,8 @@
#ifdef __WINDOWS__
-#ifndef _Windows
# define _Windows
#endif
-#endif
#ifdef _Windows
# ifndef GSDLLEXPORT
diff --git a/gs/base/lib.mak b/gs/base/lib.mak
index da0d6ae7f..0170409b4 100644
--- a/gs/base/lib.mak
+++ b/gs/base/lib.mak
@@ -37,8 +37,6 @@ GLCCSHARED=$(CC_SHARED) $(GLCCFLAGS)
# msvc builds, and lcms configures itself to depend on msvc extensions
# (inline asm, including windows.h) when compiled under msvc.
GLLCMSCC=$(CC) $(GCFLAGS) $(I_)$(GLI_) $(II)$(LCMSSRCDIR)$(D)include$(_I) $(GLF_)
-# Alternative GLLCMSCC_ for everything except windows:
-GLLCMSCC_=$(GLCC) $(GCFLAGS) $(I_)$(GLI_) $(II)$(LCMSSRCDIR)$(D)include$(_I) $(GLF_)
lcms_h=$(LCMSSRCDIR)$(D)include$(D)lcms.h
icc34_h=$(LCMSSRCDIR)$(D)include$(D)icc34.h
@@ -2483,8 +2481,8 @@ $(GLOBJ)gxctable.$(OBJ) : $(GLSRC)gxctable.c $(GX)\
# ---------------- ICCBased color ---------------- #
gsicc_=$(GLOBJ)gsicc_manage.$(OBJ) $(GLOBJ)gsicc_cache.$(OBJ)\
- $(GLOBJ)gsicc_littlecms_$(LCMSPLATFORM).$(OBJ) $(GLOBJ)gsicc_profilecache.$(OBJ)\
- $(GLOBJ)gsicc_create_$(LCMSPLATFORM).$(OBJ)
+ $(GLOBJ)gsicc_littlecms.$(OBJ) $(GLOBJ)gsicc_profilecache.$(OBJ)\
+ $(GLOBJ)gsicc_create.$(OBJ)
sicclib_=$(GLOBJ)gsicc.$(OBJ)
$(GLD)sicclib.dev : $(LIB_MAK) $(ECHOGS_XE) $(sicclib_) $(gsicc_)\
@@ -2525,30 +2523,20 @@ $(GLOBJ)gsicc_profilecache.$(OBJ) : $(GLSRC)gsicc_profilecache.c $(GX) $(std_h)\
$(gserrors_h)
$(GLCC) $(GLO_)gsicc_profilecache.$(OBJ) $(C_) $(GLSRC)gsicc_profilecache.c
-$(GLOBJ)gsicc_littlecms_win32.$(OBJ) : $(GLSRC)gsicc_littlecms.c\
+$(GLOBJ)gsicc_littlecms.$(OBJ) : $(GLSRC)gsicc_littlecms.c\
$(gsicc_littlecms_h) $(lcms_h) $(gserror_h) $(gslibctx_h)
- $(GLLCMSCC) $(GLO_)gsicc_littlecms_win32.$(OBJ) $(C_) $(GLSRC)gsicc_littlecms.c
+ $(GLLCMSCC) $(GLO_)gsicc_littlecms.$(OBJ) $(C_) $(GLSRC)gsicc_littlecms.c
# Note that gsicc_create requires compile with lcms to obtain icc34.h
# header file that is used for creating ICC structures from PS objects.
# This is needed even if PDF/PS interpreter is built with a different CMS.
# This object is here instead of in psi since it is used lazily by the
# remap operations.
-$(GLOBJ)gsicc_create_win32.$(OBJ) : $(GLSRC)gsicc_create.c $(GX) $(string__h)\
+$(GLOBJ)gsicc_create.$(OBJ) : $(GLSRC)gsicc_create.c $(GX) $(string__h)\
$(gsmemory_h) $(gx_h) $(gxistate_h) $(gstypes_h) $(gscspace_h)\
$(gscie_h) $(gsicc_create_h) $(gxarith_h) $(gsicc_manage_h) $(gsicc_cache_h)\
$(math__h) $(gscolor2_h) $(gxcie_h) $(icc34_h)
- $(GLLCMSCC) $(GLO_)gsicc_create_win32.$(OBJ) $(C_) $(GLSRC)gsicc_create.c
-
-$(GLOBJ)gsicc_littlecms_unix.$(OBJ) : $(GLSRC)gsicc_littlecms.c\
- $(gsicc_littlecms_h) $(lcms_h) $(gserror_h)
- $(GLLCMSCC_) $(GLO_)gsicc_littlecms_unix.$(OBJ) $(C_) $(GLSRC)gsicc_littlecms.c
-
-$(GLOBJ)gsicc_create_unix.$(OBJ) : $(GLSRC)gsicc_create.c $(GX) $(string__h)\
- $(gsmemory_h) $(gx_h) $(gxistate_h) $(gstypes_h) $(gscspace_h)\
- $(gscie_h) $(gsicc_create_h) $(gxarith_h) $(gsicc_manage_h) $(gsicc_cache_h)\
- $(math__h) $(gscolor2_h) $(gxcie_h) $(icc34_h)
- $(GLLCMSCC_) $(GLO_)gsicc_create_unix.$(OBJ) $(C_) $(GLSRC)gsicc_create.c
+ $(GLLCMSCC) $(GLO_)gsicc_create.$(OBJ) $(C_) $(GLSRC)gsicc_create.c
#include "icc34.h" /* Note this header is needed even if lcms is not compiled as default CMS */
diff --git a/gs/base/macos-mcp.mak b/gs/base/macos-mcp.mak
index 5a75a5bd8..1fd784a03 100644
--- a/gs/base/macos-mcp.mak
+++ b/gs/base/macos-mcp.mak
@@ -121,7 +121,6 @@ JPXSRCDIR=jasper
# See lcms.mak for more information
LCMSSRCDIR=lcms
-LCMSPLATFORM=unix
# IJS has not been ported to MacOS Classic. If you do the port,
# you'll need to set these values. You'll also need to
diff --git a/gs/base/macosx.mak b/gs/base/macosx.mak
index 12d029c0b..3b954e7f4 100644
--- a/gs/base/macosx.mak
+++ b/gs/base/macosx.mak
@@ -173,7 +173,6 @@ JBIG2SRCDIR=jbig2dec
# See lcms.mak for more information
LCMSSRCDIR=lcms
-LCMSPLATFORM=unix
# Define the directory where the ijs source is stored,
# and the process forking method to use for the server.
diff --git a/gs/base/msvclib.mak b/gs/base/msvclib.mak
index 047716412..2a1a9e609 100644
--- a/gs/base/msvclib.mak
+++ b/gs/base/msvclib.mak
@@ -177,7 +177,6 @@ JPXSRCDIR=jasper
!ifndef LCMSSRCDIR
LCMSSRCDIR=lcms
-LCMSPLATFORM=win32
!endif
# Define the directory where the imdi library source is stored.
diff --git a/gs/base/openvms.mak b/gs/base/openvms.mak
index 6d8cd6f35..60b9bd8da 100644
--- a/gs/base/openvms.mak
+++ b/gs/base/openvms.mak
@@ -134,7 +134,6 @@ JPXSRCDIR=jasper
# See lcms.mak for more information
LCMSSRCDIR=[.lcms]
-LCMSPLATFORM=unix
# IJS has not been ported to OpenVMS. If you do the port,
# you'll need to set these values. You'll also need to
diff --git a/gs/base/ugcclib.mak b/gs/base/ugcclib.mak
index 914d24a08..696f66940 100644
--- a/gs/base/ugcclib.mak
+++ b/gs/base/ugcclib.mak
@@ -61,7 +61,6 @@ JBIG2SRCDIR=jbig2dec
# See lcms.mak for more information
LCMSSRCDIR=lcms
-LCMSPLATFORM=unix
# Define the directory where the ijs source is stored,
# and the process forking method to use for the server.
diff --git a/gs/base/unix-dll.mak b/gs/base/unix-dll.mak
index 2426a9bf1..b2c50ee53 100644
--- a/gs/base/unix-dll.mak
+++ b/gs/base/unix-dll.mak
@@ -51,29 +51,14 @@ GS_SONAME_MAJOR=$(GS_SONAME).$(GS_VERSION_MAJOR)
GS_SONAME_MAJOR_MINOR=$(GS_SONAME).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR)
LDFLAGS_SO=-shared -Wl,-soname=$(GS_SONAME_MAJOR)
-## BSD Make does not support conditionals (ifeq/ifneq/ifdef/ifndef),
-## otherwise we could uncommenting these lines.
-
-#ifeq ("$(TARGET)","darwin")
-## MacOS X
+# MacOS X
#GS_SOEXT=dylib
#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
#GS_SONAME_MAJOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_SOEXT)
#GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE).$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT)
-##LDFLAGS_SO=-dynamiclib -flat_namespace
-##LDFLAGS_SO=-dynamiclib -install_name $(GS_SONAME_MAJOR_MINOR)
+#LDFLAGS_SO=-dynamiclib -flat_namespace
+#LDFLAGS_SO=-dynamiclib -install_name $(GS_SONAME_MAJOR_MINOR)
#LDFLAGS_SO=-dynamiclib -install_name $(FRAMEWORK_NAME)
-#endif
-
-#ifeq ("$(TARGET)",mingw")
-## Mingw
-#GS_SONAME_BASE=gs
-#GS_SOEXT=dll
-#GS_SONAME=$(GS_SONAME_BASE).$(GS_SOEXT)
-#GS_SONAME_MAJOR=$(GS_SONAME_BASE)-$(GS_VERSION_MAJOR).$(GS_SOEXT)
-#GS_SONAME_MAJOR_MINOR=$(GS_SONAME_BASE)-$(GS_VERSION_MAJOR).$(GS_VERSION_MINOR).$(GS_SOEXT)
-#LDFLAGS_SO=-shared -Wl,-soname=$(GS_SONAME_MAJOR_MINOR)
-#endif
GS_SO=$(BINDIR)/$(GS_SONAME)
GS_SO_MAJOR=$(BINDIR)/$(GS_SONAME_MAJOR)
diff --git a/gs/base/unix-gcc.mak b/gs/base/unix-gcc.mak
index c963162be..90acc2d9e 100644
--- a/gs/base/unix-gcc.mak
+++ b/gs/base/unix-gcc.mak
@@ -194,7 +194,6 @@ ICCSRCDIR=icclib
SHARE_LCMS=0
LCMSSRCDIR=lcms
-LCMSPLATFORM=unix
# Define the directory where the ijs source is stored,
# and the process forking method to use for the server.
diff --git a/gs/base/unixansi.mak b/gs/base/unixansi.mak
index 402b2d6a1..fbaa8edae 100644
--- a/gs/base/unixansi.mak
+++ b/gs/base/unixansi.mak
@@ -179,7 +179,6 @@ ICCSRCDIR=icclib
SHARE_LCMS=0
LCMSSRCDIR=lcms
-LCMSPLATFORM=unix
# Define the directory where the ijs source is stored,
# and the process forking method to use for the server.
diff --git a/gs/base/watclib.mak b/gs/base/watclib.mak
index 6ab508a7d..df7141a57 100644
--- a/gs/base/watclib.mak
+++ b/gs/base/watclib.mak
@@ -81,7 +81,6 @@ JBIG2SRCDIR=jbig2dec
!ifndef LCMSSRCDIR
LCMSSRCDIR=lcms
-LCMSPLATFORM=win32
!endif
# Define the directory where the ijs source is stored,
diff --git a/gs/base/watcw32.mak b/gs/base/watcw32.mak
index c68629b94..1245661d0 100644
--- a/gs/base/watcw32.mak
+++ b/gs/base/watcw32.mak
@@ -124,7 +124,6 @@ JBIG2SRCDIR=jbig2dec
!ifndef LCMSSRCDIR
LCMSSRCDIR=lcms
-LCMSPLATFORM=win32
!endif
# Define the directory where the ijs source is stored,
diff --git a/gs/doc/Make.htm b/gs/doc/Make.htm
index 915db39e0..f54b2c92b 100644
--- a/gs/doc/Make.htm
+++ b/gs/doc/Make.htm
@@ -820,6 +820,7 @@ executable and want to save it, move it first to another place, because
<dt><code>make so</code>
<dd>On some platforms (Linux, *BSD, Darwin/Mac OS X, SunOS),
it is possible to build ghostscript as a shared object library.
+<code>./configure --enable-dynamic</code>, is required.
There is a corresponding "<code>make soclean</code>" for cleaning up.
</dl>
@@ -1509,14 +1510,13 @@ make
<p>or
<blockquote><pre>
-./configure
+./configure --enable-dynamic
make so
</pre></blockquote>
-<p>for building ghostscript as a shared library. It is recommended to
-have the extra option <code>--enable-dynamic</code> in
-<code>./configure --enable-dynamic</code> which returns an error message
-on platforms for which shared-library support is inadequate.
+<p>for building ghostscript as a shared library.
+<code>./configure --enable-dynamic</code> will return an error message
+on unsupported platforms.
<p>Please report any problems with this method on your system as a bug.
diff --git a/gs/jpeg/config.guess b/gs/jpeg/config.guess
index da8331460..413ed41c0 100755
--- a/gs/jpeg/config.guess
+++ b/gs/jpeg/config.guess
@@ -1,11 +1,7 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-# Free Software Foundation, Inc.
-
-timestamp='2009-04-27'
-
+# Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
@@ -18,343 +14,154 @@ timestamp='2009-04-27'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-
-# Originally written by Per Bothner <per@bothner.com>.
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
# exits with 0. Otherwise, it exits with 1.
#
# The plan is that this can be called by configure scripts if you
-# don't specify an explicit build system type.
-
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION]
-
-Output the configuration name of the system \`$me' is run on.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.guess ($timestamp)
-
-Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help" >&2
- exit 1 ;;
- * )
- break ;;
- esac
-done
-
-if test $# != 0; then
- echo "$me: too many arguments$help" >&2
- exit 1
-fi
-
-trap 'exit 1' 1 2 15
-
-# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
-# compiler to aid in system detection is discouraged as it requires
-# temporary files to be created and, as you can see below, it is a
-# headache to deal with in a portable fashion.
-
-# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
-# use `HOST_CC' if defined, but it is deprecated.
-
-# Portable tmp directory creation inspired by the Autoconf team.
-
-set_cc_for_build='
-trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
-: ${TMPDIR=/tmp} ;
- { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
- { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
- { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
- { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
-dummy=$tmp/dummy ;
-tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int x;" > $dummy.c ;
- for c in cc gcc c89 c99 ; do
- if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
- CC_FOR_BUILD="$c"; break ;
- fi ;
- done ;
- if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found ;
- fi
- ;;
- ,,*) CC_FOR_BUILD=$CC ;;
- ,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac ; set_cc_for_build= ;'
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 1994-08-24)
+# (ghazi@noc.rutgers.edu 8/24/94.)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
- *:NetBSD:*:*)
- # NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
- # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
- # switched to ELF, *-*-netbsd* would select the old
- # object file format. This provides both forward
- # compatibility and a consistent mechanism for selecting the
- # object file format.
- #
- # Note: NetBSD doesn't particularly care about the vendor
- # portion of the name. We always set it to "unknown".
- sysctl="sysctl -n hw.machine_arch"
- UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
- /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
- case "${UNAME_MACHINE_ARCH}" in
- armeb) machine=armeb-unknown ;;
- arm*) machine=arm-unknown ;;
- sh3el) machine=shl-unknown ;;
- sh3eb) machine=sh-unknown ;;
- sh5el) machine=sh5le-unknown ;;
- *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
- esac
- # The Operating System including object format, if it has switched
- # to ELF recently, or will in the future.
- case "${UNAME_MACHINE_ARCH}" in
- arm*|i386|m68k|ns32k|sh3*|sparc|vax)
- eval $set_cc_for_build
- if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep __ELF__ >/dev/null
- then
- # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
- # Return netbsd for either. FIX?
- os=netbsd
- else
- os=netbsdelf
- fi
- ;;
- *)
- os=netbsd
- ;;
- esac
- # The OS release
- # Debian GNU/NetBSD machines have a different userland, and
- # thus, need a distinct triplet. However, they do not need
- # kernel version information, so it can be replaced with a
- # suitable tag, in the style of linux-gnu.
- case "${UNAME_VERSION}" in
- Debian*)
- release='-gnu'
- ;;
- *)
- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
- ;;
- esac
- # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
- # contains redundant information, the shorter form:
- # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
- echo "${machine}-${os}${release}"
- exit ;;
- *:OpenBSD:*:*)
- UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
- echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
- exit ;;
- *:ekkoBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
- exit ;;
- *:SolidBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
- exit ;;
- macppc:MirBSD:*:*)
- echo powerpc-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
- *:MirBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
- exit ;;
alpha:OSF1:*:*)
- case $UNAME_RELEASE in
- *4.0)
+ if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- ;;
- *5.*)
- UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
- ;;
- esac
- # According to Compaq, /usr/sbin/psrinfo has been available on
- # OSF/1 and Tru64 systems produced since 1995. I hope that
- # covers most systems running today. This code pipes the CPU
- # types through head -n 1, so we only detect the type of CPU 0.
- ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
- case "$ALPHA_CPU_TYPE" in
- "EV4 (21064)")
- UNAME_MACHINE="alpha" ;;
- "EV4.5 (21064)")
- UNAME_MACHINE="alpha" ;;
- "LCA4 (21066/21068)")
- UNAME_MACHINE="alpha" ;;
- "EV5 (21164)")
- UNAME_MACHINE="alphaev5" ;;
- "EV5.6 (21164A)")
- UNAME_MACHINE="alphaev56" ;;
- "EV5.6 (21164PC)")
- UNAME_MACHINE="alphapca56" ;;
- "EV5.7 (21164PC)")
- UNAME_MACHINE="alphapca57" ;;
- "EV6 (21264)")
- UNAME_MACHINE="alphaev6" ;;
- "EV6.7 (21264A)")
- UNAME_MACHINE="alphaev67" ;;
- "EV6.8CB (21264C)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8AL (21264B)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.8CX (21264D)")
- UNAME_MACHINE="alphaev68" ;;
- "EV6.9A (21264/EV69A)")
- UNAME_MACHINE="alphaev69" ;;
- "EV7 (21364)")
- UNAME_MACHINE="alphaev7" ;;
- "EV7.9 (21364A)")
- UNAME_MACHINE="alphaev79" ;;
- esac
- # A Pn.n version is a patched version.
+ fi
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- exit ;;
- Alpha\ *:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # Should we change UNAME_MACHINE based on the output of uname instead
- # of the specific Alpha model?
- echo alpha-pc-interix
- exit ;;
+ cat <<EOF >dummy.s
+ .globl main
+ .ent main
+main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
+EOF
+ ${CC-cc} dummy.s -o dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+ fi
+ rm -f dummy.s dummy
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
+ exit 0 ;;
21064:Windows_NT:50:3)
echo alpha-dec-winnt3.5
- exit ;;
+ exit 0 ;;
Amiga*:UNIX_System_V:4.0:*)
- echo m68k-unknown-sysv4
- exit ;;
- *:[Aa]miga[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-amigaos
- exit ;;
- *:[Mm]orph[Oo][Ss]:*:*)
- echo ${UNAME_MACHINE}-unknown-morphos
- exit ;;
- *:OS/390:*:*)
- echo i370-ibm-openedition
- exit ;;
- *:z/VM:*:*)
- echo s390-ibm-zvmoe
- exit ;;
- *:OS400:*:*)
- echo powerpc-ibm-os400
- exit ;;
+ echo m68k-cbm-sysv4
+ exit 0;;
+ amiga:NetBSD:*:*)
+ echo m68k-cbm-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc64:OpenBSD:*:*)
+ echo mips64el-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hkmips:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mips-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
- exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
- echo arm-unknown-riscos
- exit ;;
- SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ exit 0;;
+ arm32:NetBSD:*:*)
+ echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ SR2?01:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
- exit ;;
- Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ exit 0;;
+ Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
- exit ;;
- NILE*:*:*:dcosx)
+ exit 0 ;;
+ NILE:*:*:dcosx)
echo pyramid-pyramid-svr4
- exit ;;
- DRS?6000:unix:4.0:6*)
- echo sparc-icl-nx6
- exit ;;
- DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
- case `/usr/bin/uname -p` in
- sparc) echo sparc-icl-nx7; exit ;;
- esac ;;
- s390x:SunOS:*:*)
- echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- sun4H:SunOS:5.*:*)
- echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
- i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
- eval $set_cc_for_build
- SUN_ARCH="i386"
- # If there is a compiler, see if it is configured for 64-bit objects.
- # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
- # This test works for both compilers.
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- SUN_ARCH="x86_64"
- fi
- fi
- echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
@@ -363,12 +170,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
- exit ;;
+ exit 0 ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
sun*:*:4.2BSD:*)
- UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
@@ -378,63 +185,52 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
echo sparc-sun-sunos${UNAME_RELEASE}
;;
esac
- exit ;;
+ exit 0 ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
- exit ;;
- # The situation for MiNT is a little confusing. The machine name
- # can be virtually everything (everything which is not
- # "atarist" or "atariste" at least should have a processor
- # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
- # to the lowercase version "mint" (or "freemint"). Finally
- # the system name "TOS" denotes a system which is actually not
- # MiNT. But MiNT is downward compatible to TOS, so this should
- # be no problem.
- atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
- echo m68k-atari-mint${UNAME_RELEASE}
- exit ;;
- milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
- echo m68k-milan-mint${UNAME_RELEASE}
- exit ;;
- hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
- echo m68k-hades-mint${UNAME_RELEASE}
- exit ;;
- *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
- echo m68k-unknown-mint${UNAME_RELEASE}
- exit ;;
- m68k:machten:*:*)
- echo m68k-apple-machten${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
+ atari*:NetBSD:*:*)
+ echo m68k-atari-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:NetBSD:*:*)
+ echo m68k-sun-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3*:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:NetBSD:*:*)
+ echo m68k-apple-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
- exit ;;
+ exit 0 ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix${UNAME_RELEASE}
- exit ;;
- 2020:CLIX:*:* | 2430:CLIX:*:*)
+ exit 0 ;;
+ 2020:CLIX:*:*)
echo clipper-intergraph-clix${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-#ifdef __cplusplus
-#include <stdio.h> /* for printf() prototype */
- int main (int argc, char *argv[]) {
-#else
- int main (argc, argv) int argc; char *argv[]; {
-#endif
+ sed 's/^ //' << EOF >dummy.c
+ int main (argc, argv) int argc; char **argv; {
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
@@ -449,83 +245,62 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
exit (-1);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c &&
- dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
- SYSTEM_NAME=`$dummy $dummyarg` &&
- { echo "$SYSTEM_NAME"; exit; }
+ ${CC-cc} dummy.c -o dummy \
+ && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
echo mips-mips-riscos${UNAME_RELEASE}
- exit ;;
- Motorola:PowerMAX_OS:*:*)
- echo powerpc-motorola-powermax
- exit ;;
- Motorola:*:4.3:PL8-*)
- echo powerpc-harris-powermax
- exit ;;
- Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
- echo powerpc-harris-powermax
- exit ;;
+ exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
- exit ;;
+ exit 0 ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
- exit ;;
+ exit 0 ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
- exit ;;
+ exit 0 ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
- exit ;;
+ exit 0 ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
- if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
- then
- if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
- [ ${TARGET_BINARY_INTERFACE}x = x ]
- then
+ if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
+ -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
echo m88k-dg-dgux${UNAME_RELEASE}
- else
- echo m88k-dg-dguxbcs${UNAME_RELEASE}
- fi
else
- echo i586-dg-dgux${UNAME_RELEASE}
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
fi
- exit ;;
+ else echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
- exit ;;
+ exit 0 ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
- exit ;;
+ exit 0 ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
- exit ;;
+ exit 0 ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
- exit ;;
+ exit 0 ;;
*:IRIX*:*:*)
echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
- exit ;;
+ exit 0 ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
- echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
- exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i*86:AIX:*:*)
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i?86:AIX:*:*)
echo i386-ibm-aix
- exit ;;
- ia64:AIX:*:*)
- if [ -x /usr/bin/oslevel ] ; then
- IBM_REV=`/usr/bin/oslevel`
- else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
- fi
- echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
- exit ;;
+ exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >dummy.c
#include <sys/systemcfg.h>
main()
@@ -536,21 +311,17 @@ EOF
exit(0);
}
EOF
- if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
- then
- echo "$SYSTEM_NAME"
- else
- echo rs6000-ibm-aix3.2.5
- fi
+ ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ echo rs6000-ibm-aix3.2.5
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
- exit ;;
- *:AIX:*:[456])
- IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
- if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ exit 0 ;;
+ *:AIX:*:4)
+ if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
@@ -558,120 +329,43 @@ EOF
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
- IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ IBM_REV=4.${UNAME_RELEASE}
fi
echo ${IBM_ARCH}-ibm-aix${IBM_REV}
- exit ;;
+ exit 0 ;;
*:AIX:*:*)
echo rs6000-ibm-aix
- exit ;;
+ exit 0 ;;
ibmrt:4.4BSD:*|romp-ibm:BSD:*)
echo romp-ibm-bsd4.4
- exit ;;
- ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and
echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
- exit ;; # report: romp-ibm BSD 4.3
+ exit 0 ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
- exit ;;
+ exit 0 ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
- exit ;;
+ exit 0 ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
- exit ;;
+ exit 0 ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
- exit ;;
- 9000/[34678]??:HP-UX:*:*)
- HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ exit 0 ;;
+ 9000/[3478]??:HP-UX:*:*)
case "${UNAME_MACHINE}" in
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
- 9000/[678][0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
- sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
- case "${sc_cpu_version}" in
- 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
- 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
- 532) # CPU_PA_RISC2_0
- case "${sc_kernel_bits}" in
- 32) HP_ARCH="hppa2.0n" ;;
- 64) HP_ARCH="hppa2.0w" ;;
- '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
- esac ;;
- esac
- fi
- if [ "${HP_ARCH}" = "" ]; then
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
-
- #define _HPUX_SOURCE
- #include <stdlib.h>
- #include <unistd.h>
-
- int main ()
- {
- #if defined(_SC_KERNEL_BITS)
- long bits = sysconf(_SC_KERNEL_BITS);
- #endif
- long cpu = sysconf (_SC_CPU_VERSION);
-
- switch (cpu)
- {
- case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
- case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
- case CPU_PA_RISC2_0:
- #if defined(_SC_KERNEL_BITS)
- switch (bits)
- {
- case 64: puts ("hppa2.0w"); break;
- case 32: puts ("hppa2.0n"); break;
- default: puts ("hppa2.0"); break;
- } break;
- #else /* !defined(_SC_KERNEL_BITS) */
- puts ("hppa2.0"); break;
- #endif
- default: puts ("hppa1.0"); break;
- }
- exit (0);
- }
-EOF
- (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
- test -z "$HP_ARCH" && HP_ARCH=hppa
- fi ;;
+ 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
+ 9000/8?? ) HP_ARCH=hppa1.0 ;;
esac
- if [ ${HP_ARCH} = "hppa2.0w" ]
- then
- eval $set_cc_for_build
-
- # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
- # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
- # generating 64-bit code. GNU and HP use different nomenclature:
- #
- # $ CC_FOR_BUILD=cc ./config.guess
- # => hppa2.0w-hp-hpux11.23
- # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
- # => hppa64-hp-hpux11.23
-
- if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
- then
- HP_ARCH="hppa2.0w"
- else
- HP_ARCH="hppa64"
- fi
- fi
- echo ${HP_ARCH}-hp-hpux${HPUX_REV}
- exit ;;
- ia64:HP-UX:*:*)
HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
- echo ia64-hp-hpux${HPUX_REV}
- exit ;;
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
3050*:HI-UX:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
+ sed 's/^ //' << EOF >dummy.c
#include <unistd.h>
int
main ()
@@ -696,504 +390,324 @@ EOF
exit (0);
}
EOF
- $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
+ ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
echo unknown-hitachi-hiuxwe2
- exit ;;
+ exit 0 ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
echo hppa1.1-hp-bsd
- exit ;;
+ exit 0 ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
- exit ;;
- *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
- echo hppa1.0-hp-mpeix
- exit ;;
+ exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
echo hppa1.1-hp-osf
- exit ;;
+ exit 0 ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
- exit ;;
- i*86:OSF1:*:*)
+ exit 0 ;;
+ i?86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
echo ${UNAME_MACHINE}-unknown-osf1
fi
- exit ;;
+ exit 0 ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
- exit ;;
+ exit 0 ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
- exit ;;
+ exit 0 ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit 0 ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
- exit ;;
+ exit 0 ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
- exit ;;
+ exit 0 ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
- exit ;;
+ exit 0 ;;
+ CRAY*X-MP:*:*:*)
+ echo xmp-cray-unicos
+ exit 0 ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
+ echo ymp-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
- -e 's/\.[^.]*$/.X/'
- exit ;;
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ exit 0 ;;
CRAY*TS:*:*:*)
- echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*T3E:*:*:*)
- echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- CRAY*SV1:*:*:*)
- echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- *:UNICOS/mp:*:*)
- echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
- exit ;;
- F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
- FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ echo t90-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
+ CRAY-2:*:*:*)
+ echo cray2-cray-unicos
+ exit 0 ;;
+ F300:UNIX_System_V:*:*)
+ FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
- echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- 5000:UNIX_System_V:4.*:*)
- FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
- FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
- echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
- exit ;;
- i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ F301:UNIX_System_V:*:*)
+ echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+ exit 0 ;;
+ hp3[0-9][05]:NetBSD:*:*)
+ echo m68k-hp-netbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ i?86:BSD/386:*:* | *:BSD/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
- exit ;;
- sparc*:BSD/OS:*:*)
- echo sparc-unknown-bsdi${UNAME_RELEASE}
- exit ;;
- *:BSD/OS:*:*)
- echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
*:FreeBSD:*:*)
- case ${UNAME_MACHINE} in
- pc98)
- echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- amd64)
- echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- *)
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
- esac
- exit ;;
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
+ *:NetBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ exit 0 ;;
i*:CYGWIN*:*)
- echo ${UNAME_MACHINE}-pc-cygwin
- exit ;;
- *:MINGW*:*)
- echo ${UNAME_MACHINE}-pc-mingw32
- exit ;;
- i*:windows32*:*)
- # uname -m includes "-pc" on this system.
- echo ${UNAME_MACHINE}-mingw32
- exit ;;
- i*:PW*:*)
- echo ${UNAME_MACHINE}-pc-pw32
- exit ;;
- *:Interix*:[3456]*)
- case ${UNAME_MACHINE} in
- x86)
- echo i586-pc-interix${UNAME_RELEASE}
- exit ;;
- EM64T | authenticamd | genuineintel)
- echo x86_64-unknown-interix${UNAME_RELEASE}
- exit ;;
- IA64)
- echo ia64-unknown-interix${UNAME_RELEASE}
- exit ;;
- esac ;;
- [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
- echo i${UNAME_MACHINE}-pc-mks
- exit ;;
- i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
- # How do we know it's Interix rather than the generic POSIX subsystem?
- # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
- # UNAME_MACHINE based on the output of uname instead of i386?
- echo i586-pc-interix
- exit ;;
- i*:UWIN*:*)
- echo ${UNAME_MACHINE}-pc-uwin
- exit ;;
- amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
- echo x86_64-unknown-cygwin
- exit ;;
+ echo i386-pc-cygwin32
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo i386-pc-mingw32
+ exit 0 ;;
p*:CYGWIN*:*)
- echo powerpcle-unknown-cygwin
- exit ;;
+ echo powerpcle-unknown-cygwin32
+ exit 0 ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
- exit ;;
+ exit 0 ;;
*:GNU:*:*)
- # the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
- exit ;;
- *:GNU/*:*:*)
- # other systems with GNU libc and userland
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
- exit ;;
- i*86:Minix:*:*)
- echo ${UNAME_MACHINE}-pc-minix
- exit ;;
- arm*:Linux:*:*)
- eval $set_cc_for_build
- if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
- | grep -q __ARM_EABI__
- then
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
- fi
- exit ;;
- avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- cris:Linux:*:*)
- echo cris-axis-linux-gnu
- exit ;;
- crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
- exit ;;
- frv:Linux:*:*)
- echo frv-unknown-linux-gnu
- exit ;;
- ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- mips:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips
- #undef mipsel
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mipsel
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- mips64:Linux:*:*)
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #undef CPU
- #undef mips64
- #undef mips64el
- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
- #else
- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
- #else
- CPU=
- #endif
- #endif
-EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
- ;;
- or32:Linux:*:*)
- echo or32-unknown-linux-gnu
- exit ;;
- ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
- exit ;;
- ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
- exit ;;
- alpha:Linux:*:*)
- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
- EV5) UNAME_MACHINE=alphaev5 ;;
- EV56) UNAME_MACHINE=alphaev56 ;;
- PCA56) UNAME_MACHINE=alphapca56 ;;
- PCA57) UNAME_MACHINE=alphapca56 ;;
- EV6) UNAME_MACHINE=alphaev6 ;;
- EV67) UNAME_MACHINE=alphaev67 ;;
- EV68*) UNAME_MACHINE=alphaev68 ;;
- esac
- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
- exit ;;
- padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
- exit ;;
- parisc:Linux:*:* | hppa:Linux:*:*)
- # Look for CPU level
- case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
- *) echo hppa-unknown-linux-gnu ;;
- esac
- exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
- exit ;;
- s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
- exit ;;
- sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
- exit ;;
- x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
- exit ;;
- xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
- exit ;;
- i*86:Linux:*:*)
+ exit 0 ;;
+ *:Linux:*:*)
# The BFD linker knows what the default object file format is, so
- # first see if it will tell us. cd to the root directory to prevent
- # problems with other programs or directories called `ld' in the path.
- # Set LC_ALL=C to ensure ld outputs messages in English.
- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
- | sed -ne '/supported targets:/!d
+ # first see if it will tell us.
+ ld_help_string=`ld --help 2>&1`
+ ld_supported_emulations=`echo $ld_help_string \
+ | sed -ne '/supported emulations:/!d
s/[ ][ ]*/ /g
- s/.*supported targets: *//
+ s/.*supported emulations: *//
s/ .*//
p'`
- case "$ld_supported_targets" in
- elf32-i386)
- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
- ;;
- a.out-i386-linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit ;;
- "")
- # Either a pre-BFD a.out linker (linux-gnuoldld) or
- # one that does not give us useful --help.
- echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
- exit ;;
+ case "$ld_supported_emulations" in
+ i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;;
+ i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;;
+ sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+ elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;;
esac
- # Determine whether the default compiler is a.out or elf
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #include <features.h>
- #ifdef __ELF__
- # ifdef __GLIBC__
- # if __GLIBC__ >= 2
- LIBC=gnu
- # else
- LIBC=gnulibc1
- # endif
- # else
- LIBC=gnulibc1
- # endif
- #else
- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
- LIBC=gnu
- #else
- LIBC=gnuaout
- #endif
- #endif
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
+
+ if test "${UNAME_MACHINE}" = "alpha" ; then
+ sed 's/^ //' <<EOF >dummy.s
+ .globl main
+ .ent main
+ main:
+ .frame \$30,0,\$26,0
+ .prologue 0
+ .long 0x47e03d80 # implver $0
+ lda \$2,259
+ .long 0x47e20c21 # amask $2,$1
+ srl \$1,8,\$2
+ sll \$2,2,\$2
+ sll \$0,3,\$0
+ addl \$1,\$0,\$0
+ addl \$2,\$0,\$0
+ ret \$31,(\$26),1
+ .end main
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^LIBC/{
- s: ::g
- p
- }'`"
- test x"${LIBC}" != x && {
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
- exit
- }
- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
- ;;
- i*86:DYNIX/ptx:4*:*)
- # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
- # earlier versions are messed up and put the nodename in both
- # sysname and nodename.
+ LIBC=""
+ ${CC-cc} dummy.s -o dummy 2>/dev/null
+ if test "$?" = 0 ; then
+ ./dummy
+ case "$?" in
+ 7)
+ UNAME_MACHINE="alpha"
+ ;;
+ 15)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 14)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 10)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 16)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ esac
+
+ objdump --private-headers dummy | \
+ grep ld.so.1 > /dev/null
+ if test "$?" = 0 ; then
+ LIBC="libc1"
+ fi
+ fi
+ rm -f dummy.s dummy
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+ elif test "${UNAME_MACHINE}" = "mips" ; then
+ cat >dummy.c <<EOF
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#ifdef __MIPSEB__
+ printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+ printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ else
+ # Either a pre-BFD a.out linker (linux-gnuoldld)
+ # or one that does not give us useful --help.
+ # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+ # If ld does not provide *any* "supported emulations:"
+ # that means it is gnuoldld.
+ echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+ test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+ case "${UNAME_MACHINE}" in
+ i?86)
+ VENDOR=pc;
+ ;;
+ *)
+ VENDOR=unknown;
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ cat >dummy.c <<EOF
+#include <features.h>
+main(argc, argv)
+ int argc;
+ char *argv[];
+{
+#ifdef __ELF__
+# ifdef __GLIBC__
+# if __GLIBC__ >= 2
+ printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+# else
+ printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+ printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+ return 0;
+}
+EOF
+ ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+ rm -f dummy.c dummy
+ fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+ i?86:DYNIX/ptx:4*:*)
echo i386-sequent-sysv4
- exit ;;
- i*86:UNIX_SV:4.2MP:2.*)
+ exit 0 ;;
+ i?86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
- exit ;;
- i*86:OS/2:*:*)
- # If we were able to find `uname', then EMX Unix compatibility
- # is probably installed.
- echo ${UNAME_MACHINE}-pc-os2-emx
- exit ;;
- i*86:XTS-300:*:STOP)
- echo ${UNAME_MACHINE}-unknown-stop
- exit ;;
- i*86:atheos:*:*)
- echo ${UNAME_MACHINE}-unknown-atheos
- exit ;;
- i*86:syllable:*:*)
- echo ${UNAME_MACHINE}-pc-syllable
- exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
- echo i386-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- i*86:*DOS:*:*)
- echo ${UNAME_MACHINE}-pc-msdosdjgpp
- exit ;;
- i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
- UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ exit 0 ;;
+ i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
- echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
else
- echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
fi
- exit ;;
- i*86:*:5:[678]*)
- # UnixWare 7.x, OpenUNIX and OpenServer 6.
- case `/bin/uname -X | grep "^Machine"` in
- *486*) UNAME_MACHINE=i486 ;;
- *Pentium) UNAME_MACHINE=i586 ;;
- *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
- esac
- echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
- exit ;;
- i*86:*:3.2:*)
+ exit 0 ;;
+ i?86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
elif /bin/uname -X 2>/dev/null >/dev/null ; then
- UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
- (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
- (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
- (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
- && UNAME_MACHINE=i686
- (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
- && UNAME_MACHINE=i686
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
else
echo ${UNAME_MACHINE}-pc-sysv32
fi
- exit ;;
+ exit 0 ;;
pc:*:*:*)
- # Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
- # the processor, so we play safe by assuming i586.
- # Note: whatever this is, it MUST be the same as what config.sub
- # prints for the "djgpp" host, or else GDB configury will decide that
- # this is a cross-build.
- echo i586-pc-msdosdjgpp
- exit ;;
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
- exit ;;
+ exit 0 ;;
paragon:*:*:*)
echo i860-intel-osf1
- exit ;;
+ exit 0 ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
fi
- exit ;;
+ exit 0 ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
- exit ;;
- mc68k:UNIX:SYSTEM5:3.51m)
- echo m68k-convergent-sysv
- exit ;;
- M680?0:D-NIX:5.3:*)
- echo m68k-diab-dnix
- exit ;;
- M68*:*:R3V[5678]*:*)
- test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
- 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4; exit; } ;;
- NCR*:*:4.2:* | MPRAS*:*:4.2:*)
- OS_REL='.3'
- test -r /etc/.relid \
- && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
- /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
- && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
- /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
- && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
- m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
- exit ;;
+ exit 0 ;;
+ i?86:LynxOS:2.*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- rs6000:LynxOS:2.*:*)
+ exit 0 ;;
+ rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
- exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
- echo powerpc-unknown-lynxos${UNAME_RELEASE}
- exit ;;
+ exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv${UNAME_RELEASE}
- exit ;;
- RM*:ReliantUNIX-*:*:*)
- echo mips-sni-sysv4
- exit ;;
+ exit 0 ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
- exit ;;
+ exit 0 ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1201,171 +715,39 @@ EOF
else
echo ns32k-sni-sysv
fi
- exit ;;
- PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
+ exit 0 ;;
+ PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
- exit ;;
+ exit 0 ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
- exit ;;
+ exit 0 ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
- exit ;;
- i*86:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo ${UNAME_MACHINE}-stratus-vos
- exit ;;
- *:VOS:*:*)
- # From Paul.Green@stratus.com.
- echo hppa1.1-stratus-vos
- exit ;;
+ exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
- exit ;;
- news*:NEWS-OS:6*:*)
+ exit 0 ;;
+ news*:NEWS-OS:*:6*)
echo mips-sony-newsos6
- exit ;;
- R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ exit 0 ;;
+ R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv${UNAME_RELEASE}
else
echo mips-unknown-sysv${UNAME_RELEASE}
fi
- exit ;;
- BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
- echo powerpc-be-beos
- exit ;;
- BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
- echo powerpc-apple-beos
- exit ;;
- BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
- echo i586-pc-beos
- exit ;;
- BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
- echo i586-pc-haiku
- exit ;;
- SX-4:SUPER-UX:*:*)
- echo sx4-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-5:SUPER-UX:*:*)
- echo sx5-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-6:SUPER-UX:*:*)
- echo sx6-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-7:SUPER-UX:*:*)
- echo sx7-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8:SUPER-UX:*:*)
- echo sx8-nec-superux${UNAME_RELEASE}
- exit ;;
- SX-8R:SUPER-UX:*:*)
- echo sx8r-nec-superux${UNAME_RELEASE}
- exit ;;
- Power*:Rhapsody:*:*)
- echo powerpc-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Rhapsody:*:*)
- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
- exit ;;
- *:Darwin:*:*)
- UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
- echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
- exit ;;
- *:procnto*:*:* | *:QNX:[0123456789]*:*)
- UNAME_PROCESSOR=`uname -p`
- if test "$UNAME_PROCESSOR" = "x86"; then
- UNAME_PROCESSOR=i386
- UNAME_MACHINE=pc
- fi
- echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
- exit ;;
- *:QNX:*:4*)
- echo i386-pc-qnx
- exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
- echo nse-tandem-nsk${UNAME_RELEASE}
- exit ;;
- NSR-?:NONSTOP_KERNEL:*:*)
- echo nsr-tandem-nsk${UNAME_RELEASE}
- exit ;;
- *:NonStop-UX:*:*)
- echo mips-compaq-nonstopux
- exit ;;
- BS2000:POSIX*:*:*)
- echo bs2000-siemens-sysv
- exit ;;
- DS/*:UNIX_System_V:*:*)
- echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
- exit ;;
- *:Plan9:*:*)
- # "uname -m" is not consistent, so use $cputype instead. 386
- # is converted to i386 for consistency with other x86
- # operating systems.
- if test "$cputype" = "386"; then
- UNAME_MACHINE=i386
- else
- UNAME_MACHINE="$cputype"
- fi
- echo ${UNAME_MACHINE}-unknown-plan9
- exit ;;
- *:TOPS-10:*:*)
- echo pdp10-unknown-tops10
- exit ;;
- *:TENEX:*:*)
- echo pdp10-unknown-tenex
- exit ;;
- KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
- echo pdp10-dec-tops20
- exit ;;
- XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
- echo pdp10-xkl-tops20
- exit ;;
- *:TOPS-20:*:*)
- echo pdp10-unknown-tops20
- exit ;;
- *:ITS:*:*)
- echo pdp10-unknown-its
- exit ;;
- SEI:*:*:SEIUX)
- echo mips-sei-seiux${UNAME_RELEASE}
- exit ;;
- *:DragonFly:*:*)
- echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
- exit ;;
- *:*VMS:*:*)
- UNAME_MACHINE=`(uname -p) 2>/dev/null`
- case "${UNAME_MACHINE}" in
- A*) echo alpha-dec-vms ; exit ;;
- I*) echo ia64-dec-vms ; exit ;;
- V*) echo vax-dec-vms ; exit ;;
- esac ;;
- *:XENIX:*:SysV)
- echo i386-pc-xenix
- exit ;;
- i*86:skyos:*:*)
- echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
- exit ;;
- i*86:rdos:*:*)
- echo ${UNAME_MACHINE}-pc-rdos
- exit ;;
- i*86:AROS:*:*)
- echo ${UNAME_MACHINE}-pc-aros
- exit ;;
+ exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-eval $set_cc_for_build
-cat >$dummy.c <<EOF
+cat >dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
# include <sys/utsname.h>
@@ -1390,7 +772,7 @@ main ()
#endif
#if defined (__arm) && defined (__acorn) && defined (__unix)
- printf ("arm-acorn-riscix\n"); exit (0);
+ printf ("arm-acorn-riscix"); exit (0);
#endif
#if defined (hp300) && !defined (hpux)
@@ -1403,10 +785,7 @@ main ()
#endif
int version;
version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
- if (version < 4)
- printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
- else
- printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
exit (0);
#endif
@@ -1451,24 +830,11 @@ main ()
#endif
#if defined (vax)
-# if !defined (ultrix)
-# include <sys/param.h>
-# if defined (BSD)
-# if BSD == 43
- printf ("vax-dec-bsd4.3\n"); exit (0);
-# else
-# if BSD == 199006
- printf ("vax-dec-bsd4.3reno\n"); exit (0);
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# endif
-# else
- printf ("vax-dec-bsd\n"); exit (0);
-# endif
-# else
- printf ("vax-dec-ultrix\n"); exit (0);
-# endif
+#if !defined (ultrix)
+ printf ("vax-dec-bsd\n"); exit (0);
+#else
+ printf ("vax-dec-ultrix\n"); exit (0);
+#endif
#endif
#if defined (alliant) && defined (i860)
@@ -1479,12 +845,12 @@ main ()
}
EOF
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
- { echo "$SYSTEM_NAME"; exit; }
+${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
+rm -f dummy.c dummy
# Apollos put the system type in the environment.
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
# Convex versions that predate uname can use getsysinfo(1)
@@ -1493,69 +859,25 @@ then
case `getsysinfo -f cpu_type` in
c1*)
echo c1-convex-bsd
- exit ;;
+ exit 0 ;;
c2*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
- exit ;;
+ exit 0 ;;
c34*)
echo c34-convex-bsd
- exit ;;
+ exit 0 ;;
c38*)
echo c38-convex-bsd
- exit ;;
+ exit 0 ;;
c4*)
echo c4-convex-bsd
- exit ;;
+ exit 0 ;;
esac
fi
-cat >&2 <<EOF
-$0: unable to guess system type
-
-This script, last modified $timestamp, has failed to recognize
-the operating system you are using. It is advised that you
-download the most up to date version of the config scripts from
-
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
-and
- http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
-
-If the version you run ($0) is already up to date, please
-send the following data and any information you think might be
-pertinent to <config-patches@gnu.org> in order to provide the needed
-information to handle your system.
-
-config.guess timestamp = $timestamp
-
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-
-UNAME_MACHINE = ${UNAME_MACHINE}
-UNAME_RELEASE = ${UNAME_RELEASE}
-UNAME_SYSTEM = ${UNAME_SYSTEM}
-UNAME_VERSION = ${UNAME_VERSION}
-EOF
+#echo '(Unable to guess system type)' 1>&2
exit 1
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/gs/jpeg/config.sub b/gs/jpeg/config.sub
index a39437d01..213a6d47d 100755
--- a/gs/jpeg/config.sub
+++ b/gs/jpeg/config.sub
@@ -1,11 +1,6 @@
#! /bin/sh
-# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
-# Free Software Foundation, Inc.
-
-timestamp='2009-04-17'
-
+# Configuration validation subroutine script, version 1.1.
+# Copyright (C) 1991, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
# can handle that machine. It does not imply ALL GNU software can.
@@ -22,18 +17,14 @@ timestamp='2009-04-17'
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
-# 02110-1301, USA.
-#
+# Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
-#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
@@ -54,76 +45,30 @@ timestamp='2009-04-17'
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
-me=`echo "$0" | sed -e 's,.*/,,'`
-
-usage="\
-Usage: $0 [OPTION] CPU-MFR-OPSYS
- $0 [OPTION] ALIAS
-
-Canonicalize a configuration name.
-
-Operation modes:
- -h, --help print this help, then exit
- -t, --time-stamp print date of last modification, then exit
- -v, --version print version number, then exit
-
-Report bugs and patches to <config-patches@gnu.org>."
-
-version="\
-GNU config.sub ($timestamp)
-
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
-
-This is free software; see the source for copying conditions. There is NO
-warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-
-help="
-Try \`$me --help' for more information."
-
-# Parse command line
-while test $# -gt 0 ; do
- case $1 in
- --time-stamp | --time* | -t )
- echo "$timestamp" ; exit ;;
- --version | -v )
- echo "$version" ; exit ;;
- --help | --h* | -h )
- echo "$usage"; exit ;;
- -- ) # Stop option processing
- shift; break ;;
- - ) # Use stdin as input.
- break ;;
- -* )
- echo "$me: invalid option $1$help"
- exit 1 ;;
-
- *local*)
- # First pass through any local machine types.
- echo $1
- exit ;;
-
- * )
- break ;;
- esac
-done
+if [ x$1 = x ]
+then
+ echo Configuration name missing. 1>&2
+ echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+ echo "or $0 ALIAS" 1>&2
+ echo where ALIAS is a recognized configuration type. 1>&2
+ exit 1
+fi
-case $# in
- 0) echo "$me: missing argument$help" >&2
- exit 1;;
- 1) ;;
- *) echo "$me: too many arguments$help" >&2
- exit 1;;
+# First pass through any local machine types.
+case $1 in
+ *local*)
+ echo $1
+ exit 0
+ ;;
+ *)
+ ;;
esac
# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
- uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
- kopensolaris*-gnu* | \
- storm-chaos* | os2-emx* | rtmk-nova*)
+ linux-gnu*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -149,37 +94,15 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray)
- os=
- basic_machine=$1
- ;;
- -sim | -cisco | -oki | -wec | -winbond)
+ -apple)
os=
basic_machine=$1
;;
- -scout)
- ;;
- -wrs)
- os=-vxworks
- basic_machine=$1
- ;;
- -chorusos*)
- os=-chorusos
- basic_machine=$1
- ;;
- -chorusrdb)
- os=-chorusrdb
- basic_machine=$1
- ;;
-hiux*)
os=-hiuxwe2
;;
- -sco6)
- os=-sco5v6
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
-sco5)
- os=-sco3.2v5
+ os=sco3.2v5
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
@@ -194,17 +117,10 @@ case $os in
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
- -sco5v6*)
- # Don't forget version if it is 3.2v4 or newer.
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
-sco*)
os=-sco3.2v2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
- -udk*)
- basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
- ;;
-isc)
os=-isc2.2
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -227,88 +143,26 @@ case $os in
-psos*)
os=-psos
;;
- -mint | -mint[0-9]*)
- basic_machine=m68k-atari
- os=-mint
- ;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
- 1750a | 580 \
- | a29k \
- | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
- | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
- | am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | bfin \
- | c4x | clipper \
- | d10v | d30v | dlx | dsp16xx \
- | fido | fr30 | frv \
- | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
- | i370 | i860 | i960 | ia64 \
- | ip2k | iq2000 \
- | lm32 \
- | m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
- | mips | mipsbe | mipseb | mipsel | mipsle \
- | mips16 \
- | mips64 | mips64el \
- | mips64octeon | mips64octeonel \
- | mips64orion | mips64orionel \
- | mips64r5900 | mips64r5900el \
- | mips64vr | mips64vrel \
- | mips64vr4100 | mips64vr4100el \
- | mips64vr4300 | mips64vr4300el \
- | mips64vr5000 | mips64vr5000el \
- | mips64vr5900 | mips64vr5900el \
- | mipsisa32 | mipsisa32el \
- | mipsisa32r2 | mipsisa32r2el \
- | mipsisa64 | mipsisa64el \
- | mipsisa64r2 | mipsisa64r2el \
- | mipsisa64sb1 | mipsisa64sb1el \
- | mipsisa64sr71k | mipsisa64sr71kel \
- | mipstx39 | mipstx39el \
- | mn10200 | mn10300 \
- | moxie \
- | mt \
- | msp430 \
- | nios | nios2 \
- | ns16k | ns32k \
- | or32 \
- | pdp10 | pdp11 | pj | pjl \
- | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
- | pyramid \
- | score \
- | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
- | sh64 | sh64le \
- | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
- | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
- | spu | strongarm \
- | tahoe | thumb | tic4x | tic80 | tron \
- | v850 | v850e \
- | we32k \
- | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
- | z8k | z80)
- basic_machine=$basic_machine-unknown
- ;;
- m6811 | m68hc11 | m6812 | m68hc12)
- # Motorola 68HC11/12.
+ tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
+ | arme[lb] | pyramid | mn10200 | mn10300 \
+ | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \
+ | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \
+ | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \
+ | mips64 | mipsel | mips64el | mips64orion | mips64orionel \
+ | mipstx39 | mipstx39el \
+ | sparc | sparclet | sparclite | sparc64 | v850)
basic_machine=$basic_machine-unknown
- os=-none
- ;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
- ;;
- ms1)
- basic_machine=mt-unknown
;;
-
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
- i*86 | x86_64)
+ i[3456]86)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
@@ -317,97 +171,27 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
- 580-* \
- | a29k-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
- | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
- | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
- | avr-* | avr32-* \
- | bfin-* | bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
- | clipper-* | craynv-* | cydra-* \
- | d10v-* | d30v-* | dlx-* \
- | elxsi-* \
- | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
- | h8300-* | h8500-* \
- | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
- | i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* | iq2000-* \
- | lm32-* \
- | m32c-* | m32r-* | m32rle-* \
- | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
- | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
- | mips16-* \
- | mips64-* | mips64el-* \
- | mips64octeon-* | mips64octeonel-* \
- | mips64orion-* | mips64orionel-* \
- | mips64r5900-* | mips64r5900el-* \
- | mips64vr-* | mips64vrel-* \
- | mips64vr4100-* | mips64vr4100el-* \
- | mips64vr4300-* | mips64vr4300el-* \
- | mips64vr5000-* | mips64vr5000el-* \
- | mips64vr5900-* | mips64vr5900el-* \
- | mipsisa32-* | mipsisa32el-* \
- | mipsisa32r2-* | mipsisa32r2el-* \
- | mipsisa64-* | mipsisa64el-* \
- | mipsisa64r2-* | mipsisa64r2el-* \
- | mipsisa64sb1-* | mipsisa64sb1el-* \
- | mipsisa64sr71k-* | mipsisa64sr71kel-* \
- | mipstx39-* | mipstx39el-* \
- | mmix-* \
- | mt-* \
- | msp430-* \
- | nios-* | nios2-* \
- | none-* | np1-* | ns16k-* | ns32k-* \
- | orion-* \
- | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
- | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
- | pyramid-* \
- | romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
- | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
- | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
- | sparclite-* \
- | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* \
- | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
- | tron-* \
- | v850-* | v850e-* | vax-* \
- | we32k-* \
- | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
- | xstormy16-* | xtensa*-* \
- | ymp-* \
- | z8k-* | z80-*)
- ;;
- # Recognize the basic CPU types without company name, with glob match.
- xtensa*)
- basic_machine=$basic_machine-unknown
+ vax-* | tahoe-* | i[3456]86-* | i860-* | m32r-* | m68k-* | m68000-* \
+ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
+ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
+ | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \
+ | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \
+ | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \
+ | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \
+ | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
+ | sparc64-* | mips64-* | mipsel-* \
+ | mips64el-* | mips64orion-* | mips64orionel-* \
+ | mipstx39-* | mipstx39el-* \
+ | f301-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
- 386bsd)
- basic_machine=i386-unknown
- os=-bsd
- ;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
- a29khif)
- basic_machine=a29k-amd
- os=-udi
- ;;
- abacus)
- basic_machine=abacus-unknown
- ;;
- adobe68k)
- basic_machine=m68010-adobe
- os=-scout
- ;;
alliant | fx80)
basic_machine=fx80-alliant
;;
@@ -418,39 +202,25 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
- amd64)
- basic_machine=x86_64-pc
- ;;
- amd64-*)
- basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
- basic_machine=m68k-unknown
+ basic_machine=m68k-cbm
;;
amigaos | amigados)
- basic_machine=m68k-unknown
+ basic_machine=m68k-cbm
os=-amigaos
;;
amigaunix | amix)
- basic_machine=m68k-unknown
+ basic_machine=m68k-cbm
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
- apollo68bsd)
- basic_machine=m68k-apollo
- os=-bsd
- ;;
- aros)
- basic_machine=i386-pc
- os=-aros
- ;;
aux)
basic_machine=m68k-apple
os=-aux
@@ -459,22 +229,6 @@ case $basic_machine in
basic_machine=ns32k-sequent
os=-dynix
;;
- blackfin)
- basic_machine=bfin-unknown
- os=-linux
- ;;
- blackfin-*)
- basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
- c90)
- basic_machine=c90-cray
- os=-unicos
- ;;
- cegcc)
- basic_machine=arm-unknown
- os=-cegcc
- ;;
convex-c1)
basic_machine=c1-convex
os=-bsd
@@ -495,45 +249,27 @@ case $basic_machine in
basic_machine=c38-convex
os=-bsd
;;
- cray | j90)
- basic_machine=j90-cray
+ cray | ymp)
+ basic_machine=ymp-cray
os=-unicos
;;
- craynv)
- basic_machine=craynv-cray
- os=-unicosmp
+ cray2)
+ basic_machine=cray2-cray
+ os=-unicos
;;
- cr16)
- basic_machine=cr16-unknown
- os=-elf
+ [ctj]90-cray)
+ basic_machine=c90-cray
+ os=-unicos
;;
crds | unos)
basic_machine=m68k-crds
;;
- crisv32 | crisv32-* | etraxfs*)
- basic_machine=crisv32-axis
- ;;
- cris | cris-* | etrax*)
- basic_machine=cris-axis
- ;;
- crx)
- basic_machine=crx-unknown
- os=-elf
- ;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
- decsystem10* | dec10*)
- basic_machine=pdp10-dec
- os=-tops10
- ;;
- decsystem20* | dec20*)
- basic_machine=pdp10-dec
- os=-tops20
- ;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
@@ -542,14 +278,6 @@ case $basic_machine in
basic_machine=m88k-motorola
os=-sysv3
;;
- dicos)
- basic_machine=i686-pc
- os=-dicos
- ;;
- djgpp)
- basic_machine=i586-pc
- os=-msdosdjgpp
- ;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
@@ -569,10 +297,6 @@ case $basic_machine in
encore | umax | mmax)
basic_machine=ns32k-encore
;;
- es1800 | OSE68k | ose68k | ose | OSE)
- basic_machine=m68k-ericsson
- os=-ose
- ;;
fx2800)
basic_machine=i860-alliant
;;
@@ -583,10 +307,6 @@ case $basic_machine in
basic_machine=tron-gmicro
os=-sysv
;;
- go32)
- basic_machine=i386-pc
- os=-go32
- ;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
@@ -595,14 +315,6 @@ case $basic_machine in
basic_machine=h8300-hitachi
os=-hms
;;
- h8300xray)
- basic_machine=h8300-hitachi
- os=-xray
- ;;
- h8500hms)
- basic_machine=h8500-hitachi
- os=-hms
- ;;
harris)
basic_machine=m88k-harris
os=-sysv3
@@ -618,30 +330,13 @@ case $basic_machine in
basic_machine=m68k-hp
os=-hpux
;;
- hp3k9[0-9][0-9] | hp9[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
- hp9k6[0-9][0-9] | hp6[0-9][0-9])
- basic_machine=hppa1.0-hp
- ;;
- hp9k7[0-79][0-9] | hp7[0-79][0-9])
- basic_machine=hppa1.1-hp
- ;;
- hp9k78[0-9] | hp78[0-9])
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
- # FIXME: really hppa2.0-hp
- basic_machine=hppa1.1-hp
- ;;
- hp9k8[0-9][13679] | hp8[0-9][13679])
+ hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
@@ -650,42 +345,27 @@ case $basic_machine in
hppa-next)
os=-nextstep3
;;
- hppaosf)
- basic_machine=hppa1.1-hp
- os=-osf
- ;;
- hppro)
- basic_machine=hppa1.1-hp
- os=-proelf
- ;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
+ os=-mvs
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i*86v32)
+ i[3456]86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
- i*86v4*)
+ i[3456]86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
- i*86v)
+ i[3456]86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
- i*86sol2)
+ i[3456]86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
- i386mach)
- basic_machine=i386-mach
- os=-mach
- ;;
- i386-vsta | vsta)
- basic_machine=i386-unknown
- os=-vsta
- ;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
@@ -700,14 +380,6 @@ case $basic_machine in
basic_machine=m68k-isi
os=-sysv
;;
- m68knommu)
- basic_machine=m68k-unknown
- os=-linux
- ;;
- m68knommu-*)
- basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
m88k-omron*)
basic_machine=m88k-omron
;;
@@ -719,20 +391,16 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- mingw32)
- basic_machine=i386-pc
- os=-mingw32
- ;;
- mingw32ce)
- basic_machine=arm-unknown
- os=-mingw32ce
- ;;
miniframe)
basic_machine=m68000-convergent
;;
- *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
- basic_machine=m68k-atari
- os=-mint
+ mipsel*-linux*)
+ basic_machine=mipsel-unknown
+ os=-linux-gnu
+ ;;
+ mips*-linux*)
+ basic_machine=mips-unknown
+ os=-linux-gnu
;;
mips3*-*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
@@ -740,37 +408,10 @@ case $basic_machine in
mips3*)
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
;;
- monitor)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
- morphos)
- basic_machine=powerpc-unknown
- os=-morphos
- ;;
- msdos)
- basic_machine=i386-pc
- os=-msdos
- ;;
- ms1-*)
- basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
- ;;
- mvs)
- basic_machine=i370-ibm
- os=-mvs
- ;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
- netbsd386)
- basic_machine=i386-unknown
- os=-netbsd
- ;;
- netwinder)
- basic_machine=armv4l-rebel
- os=-linux
- ;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
@@ -783,10 +424,6 @@ case $basic_machine in
basic_machine=mips-sony
os=-newsos
;;
- necv70)
- basic_machine=v70-nec
- os=-sysv
- ;;
next | m*-next )
basic_machine=m68k-next
case $os in
@@ -812,39 +449,9 @@ case $basic_machine in
basic_machine=i960-intel
os=-nindy
;;
- mon960)
- basic_machine=i960-intel
- os=-mon960
- ;;
- nonstopux)
- basic_machine=mips-compaq
- os=-nonstopux
- ;;
np1)
basic_machine=np1-gould
;;
- nsr-tandem)
- basic_machine=nsr-tandem
- ;;
- op50n-* | op60c-*)
- basic_machine=hppa1.1-oki
- os=-proelf
- ;;
- openrisc | openrisc-*)
- basic_machine=or32-unknown
- ;;
- os400)
- basic_machine=powerpc-ibm
- os=-os400
- ;;
- OSE68000 | ose68000)
- basic_machine=m68000-ericsson
- os=-ose
- ;;
- os68k)
- basic_machine=m68k-none
- os=-os68k
- ;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
@@ -853,123 +460,59 @@ case $basic_machine in
basic_machine=i860-intel
os=-osf
;;
- parisc)
- basic_machine=hppa-unknown
- os=-linux
- ;;
- parisc-*)
- basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
- os=-linux
- ;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
- pc532 | pc532-*)
+ pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pc98)
- basic_machine=i386-pc
- ;;
- pc98-*)
- basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- pentium | p5 | k5 | k6 | nexgen | viac3)
- basic_machine=i586-pc
- ;;
- pentiumpro | p6 | 6x86 | athlon | athlon_*)
- basic_machine=i686-pc
+ pentium | p5)
+ basic_machine=i586-intel
;;
- pentiumii | pentium2 | pentiumiii | pentium3)
- basic_machine=i686-pc
+ pentiumpro | p6)
+ basic_machine=i686-intel
;;
- pentium4)
- basic_machine=i786-pc
- ;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ pentium-* | p5-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ pentiumpro-* | p6-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
- basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ k5)
+ # We don't have specific support for AMD's K5 yet, so just call it a Pentium
+ basic_machine=i586-amd
;;
- pentium4-*)
- basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ nexen)
+ # We don't have specific support for Nexgen yet, so just call it a Pentium
+ basic_machine=i586-nexgen
;;
pn)
basic_machine=pn-gould
;;
- power) basic_machine=power-ibm
+ power) basic_machine=rs6000-ibm
;;
ppc) basic_machine=powerpc-unknown
- ;;
+ ;;
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle | ppc-le | powerpc-little)
basic_machine=powerpcle-unknown
- ;;
+ ;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- ppc64) basic_machine=powerpc64-unknown
- ;;
- ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
- ppc64le | powerpc64little | ppc64-le | powerpc64-little)
- basic_machine=powerpc64le-unknown
- ;;
- ppc64le-* | powerpc64little-*)
- basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
- ;;
ps2)
basic_machine=i386-ibm
;;
- pw32)
- basic_machine=i586-unknown
- os=-pw32
- ;;
- rdos)
- basic_machine=i386-pc
- os=-rdos
- ;;
- rom68k)
- basic_machine=m68k-rom68k
- os=-coff
- ;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
- s390 | s390-*)
- basic_machine=s390-ibm
- ;;
- s390x | s390x-*)
- basic_machine=s390x-ibm
- ;;
- sa29200)
- basic_machine=a29k-amd
- os=-udi
- ;;
- sb1)
- basic_machine=mipsisa64sb1-unknown
- ;;
- sb1el)
- basic_machine=mipsisa64sb1el-unknown
- ;;
- sde)
- basic_machine=mipsisa32-sde
- os=-elf
- ;;
- sei)
- basic_machine=mips-sei
- os=-seiux
- ;;
sequent)
basic_machine=i386-sequent
;;
@@ -977,16 +520,6 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
- sh5el)
- basic_machine=sh5le-unknown
- ;;
- sh64)
- basic_machine=sh64-unknown
- ;;
- sparclite-wrs | simso-wrs)
- basic_machine=sparclite-wrs
- os=-vxworks
- ;;
sps7)
basic_machine=m68k-bull
os=-sysv2
@@ -994,13 +527,6 @@ case $basic_machine in
spur)
basic_machine=spur-unknown
;;
- st2000)
- basic_machine=m68k-tandem
- ;;
- stratus)
- basic_machine=i860-stratus
- os=-sysv4
- ;;
sun2)
basic_machine=m68000-sun
;;
@@ -1041,55 +567,19 @@ case $basic_machine in
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
- sv1)
- basic_machine=sv1-cray
- os=-unicos
- ;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
- t3e)
- basic_machine=alphaev5-cray
- os=-unicos
- ;;
- t90)
- basic_machine=t90-cray
- os=-unicos
- ;;
- tic54x | c54x*)
- basic_machine=tic54x-unknown
- os=-coff
- ;;
- tic55x | c55x*)
- basic_machine=tic55x-unknown
- os=-coff
- ;;
- tic6x | c6x*)
- basic_machine=tic6x-unknown
- os=-coff
- ;;
- tile*)
- basic_machine=tile-unknown
- os=-linux-gnu
- ;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
- toad1)
- basic_machine=pdp10-xkl
- os=-tops20
- ;;
tower | tower-32)
basic_machine=m68k-ncr
;;
- tpf)
- basic_machine=s390x-ibm
- os=-tpf
- ;;
udi29k)
basic_machine=a29k-amd
os=-udi
@@ -1098,10 +588,6 @@ case $basic_machine in
basic_machine=a29k-nyu
os=-sym1
;;
- v810 | necv810)
- basic_machine=v810-nec
- os=-none
- ;;
vaxv)
basic_machine=vax-dec
os=-sysv
@@ -1111,8 +597,8 @@ case $basic_machine in
os=-vms
;;
vpp*|vx|vx-*)
- basic_machine=f301-fujitsu
- ;;
+ basic_machine=f301-fujitsu
+ ;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
@@ -1125,32 +611,12 @@ case $basic_machine in
basic_machine=a29k-wrs
os=-vxworks
;;
- w65*)
- basic_machine=w65-wdc
- os=-none
- ;;
- w89k-*)
- basic_machine=hppa1.1-winbond
- os=-proelf
- ;;
- xbox)
- basic_machine=i686-pc
- os=-mingw32
- ;;
- xps | xps100)
- basic_machine=xps100-honeywell
- ;;
- ymp)
- basic_machine=ymp-cray
+ xmp)
+ basic_machine=xmp-cray
os=-unicos
;;
- z8k-*-coff)
- basic_machine=z8k-unknown
- os=-sim
- ;;
- z80-*-coff)
- basic_machine=z80-unknown
- os=-sim
+ xps | xps100)
+ basic_machine=xps100-honeywell
;;
none)
basic_machine=none-none
@@ -1159,44 +625,32 @@ case $basic_machine in
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
- w89k)
- basic_machine=hppa1.1-winbond
- ;;
- op50n)
- basic_machine=hppa1.1-oki
- ;;
- op60c)
- basic_machine=hppa1.1-oki
+ mips)
+ if [ x$os = x-linux-gnu ]; then
+ basic_machine=mips-unknown
+ else
+ basic_machine=mips-mips
+ fi
;;
romp)
basic_machine=romp-ibm
;;
- mmix)
- basic_machine=mmix-knuth
- ;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
- pdp10)
- # there are many clones, so DEC is not a safe bet
- basic_machine=pdp10-unknown
- ;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
- sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
- basic_machine=sh-unknown
- ;;
- sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ sparc)
basic_machine=sparc-sun
;;
- cydra)
+ cydra)
basic_machine=cydra-cydrome
;;
orion)
@@ -1205,15 +659,6 @@ case $basic_machine in
orion105)
basic_machine=clipper-highlevel
;;
- mac | mpw | mac-mpw)
- basic_machine=m68k-apple
- ;;
- pmac | pmac-mpw)
- basic_machine=powerpc-apple
- ;;
- *-unknown)
- # Make sure to match an already-canonicalized machine name.
- ;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
@@ -1262,54 +707,18 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
- | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
- | -aos* | -aros* \
+ | -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
- | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
- | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+ | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
- | -chorusos* | -chorusrdb* | -cegcc* \
- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
- | -uxpv* | -beos* | -mpeix* | -udk* \
- | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
- | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
- | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
- | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -uxpv*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
- -qnx*)
- case $basic_machine in
- x86-* | i*86-*)
- ;;
- *)
- os=-nto$os
- ;;
- esac
- ;;
- -nto-qnx*)
- ;;
- -nto*)
- os=`echo $os | sed -e 's|nto|nto-qnx|'`
- ;;
- -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
- | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
- | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
- ;;
- -mac*)
- os=`echo $os | sed -e 's|mac|macos|'`
- ;;
- -linux-dietlibc)
- os=-linux-dietlibc
- ;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -1319,15 +728,6 @@ case $os in
-sunos6*)
os=`echo $os | sed -e 's|sunos6|solaris3|'`
;;
- -opened*)
- os=-openedition
- ;;
- -os400*)
- os=-os400
- ;;
- -wince*)
- os=-wince
- ;;
-osfrose*)
os=-osfrose
;;
@@ -1343,26 +743,11 @@ case $os in
-acis*)
os=-aos
;;
- -atheos*)
- os=-atheos
- ;;
- -syllable*)
- os=-syllable
- ;;
- -386bsd)
- os=-bsd
- ;;
-ctix* | -uts*)
os=-sysv
;;
- -nova*)
- os=-rtmk-nova
- ;;
-ns2 )
- os=-nextstep2
- ;;
- -nsk*)
- os=-nsk
+ os=-nextstep2
;;
# Preserve the version number of sinix5.
-sinix5.*)
@@ -1371,9 +756,6 @@ case $os in
-sinix*)
os=-sysv4
;;
- -tpf*)
- os=-tpf
- ;;
-triton*)
os=-sysv3
;;
@@ -1392,30 +774,9 @@ case $os in
# This must come after -sysvr4.
-sysv*)
;;
- -ose*)
- os=-ose
- ;;
- -es1800*)
- os=-ose
- ;;
-xenix)
os=-xenix
;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- os=-mint
- ;;
- -aros*)
- os=-aros
- ;;
- -kaos*)
- os=-kaos
- ;;
- -zvmoe)
- os=-zvmoe
- ;;
- -dicos*)
- os=-dicos
- ;;
-none)
;;
*)
@@ -1438,29 +799,13 @@ else
# system, and we'll never get to this point.
case $basic_machine in
- score-*)
- os=-elf
- ;;
- spu-*)
- os=-elf
- ;;
*-acorn)
os=-riscix1.2
;;
- arm*-rebel)
- os=-linux
- ;;
arm*-semi)
os=-aout
;;
- c4x-* | tic4x-*)
- os=-coff
- ;;
- # This must come before the *-dec entry.
- pdp10-*)
- os=-tops20
- ;;
- pdp11-*)
+ pdp11-*)
os=-none
;;
*-dec | vax-*)
@@ -1478,48 +823,15 @@ case $basic_machine in
# default.
# os=-sunos4
;;
- m68*-cisco)
- os=-aout
- ;;
- mep-*)
- os=-elf
- ;;
- mips*-cisco)
- os=-elf
- ;;
- mips*-*)
- os=-elf
- ;;
- or32-*)
- os=-coff
- ;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
- *-be)
- os=-beos
- ;;
- *-haiku)
- os=-haiku
- ;;
*-ibm)
os=-aix
;;
- *-knuth)
- os=-mmixware
- ;;
- *-wec)
- os=-proelf
- ;;
- *-winbond)
- os=-proelf
- ;;
- *-oki)
- os=-proelf
- ;;
*-hp)
os=-hpux
;;
@@ -1562,39 +874,27 @@ case $basic_machine in
*-next)
os=-nextstep3
;;
- *-gould)
+ *-gould)
os=-sysv
;;
- *-highlevel)
+ *-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
- *-sgi)
+ *-sgi)
os=-irix
;;
- *-siemens)
+ *-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
- f30[01]-fujitsu | f700-fujitsu)
+ f301-fujitsu)
os=-uxpv
;;
- *-rom68k)
- os=-coff
- ;;
- *-*bug)
- os=-coff
- ;;
- *-apple)
- os=-macos
- ;;
- *-atari*)
- os=-mint
- ;;
*)
os=-none
;;
@@ -1616,15 +916,9 @@ case $basic_machine in
-aix*)
vendor=ibm
;;
- -beos*)
- vendor=be
- ;;
-hpux*)
vendor=hp
;;
- -mpeix*)
- vendor=hp
- ;;
-hiux*)
vendor=hitachi
;;
@@ -1640,47 +934,21 @@ case $basic_machine in
-genix*)
vendor=ns
;;
- -mvs* | -opened*)
- vendor=ibm
- ;;
- -os400*)
+ -mvs*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
- -tpf*)
- vendor=ibm
- ;;
- -vxsim* | -vxworks* | -windiss*)
+ -vxsim* | -vxworks*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
- -hms*)
- vendor=hitachi
- ;;
- -mpw* | -macos*)
- vendor=apple
- ;;
- -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
- vendor=atari
- ;;
- -vos*)
- vendor=stratus
- ;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
esac
echo $basic_machine$os
-exit
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "timestamp='"
-# time-stamp-format: "%:y-%02m-%02d"
-# time-stamp-end: "'"
-# End:
diff --git a/gs/libpng/ANNOUNCE b/gs/libpng/ANNOUNCE
index b0824ee7e..1d0abc227 100644
--- a/gs/libpng/ANNOUNCE
+++ b/gs/libpng/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.2.44 - June 26, 2010
+Libpng 1.2.42 - January 3, 2010
This is a public release of libpng, intended for use in production codes.
@@ -8,44 +8,59 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
- libpng-1.2.44.tar.xz (LZMA-compressed, recommended)
- libpng-1.2.44.tar.gz
- libpng-1.2.44.tar.bz2
+ libpng-1.2.42.tar.xz (LZMA-compressed, recommended)
+ libpng-1.2.42.tar.gz
+ libpng-1.2.42.tar.bz2
Source files with LF line endings (for Unix/Linux) without the
"configure" script
- libpng-1.2.44-no-config.tar.xz (LZMA-compressed, recommended)
- libpng-1.2.44-no-config.tar.gz
- libpng-1.2.44-no-config.tar.bz2
+ libpng-1.2.42-no-config.tar.xz (LZMA-compressed, recommended)
+ libpng-1.2.42-no-config.tar.gz
+ libpng-1.2.42-no-config.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
- lpng1244.zip
- lpng1244.7z
- lpng1244.tar.bz2
+ lpng1242.zip
+ lpng1242.7z
+ lpng1242.tar.bz2
Project files
- libpng-1.2.44-project-netware.zip
- libpng-1.2.44-project-wince.zip
+ libpng-1.2.42-project-netware.zip
+ libpng-1.2.42-project-wince.zip
Other information:
- libpng-1.2.44-README.txt
- libpng-1.2.44-KNOWNBUGS.txt
- libpng-1.2.44-LICENSE.txt
- libpng-1.2.44-Y2K-compliance.txt
- libpng-1.2.44-[previous version]-diff.txt
-
-Changes since the last public release (1.2.43):
-
-version 1.2.44 [June 26, 2010]
-
- Rewrote png_process_IDAT_data to consistently treat extra data as warnings
- and handle end conditions more cleanly.
- Removed the now-redundant check for out-of-bounds new_row from example.c
+ libpng-1.2.42-README.txt
+ libpng-1.2.42-KNOWNBUGS.txt
+ libpng-1.2.42-LICENSE.txt
+ libpng-1.2.42-Y2K-compliance.txt
+ libpng-1.2.42-[previous version]-diff.txt
+
+Changes since the last public release (1.2.41):
+
+version 1.2.42 [January 3, 2010]
+
+ Removed "#define PNG_NO_ERROR_NUMBERS" that was inadvertently added
+ to pngconf.h in version 1.2.41.
+ Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco
+ to put png.h and pngconf.h in $prefix/include, like the other scripts,
+ instead of in $prefix/include/libpng. Also revised makefile.sco
+ to put them in $prefix/include/libpng12 instead of in
+ $prefix/include/libpng/libpng12.
+ Removed leftover "-DPNG_CONFIGURE_LIBPNG" from scripts/makefile.darwin
+ and contrib/pngminim/*/makefile
+ Relocated png_do_chop() to its original position in pngrtran.c; the
+ change in version 1.2.41beta08 caused transparency to be handled wrong
+ in some 16-bit datastreams (Yusaku Sugai).
+ Renamed libpng-pc.in back to libpng.pc.in and revised CMakeLists.txt
+ (revising changes made in 1.2.41)
+ Swapped PNG_UNKNOWN_CHUNKS_SUPPORTED and PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+ in pngset.c to be consistent with other changes in version 1.2.38.
+ Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr
+ in pngtest.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
diff --git a/gs/libpng/CHANGES b/gs/libpng/CHANGES
index 90a3e2be2..14b802c3c 100644
--- a/gs/libpng/CHANGES
+++ b/gs/libpng/CHANGES
@@ -2641,68 +2641,6 @@ version 1.2.42rc05 [January 2, 2010]
in pngtest.c
version 1.2.42 and 1.0.52 [January 3, 2010]
- No changes.
-
-version 1.2.43beta01 [January 27, 2010]
- Updated CMakeLists.txt for consistent indentation and to avoid an
- unclosed if-statement warning (Philip Lowman).
- Removed "#ifdef PNG_1_0_X / #endif" surrounding
- PNG_READ_16_TO_8_SUPPORTED and PNG_READ_GRAY_TO_RGB_SUPPORTED
- in pngconf.h. These were added in libpng-1.2.41beta08 and libpng-1.0.51,
- which introduced a binary incompatibility with libpng-1.0.50.
- Backported new png_decompress_chunk() algorithm from libpng-1.4.1.
-
-version 1.2.43beta02 [February 1, 2010]
- Backported two-pass png_decompress_chunk() algorithm from libpng-1.4.1.
-
-version 1.2.43beta03 [February 6, 2010]
- Backported fast png_push_save_buffer() algorithm from libpng-1.4.1.
- Backported some cosmetic changes from libpng-1.4.1.
-
-version 1.2.43beta04 [February 8, 2010]
- Reverted recent changes to png_push_save-buffer().
- Removed PNGAPI declaration of png_calloc() and png_write_sig() in
- 1ibpng-1.2.X, introduced by mistake in libpng-1.2.41.
- Return allocated "old_buffer" in png_push_save_buffer() before png_error()
- to avoid a potential memory leak.
-
-version 1.2.43beta05 [February 8, 2010]
- Ported rewritten png_decompress_chunk() by John Bowler from libpng-1.4.1.
-
-version 1.0.53rc01 and 1.2.43rc01 [February 18, 2010]
- No changes.
-
-version 1.0.53rc02 and 1.2.43rc02 [February 19, 2010]
- Define _ALL_SOURCE in configure.ac, makefile.aix, and CMakeLists.txt
- when using AIX compiler.
-
-version 1.0.53 and 1.2.43 [February 25, 2010]
- Removed unused gzio.c from contrib/pngminim gather and makefile scripts
-
-version 1.2.44beta01 [June 18, 2010]
- In pngpread.c: png_push_have_row() add check for new_row > height
- Removed the now-redundant check for out-of-bounds new_row from example.c
-
-version 1.2.44beta02 [June 19, 2010]
- In pngpread.c: png_push_process_row() add check for too many rows.
- Removed the now-redundant check for new_row > height in png_push_have_row().
-
-version 1.2.44beta03 [June 20, 2010]
- Rewrote png_process_IDAT_data() to consistently treat extra data as warnings
- and handle end conditions more cleanly.
- Removed the new (beta02) check in png_push_process_row().
-
-version 1.2.44rc01 [June 21, 2010]
- Revised some comments in png_process_IDAT_data().
-
-version 1.2.44rc02 [June 22, 2010]
- Stop memory leak when reading a malformed sCAL chunk.
-
-version 1.2.44rc03 [June 23, 2010]
- Revised pngpread.c patch of beta05 to avoid an endless loop.
-
-version 1.2.44 [June 26, 2010]
- Updated some of the "last changed" dates.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
diff --git a/gs/libpng/CMakeLists.txt b/gs/libpng/CMakeLists.txt
index e81bb1f09..6af447308 100644
--- a/gs/libpng/CMakeLists.txt
+++ b/gs/libpng/CMakeLists.txt
@@ -1,20 +1,14 @@
cmake_minimum_required(VERSION 2.4.3)
-set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
-
if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
- "Choose the type of build, options are:
- None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
- Debug
- Release
- RelWithDebInfo
- MinSizeRel.")
+ set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of
+ build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug
+ Release RelWithDebInfo MinSizeRel.")
endif()
-project(libpng C)
+project(PNG C)
enable_testing()
-# Copyright (C) 2007-2010 Glenn Randers-Pehrson
+# Copyright (C) 2007 Glenn Randers-Pehrson
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
@@ -22,10 +16,12 @@ enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 2)
-set(PNGLIB_RELEASE 44)
+set(PNGLIB_RELEASE 42)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
+set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
+
# needed packages
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
@@ -58,9 +54,9 @@ endif()
if(MINGW)
option(PNG_TESTS "Build pngtest" NO)
-else()
+else(MINGW)
option(PNG_TESTS "Build pngtest" YES)
-endif()
+endif(MINGW)
option(PNG_NO_CONSOLE_IO "FIXME" YES)
option(PNG_NO_STDIO "FIXME" YES)
@@ -74,8 +70,7 @@ set(png_asm_tmp "OFF")
if(NOT WIN32)
find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
if(uname_executable)
- exec_program(${uname_executable}
- ARGS --machine OUTPUT_VARIABLE uname_output)
+ EXEC_PROGRAM(${uname_executable} ARGS --machine OUTPUT_VARIABLE uname_output)
if("uname_output" MATCHES "^.*i[1-9]86.*$")
set(png_asm_tmp "ON")
else("uname_output" MATCHES "^.*i[1-9]86.*$")
@@ -84,7 +79,7 @@ if(NOT WIN32)
endif(uname_executable)
else()
# this env var is normally only set on win64
- set(TEXT "ProgramFiles(x86)")
+ SET(TEXT "ProgramFiles(x86)")
if("$ENV{${TEXT}}" STREQUAL "")
set(png_asm_tmp "ON")
endif("$ENV{${TEXT}}" STREQUAL "")
@@ -124,10 +119,6 @@ set(pngtest_sources
add_definitions(-DPNG_CONFIGURE_LIBPNG)
-if(_AIX)
- add_definitions(-D_ALL_SOURCE)
-endif(_AIX)
-
if(MSVC)
add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
endif(MSVC)
@@ -161,7 +152,7 @@ if(NOT M_LIBRARY AND NOT WIN32)
endif()
# NOW BUILD OUR TARGET
-include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
+include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
if(PNG_SHARED)
add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
@@ -188,10 +179,10 @@ if(PNG_SHARED AND WIN32)
endif()
if(PNG_TESTS AND PNG_SHARED)
- # does not work with msvc due to png_lib_ver issue
+# does not work with msvc due to png_lib_ver issue
add_executable(pngtest ${pngtest_sources})
target_link_libraries(pngtest ${PNG_LIB_NAME})
- add_test(pngtest pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png)
+ add_test(pngtest pngtest ${PNG_SOURCE_DIR}/pngtest.png)
endif()
@@ -202,19 +193,19 @@ set(exec_prefix ${CMAKE_INSTALL_PREFIX})
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/libpng.pc.in
- ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/libpng-config.in
- ${CMAKE_CURRENT_BINARY_DIR}/libpng-config)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/libpng.pc.in
- ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc)
-configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/libpng-config.in
- ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config)
+configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in
+ ${PNG_BINARY_DIR}/libpng.pc)
+configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
+ ${PNG_BINARY_DIR}/libpng-config)
+configure_file(${PNG_SOURCE_DIR}/scripts/libpng.pc.in
+ ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc)
+configure_file(${PNG_SOURCE_DIR}/scripts/libpng-config.in
+ ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config)
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
-# VERSION 0.${PNGLIB_RELEASE}.1.2.44
+# VERSION 0.${PNGLIB_RELEASE}.1.2.42
VERSION 0.${PNGLIB_RELEASE}.0
SOVERSION 0
CLEAN_DIRECT_OUTPUT 1)
@@ -248,23 +239,16 @@ if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
install(FILES png.h pngconf.h DESTINATION include/${PNGLIB_NAME})
endif()
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL )
- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
- install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
- DESTINATION bin)
+ install(PROGRAMS ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
+ install(PROGRAMS ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
endif()
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
- # Install man pages
install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
install(FILES png.5 DESTINATION man/man5)
- # Install pkg-config files
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
- DESTINATION lib/pkgconfig)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
- DESTINATION bin)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
- DESTINATION lib/pkgconfig)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
- DESTINATION bin)
+ install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig)
+ install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
+ install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig)
+ install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
endif()
# what's with libpng.txt and all the extra files?
diff --git a/gs/libpng/INSTALL b/gs/libpng/INSTALL
index 80d43b4ca..d7ac5c3ac 100644
--- a/gs/libpng/INSTALL
+++ b/gs/libpng/INSTALL
@@ -1,5 +1,5 @@
-Installing libpng version 1.2.44 - June 26, 2010
+Installing libpng version 1.2.42 - January 3, 2010
On Unix/Linux and similar systems, you can simply type
@@ -46,7 +46,7 @@ to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they
-might be called "libpng-1.2.44" or "libpng12" and "zlib-1.2.3"
+might be called "libpng-1.2.42" or "libpng12" and "zlib-1.2.3"
or "zlib123") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
diff --git a/gs/libpng/KNOWNBUG b/gs/libpng/KNOWNBUG
index 59f7261a8..bcf009ebb 100644
--- a/gs/libpng/KNOWNBUG
+++ b/gs/libpng/KNOWNBUG
@@ -1,5 +1,5 @@
-Known bugs in libpng version 1.2.44
+Known bugs in libpng version 1.2.42
1. December 4, 2009: The PNG_NO_ERROR_NUMBERS macro was inadvertently
defined in libpng-1.2.41/pngconf.h, which may cause a problem with
diff --git a/gs/libpng/LICENSE b/gs/libpng/LICENSE
index e5561c221..362b3665e 100644
--- a/gs/libpng/LICENSE
+++ b/gs/libpng/LICENSE
@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.2.44, June 26, 2010, are
+libpng versions 1.2.6, August 15, 2004, through 1.2.42, January 3, 2010, are
Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-June 26, 2010
+January 3, 2010
diff --git a/gs/libpng/README b/gs/libpng/README
index ff7ac1f16..914af78c2 100644
--- a/gs/libpng/README
+++ b/gs/libpng/README
@@ -1,4 +1,4 @@
-README for libpng version 1.2.44 - June 26, 2010 (shared library 12.0)
+README for libpng version 1.2.42 - January 3, 2010 (shared library 12.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@@ -199,11 +199,11 @@ Files in this distribution:
makefile.std => Generic UNIX makefile (cc, creates static
libpng.a)
makefile.elf => Linux/ELF gcc makefile symbol versioning,
- creates libpng12.so.0.1.2.44)
+ creates libpng12.so.0.1.2.42)
makefile.linux => Linux/ELF makefile (gcc, creates
- libpng12.so.0.1.2.44)
+ libpng12.so.0.1.2.42)
makefile.gcmmx => Linux/ELF makefile (gcc, creates
- libpng12.so.0.1.2.44, previously
+ libpng12.so.0.1.2.42, previously
used assembler code tuned for Intel MMX
platform)
makefile.gcc => Generic makefile (gcc, creates static
@@ -228,12 +228,12 @@ Files in this distribution:
makefile.openbsd => OpenBSD makefile
makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
makefile.sggcc => Silicon Graphics
- (gcc, creates libpng12.so.0.1.2.44)
+ (gcc, creates libpng12.so.0.1.2.42)
makefile.sunos => Sun makefile
makefile.solaris => Solaris 2.X makefile
- (gcc, creates libpng12.so.0.1.2.44)
+ (gcc, creates libpng12.so.0.1.2.42)
makefile.so9 => Solaris 9 makefile
- (gcc, creates libpng12.so.0.1.2.44)
+ (gcc, creates libpng12.so.0.1.2.42)
makefile.32sunu => Sun Ultra 32-bit makefile
makefile.64sunu => Sun Ultra 64-bit makefile
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
diff --git a/gs/libpng/Y2KINFO b/gs/libpng/Y2KINFO
index 1cf3a0a1b..d492fc78a 100644
--- a/gs/libpng/Y2KINFO
+++ b/gs/libpng/Y2KINFO
@@ -1,13 +1,13 @@
Y2K compliance in libpng:
=========================
- June 26, 2010
+ January 3, 2010
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
- upward through 1.2.44 are Y2K compliant. It is my belief that earlier
+ upward through 1.2.42 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer
diff --git a/gs/libpng/contrib/pngminim/decoder/gather.sh b/gs/libpng/contrib/pngminim/decoder/gather.sh
index 913b78deb..0d0543e4b 100755
--- a/gs/libpng/contrib/pngminim/decoder/gather.sh
+++ b/gs/libpng/contrib/pngminim/decoder/gather.sh
@@ -6,4 +6,4 @@ rm example.c pngtest.c pngpread.c pngw*.c
# change the following 2 lines if zlib is somewhere else
cp ../../../../zlib/*.h .
cp ../../../../zlib/*.c .
-rm minigzip.c example.c compress.c deflate.c gz*
+rm minigzip.c example.c compress.c deflate.c
diff --git a/gs/libpng/contrib/pngminim/decoder/makefile b/gs/libpng/contrib/pngminim/decoder/makefile
index 4c738396b..27e04cbde 100644
--- a/gs/libpng/contrib/pngminim/decoder/makefile
+++ b/gs/libpng/contrib/pngminim/decoder/makefile
@@ -15,7 +15,7 @@ O=.o
L=.a
E=
-ZOBJS = adler32$(O) crc32$(O) \
+ZOBJS = adler32$(O) crc32$(O) gzio$(O) \
infback$(O) inffast$(O) inflate$(O) inftrees$(O) \
trees$(O) uncompr$(O) zutil$(O)
diff --git a/gs/libpng/contrib/pngminim/encoder/gather.sh b/gs/libpng/contrib/pngminim/encoder/gather.sh
index 61d0b13ef..23d7d6195 100755
--- a/gs/libpng/contrib/pngminim/encoder/gather.sh
+++ b/gs/libpng/contrib/pngminim/encoder/gather.sh
@@ -7,4 +7,4 @@ rm example.c pngtest.c pngr*.c pngpread.c
cp ../../../../zlib/*.h .
cp ../../../../zlib/*.c .
rm inf*.[ch]
-rm minigzip.c example.c gz*
+rm minigzip.c example.c
diff --git a/gs/libpng/contrib/pngminim/encoder/makefile b/gs/libpng/contrib/pngminim/encoder/makefile
index dfde950ec..1182b5b23 100644
--- a/gs/libpng/contrib/pngminim/encoder/makefile
+++ b/gs/libpng/contrib/pngminim/encoder/makefile
@@ -14,7 +14,7 @@ O=.o
L=.a
E=
-ZOBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) \
+ZOBJS = adler32$(O) compress$(O) crc32$(O) deflate$(O) gzio$(O) \
dummy_inflate$(O) \
trees$(O) uncompr$(O) zutil$(O)
diff --git a/gs/libpng/contrib/pngminim/preader/gather.sh b/gs/libpng/contrib/pngminim/preader/gather.sh
index 357bb9a7d..fe115099e 100755
--- a/gs/libpng/contrib/pngminim/preader/gather.sh
+++ b/gs/libpng/contrib/pngminim/preader/gather.sh
@@ -7,4 +7,4 @@ rm example.c pngtest.c pngw*.c
# change the following 2 lines if zlib is somewhere else
cp ../../../../zlib/*.h .
cp ../../../../zlib/*.c .
-rm minigzip.c example.c compress.c deflate.c gz*
+rm minigzip.c example.c compress.c deflate.c
diff --git a/gs/libpng/contrib/pngminim/preader/makefile b/gs/libpng/contrib/pngminim/preader/makefile
index 717978d5f..74a17a38f 100644
--- a/gs/libpng/contrib/pngminim/preader/makefile
+++ b/gs/libpng/contrib/pngminim/preader/makefile
@@ -31,7 +31,7 @@ O=.o
L=.a
E=
-ZOBJS = adler32$(O) crc32$(O) \
+ZOBJS = adler32$(O) crc32$(O) gzio$(O) \
infback$(O) inffast$(O) inflate$(O) inftrees$(O) \
trees$(O) uncompr$(O) zutil$(O)
diff --git a/gs/libpng/example.c b/gs/libpng/example.c
index b96b00c43..108a5f183 100644
--- a/gs/libpng/example.c
+++ b/gs/libpng/example.c
@@ -509,6 +509,9 @@ row_callback(png_structp png_ptr, png_bytep new_row,
* shown below:
*/
+ /* Check if row_num is in bounds. */
+ if ((row_num >= 0) && (row_num < height))
+ {
/* Get pointer to corresponding row in our
* PNG read buffer.
*/
@@ -519,7 +522,7 @@ row_callback(png_structp png_ptr, png_bytep new_row,
*/
if ((old_row != NULL) && (new_row != NULL))
png_progressive_combine_row(png_ptr, old_row, new_row);
-
+ }
/*
* The rows and passes are called in order, so you don't really
* need the row_num and pass, but I'm supplying them because it
diff --git a/gs/libpng/libpng-1.2.44.txt b/gs/libpng/libpng-1.2.42.txt
index bfb8c745b..ebc85d960 100644
--- a/gs/libpng/libpng-1.2.44.txt
+++ b/gs/libpng/libpng-1.2.42.txt
@@ -1,6 +1,6 @@
libpng.txt - A description on how to use and modify libpng
- libpng version 1.2.44 - June 26, 2010
+ libpng version 1.2.42 - January 3, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@@ -11,7 +11,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.2.44 - June 26, 2010
+ libpng versions 0.97, January 1998, through 1.2.42 - January 3, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@@ -878,7 +878,7 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
-As of libpng version 1.2.44, not all possible expansions are supported.
+As of libpng version 1.2.42, not all possible expansions are supported.
In the following table, the 01 means grayscale with depth<8, 31 means
indexed with depth<8, other numerals represent the color type, "T" means
@@ -3179,13 +3179,13 @@ Other rules can be inferred by inspecting the libpng source.
XIII. Y2K Compliance in libpng
-June 26, 2010
+January 3, 2010
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.2.44 are Y2K compliant. It is my belief that earlier
+upward through 1.2.42 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
diff --git a/gs/libpng/libpng.3 b/gs/libpng/libpng.3
index 93139a7fd..441fdd134 100644
--- a/gs/libpng/libpng.3
+++ b/gs/libpng/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "June 26, 2010"
+.TH LIBPNG 3 "January 3, 2010"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.2.44
+libpng \- Portable Network Graphics (PNG) Reference Library 1.2.42
.SH SYNOPSIS
\fI\fB
@@ -821,7 +821,7 @@ Following is a copy of the libpng.txt file that accompanies libpng.
.SH LIBPNG.TXT
libpng.txt - A description on how to use and modify libpng
- libpng version 1.2.44 - June 26, 2010
+ libpng version 1.2.42 - January 3, 2010
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@@ -832,7 +832,7 @@ libpng.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.2.44 - June 26, 2010
+ libpng versions 0.97, January 1998, through 1.2.42 - January 3, 2010
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2009 Glenn Randers-Pehrson
@@ -1699,7 +1699,7 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
-As of libpng version 1.2.44, not all possible expansions are supported.
+As of libpng version 1.2.42, not all possible expansions are supported.
In the following table, the 01 means grayscale with depth<8, 31 means
indexed with depth<8, other numerals represent the color type, "T" means
@@ -4000,13 +4000,13 @@ Other rules can be inferred by inspecting the libpng source.
.SH XIII. Y2K Compliance in libpng
-June 26, 2010
+January 3, 2010
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.2.44 are Y2K compliant. It is my belief that earlier
+upward through 1.2.42 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
@@ -4299,14 +4299,6 @@ the first widely used release:
1.2.42rc01-05 13 10242 12.so.0.42[.0]
1.0.52 10 10052 10.so.0.52[.0]
1.2.42 13 10242 12.so.0.42[.0]
- 1.2.43beta01-05 13 10243 12.so.0.43[.0]
- 1.0.53rc01-02 10 10053 10.so.0.53[.0]
- 1.2.43rc01-02 13 10243 12.so.0.43[.0]
- 1.0.53 10 10053 10.so.0.53[.0]
- 1.2.43 13 10243 12.so.0.43[.0]
- 1.2.44beta01-03 13 10244 12.so.0.44[.0]
- 1.2.44rc01-03 13 10244 12.so.0.44[.0]
- 1.2.44 13 10244 12.so.0.44[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -4362,7 +4354,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.2.44 - June 26, 2010:
+Libpng version 1.2.42 - January 3, 2010:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -4385,7 +4377,7 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.2.44, June 26, 2010, are
+libpng versions 1.2.6, August 15, 2004, through 1.2.42, January 3, 2010, are
Copyright (c) 2004,2006-2008 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -4484,7 +4476,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-June 26, 2010
+January 3, 2010
.\" end of man page
diff --git a/gs/libpng/libpngpf.3 b/gs/libpng/libpngpf.3
index c2da624d7..e143ecc0d 100644
--- a/gs/libpng/libpngpf.3
+++ b/gs/libpng/libpngpf.3
@@ -1,6 +1,6 @@
-.TH LIBPNGPF 3 "June 26, 2010"
+.TH LIBPNGPF 3 "January 3, 2010"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.2.44
+libpng \- Portable Network Graphics (PNG) Reference Library 1.2.42
(private functions)
.SH SYNOPSIS
\fB#include <png.h>\fP
diff --git a/gs/libpng/png.5 b/gs/libpng/png.5
index 645c80c16..ddc263b70 100644
--- a/gs/libpng/png.5
+++ b/gs/libpng/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "June 26, 2010"
+.TH PNG 5 "January 3, 2010"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
diff --git a/gs/libpng/png.c b/gs/libpng/png.c
index 7ad9538e6..44fa4a15f 100644
--- a/gs/libpng/png.c
+++ b/gs/libpng/png.c
@@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
- * Last changed in libpng 1.2.43 [February 25, 2010]
+ * Last changed in libpng 1.2.42 [January 3, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -17,7 +17,7 @@
#include "png.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_44 Your_png_h_is_not_version_1_2_44;
+typedef version_1_2_42 Your_png_h_is_not_version_1_2_42;
/* Version information for C files. This had better match the version
* string defined in png.h.
@@ -78,8 +78,7 @@ PNG_CONST int FARDATA png_pass_height[] = {8, 8, 4, 4, 2, 2, 1};
*/
/* Mask to determine which pixels are valid in a pass */
-PNG_CONST int FARDATA png_pass_mask[] =
- {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
+PNG_CONST int FARDATA png_pass_mask[] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
/* Mask to determine which pixels to overwrite while displaying */
PNG_CONST int FARDATA png_pass_dsp_mask[]
@@ -688,8 +687,8 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
ptime->day % 32, short_months[(ptime->month - 1) % 12],
ptime->year, ptime->hour % 24, ptime->minute % 60,
ptime->second % 61);
- WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer,
- 29, NULL, NULL);
+ WideCharToMultiByte(CP_ACP, 0, time_buf, -1, png_ptr->time_buffer, 29,
+ NULL, NULL);
}
#else
#ifdef USE_FAR_KEYWORD
@@ -724,13 +723,13 @@ png_get_copyright(png_structp png_ptr)
#else
#ifdef __STDC__
return ((png_charp) PNG_STRING_NEWLINE \
- "libpng version 1.2.44 - June 26, 2010" PNG_STRING_NEWLINE \
+ "libpng version 1.2.42 - January 3, 2010" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE);
#else
- return ((png_charp) "libpng version 1.2.44 - June 26, 2010\
+ return ((png_charp) "libpng version 1.2.42 - January 3, 2010\
Copyright (c) 1998-2010 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
diff --git a/gs/libpng/png.h b/gs/libpng/png.h
index cc1915dfa..af24fa155 100644
--- a/gs/libpng/png.h
+++ b/gs/libpng/png.h
@@ -1,6 +1,6 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.2.44 - June 26, 2010
+ * libpng version 1.2.42 - January 3, 2010
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -10,7 +10,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.2.44 - June 26, 2010: Glenn
+ * libpng versions 0.97, January 1998, through 1.2.42 - January 3, 2010: Glenn
* See also "Contributing Authors", below.
*
* Note about libpng version numbers:
@@ -254,14 +254,6 @@
* 1.2.42rc01-05 13 10242 12.so.0.42[.0]
* 1.0.52 10 10052 10.so.0.52[.0]
* 1.2.42 13 10242 12.so.0.42[.0]
- * 1.2.43beta01-05 13 10243 12.so.0.43[.0]
- * 1.0.53rc01-02 10 10053 10.so.0.53[.0]
- * 1.2.43rc01-02 13 10243 12.so.0.43[.0]
- * 1.0.53 10 10053 10.so.0.53[.0]
- * 1.2.43 13 10243 12.so.0.43[.0]
- * 1.2.44beta01-03 13 10244 12.so.0.44[.0]
- * 1.2.44rc01-03 13 10244 12.so.0.44[.0]
- * 1.2.44 13 10244 12.so.0.44[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -293,7 +285,7 @@
*
* This code is released under the libpng license.
*
- * libpng versions 1.2.6, August 15, 2004, through 1.2.44, June 26, 2010, are
+ * libpng versions 1.2.6, August 15, 2004, through 1.2.42, January 3, 2010, are
* Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
@@ -405,13 +397,13 @@
* Y2K compliance in libpng:
* =========================
*
- * June 26, 2010
+ * January 3, 2010
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.2.44 are Y2K compliant. It is my belief that earlier
+ * upward through 1.2.42 are Y2K compliant. It is my belief that earlier
* versions were also Y2K compliant.
*
* Libpng only has three year fields. One is a 2-byte unsigned integer
@@ -467,9 +459,9 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.2.44"
+#define PNG_LIBPNG_VER_STRING "1.2.42"
#define PNG_HEADER_VERSION_STRING \
- " libpng version 1.2.44 - June 26, 2010\n"
+ " libpng version 1.2.42 - January 3, 2010\n"
#define PNG_LIBPNG_VER_SONUM 0
#define PNG_LIBPNG_VER_DLLNUM 13
@@ -477,7 +469,7 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 2
-#define PNG_LIBPNG_VER_RELEASE 44
+#define PNG_LIBPNG_VER_RELEASE 42
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
@@ -507,7 +499,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
-#define PNG_LIBPNG_VER 10244 /* 1.2.44 */
+#define PNG_LIBPNG_VER 10242 /* 1.2.42 */
#ifndef PNG_VERSION_INFO_ONLY
/* Include the compression library's header */
@@ -1281,16 +1273,7 @@ struct png_struct_def
png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */
png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */
png_uint_32 rowbytes PNG_DEPSTRUCT; /* size of row in bytes */
-#if 0 /* Replaced with the following in libpng-1.2.43 */
- png_size_t irowbytes PNG_DEPSTRUCT;
-#endif
-/* Added in libpng-1.2.43 */
-#ifdef PNG_USER_LIMITS_SUPPORTED
- /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown
- * chunks that can be stored (0 means unlimited).
- */
- png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT;
-#endif
+ png_uint_32 irowbytes PNG_DEPSTRUCT; /* size of current interlaced row in bytes */
png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced row in pixels */
png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */
png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous (unfiltered) row */
@@ -1522,7 +1505,7 @@ struct png_struct_def
/* New members added in libpng-1.0.16 and 1.2.6 */
png_byte compression_type PNG_DEPSTRUCT;
-#ifdef PNG_USER_LIMITS_SUPPORTED
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
png_uint_32 user_width_max PNG_DEPSTRUCT;
png_uint_32 user_height_max PNG_DEPSTRUCT;
#endif
@@ -1547,7 +1530,7 @@ struct png_struct_def
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
-typedef png_structp version_1_2_44;
+typedef png_structp version_1_2_42;
typedef png_struct FAR * FAR * png_structpp;
diff --git a/gs/libpng/pngconf.h b/gs/libpng/pngconf.h
index defc16d96..54f50bc64 100644
--- a/gs/libpng/pngconf.h
+++ b/gs/libpng/pngconf.h
@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.2.44 - June 26, 2010
+ * libpng version 1.2.42 - January 3, 2010
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -622,18 +622,22 @@
# ifndef PNG_NO_READ_BACKGROUND
# define PNG_READ_BACKGROUND_SUPPORTED
# endif
+#ifndef PNG_1_0_X
# ifndef PNG_NO_READ_16_TO_8
# define PNG_READ_16_TO_8_SUPPORTED
# endif
+#endif
# ifndef PNG_NO_READ_FILLER
# define PNG_READ_FILLER_SUPPORTED
# endif
# ifndef PNG_NO_READ_GAMMA
# define PNG_READ_GAMMA_SUPPORTED
# endif
+#ifndef PNG_1_0_X
# ifndef PNG_NO_READ_GRAY_TO_RGB
# define PNG_READ_GRAY_TO_RGB_SUPPORTED
# endif
+#endif
# ifndef PNG_NO_READ_SWAP_ALPHA
# define PNG_READ_SWAP_ALPHA_SUPPORTED
# endif
@@ -847,13 +851,6 @@
# endif
#endif /* PNG_1_0_X */
-/* Added at libpng-1.0.53 and 1.2.43 */
-#ifndef PNG_USER_LIMITS_SUPPORTED
-# ifndef PNG_NO_USER_LIMITS
-# define PNG_USER_LIMITS_SUPPORTED
-# endif
-#endif
-
/* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGS no matter
* how large, set these limits to 0x7fffffffL
*/
@@ -864,16 +861,11 @@
# define PNG_USER_HEIGHT_MAX 1000000L
#endif
-/* Added at libpng-1.2.43. To accept all valid PNGs no matter
- * how large, set these two limits to 0.
- */
+#ifndef PNG_1_0_X
+/* Added at libpng-1.2.41 */
#ifndef PNG_USER_CHUNK_CACHE_MAX
-# define PNG_USER_CHUNK_CACHE_MAX 0
+# define PNG_USER_CHUNK_CACHE_MAX 0x7fffffffL
#endif
-
-/* Added at libpng-1.2.43 */
-#ifndef PNG_USER_CHUNK_MALLOC_MAX
-# define PNG_USER_CHUNK_MALLOC_MAX 0
#endif
#ifndef PNG_LITERAL_SHARP
diff --git a/gs/libpng/pngget.c b/gs/libpng/pngget.c
index d397329a5..ae2c489ec 100644
--- a/gs/libpng/pngget.c
+++ b/gs/libpng/pngget.c
@@ -1,8 +1,8 @@
/* pngget.c - retrieval of values from info struct
*
- * Last changed in libpng 1.2.43 [February 25, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.2.41 [December 3, 2009]
+ * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -872,11 +872,13 @@ png_get_user_chunk_ptr(png_structp png_ptr)
}
#endif
+#ifdef PNG_WRITE_SUPPORTED
png_uint_32 PNGAPI
png_get_compression_buffer_size(png_structp png_ptr)
{
return (png_uint_32)(png_ptr? png_ptr->zbuf_size : 0L);
}
+#endif
#ifdef PNG_ASSEMBLER_CODE_SUPPORTED
#ifndef PNG_1_0_X
@@ -927,8 +929,7 @@ png_get_mmx_rowbytes_threshold (png_structp png_ptr)
#endif /* ?PNG_ASSEMBLER_CODE_SUPPORTED */
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-/* These functions were added to libpng 1.2.6 but not enabled
-* by default. They will be enabled in libpng-1.4.0 */
+/* These functions were added to libpng 1.2.6 */
png_uint_32 PNGAPI
png_get_user_width_max (png_structp png_ptr)
{
diff --git a/gs/libpng/pngmem.c b/gs/libpng/pngmem.c
index 91f276548..757dddd7b 100644
--- a/gs/libpng/pngmem.c
+++ b/gs/libpng/pngmem.c
@@ -1,8 +1,8 @@
/* pngmem.c - stub functions for memory allocation
*
- * Last changed in libpng 1.2.41 [February 25, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.2.41 [December 3, 2009]
+ * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -115,7 +115,7 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
* result, we would be truncating potentially larger memory requests
* (which should cause a fatal error) and introducing major problems.
*/
-png_voidp /* PRIVATE */
+png_voidp PNGAPI
png_calloc(png_structp png_ptr, png_uint_32 size)
{
png_voidp ret;
@@ -201,7 +201,7 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
- png_error(png_ptr, "Out Of Memory."); /* Note "O", "M" */
+ png_error(png_ptr, "Out Of Memory."); /* Note "O" and "M" */
else
png_warning(png_ptr, "Out Of Memory.");
#endif
@@ -229,7 +229,7 @@ png_malloc_default(png_structp png_ptr, png_uint_32 size)
{
#ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
- png_error(png_ptr, "Out Of memory."); /* Note "O", "m" */
+ png_error(png_ptr, "Out Of memory."); /* Note "O" and "M" */
else
png_warning(png_ptr, "Out Of memory.");
#endif
diff --git a/gs/libpng/pngpread.c b/gs/libpng/pngpread.c
index 5a8b78386..4f684a887 100644
--- a/gs/libpng/pngpread.c
+++ b/gs/libpng/pngpread.c
@@ -1,8 +1,8 @@
/* pngpread.c - read a png file in push mode
*
- * Last changed in libpng 1.2.44 [June 26, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.2.42 [January 3, 2010]
+ * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -331,9 +331,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
png_ptr->mode |= PNG_HAVE_IDAT;
png_ptr->process_mode = PNG_READ_IDAT_MODE;
png_push_have_info(png_ptr, info_ptr);
- png_ptr->zstream.avail_out =
- (uInt) PNG_ROWBYTES(png_ptr->pixel_depth,
- png_ptr->iwidth) + 1;
+ png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
png_ptr->zstream.next_out = png_ptr->row_buf;
return;
}
@@ -702,13 +700,8 @@ png_push_save_buffer(png_structp png_ptr)
new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256;
old_buffer = png_ptr->save_buffer;
- png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr,
+ png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr,
(png_uint_32)new_max);
- if (png_ptr->save_buffer == NULL)
- {
- png_free(png_ptr, old_buffer);
- png_error(png_ptr, "Insufficient memory for save_buffer");
- }
png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size);
png_free(png_ptr, old_buffer);
png_ptr->save_buffer_max = new_max;
@@ -783,6 +776,7 @@ png_push_read_IDAT(png_structp png_ptr)
png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size);
+ if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size);
png_ptr->idat_size -= save_size;
@@ -806,7 +800,7 @@ png_push_read_IDAT(png_structp png_ptr)
save_size = png_ptr->current_buffer_size;
png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size);
-
+ if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size);
png_ptr->idat_size -= save_size;
@@ -832,101 +826,60 @@ void /* PRIVATE */
png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
png_size_t buffer_length)
{
- /* The caller checks for a non-zero buffer length. */
- if (!(buffer_length > 0) || buffer == NULL)
- png_error(png_ptr, "No IDAT data (internal error)");
+ int ret;
+
+ if ((png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) && buffer_length)
+ png_error(png_ptr, "Extra compression data");
- /* This routine must process all the data it has been given
- * before returning, calling the row callback as required to
- * handle the uncompressed results.
- */
png_ptr->zstream.next_in = buffer;
png_ptr->zstream.avail_in = (uInt)buffer_length;
-
- /* Keep going until the decompressed data is all processed
- * or the stream marked as finished.
- */
- while (png_ptr->zstream.avail_in > 0 &&
- !(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
+ for (;;)
+ {
+ ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
+ if (ret != Z_OK)
+ {
+ if (ret == Z_STREAM_END)
{
- int ret;
+ if (png_ptr->zstream.avail_in)
+ png_error(png_ptr, "Extra compressed data");
- /* We have data for zlib, but we must check that zlib
- * has somewhere to put the results. It doesn't matter
- * if we don't expect any results -- it may be the input
- * data is just the LZ end code.
- */
- if (!(png_ptr->zstream.avail_out > 0))
+ if (!(png_ptr->zstream.avail_out))
{
- png_ptr->zstream.avail_out =
- (uInt) PNG_ROWBYTES(png_ptr->pixel_depth,
- png_ptr->iwidth) + 1;
- png_ptr->zstream.next_out = png_ptr->row_buf;
+ png_push_process_row(png_ptr);
}
- /* Using Z_SYNC_FLUSH here means that an unterminated
- * LZ stream can still be handled (a stream with a missing
- * end code), otherwise (Z_NO_FLUSH) a future zlib
- * implementation might defer output and, therefore,
- * change the current behavior. (See comments in inflate.c
- * for why this doesn't happen at present with zlib 1.2.5.)
- */
- ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH);
-
- /* Check for any failure before proceeding. */
- if (ret != Z_OK && ret != Z_STREAM_END)
- {
- /* Terminate the decompression. */
+ png_ptr->mode |= PNG_AFTER_IDAT;
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
+ break;
+ }
+ else if (ret == Z_BUF_ERROR)
+ break;
- /* This may be a truncated stream (missing or
- * damaged end code). Treat that as a warning.
- */
- if (png_ptr->row_number >= png_ptr->num_rows ||
- png_ptr->pass > 6)
- png_warning(png_ptr, "Truncated compressed data in IDAT");
else
- png_error(png_ptr, "Decompression error in IDAT");
-
- /* Skip the check on unprocessed input */
- return;
+ png_error(png_ptr, "Decompression Error");
}
-
- /* Did inflate output any data? */
- if (png_ptr->zstream.next_out != png_ptr->row_buf)
+ if (!(png_ptr->zstream.avail_out))
{
- /* Is this unexpected data after the last row?
- * If it is, artificially terminate the LZ output
- * here.
- */
- if (png_ptr->row_number >= png_ptr->num_rows ||
- png_ptr->pass > 6)
+ if ((
+#ifdef PNG_READ_INTERLACING_SUPPORTED
+ png_ptr->interlaced && png_ptr->pass > 6) ||
+ (!png_ptr->interlaced &&
+#endif
+ png_ptr->row_number == png_ptr->num_rows))
{
- /* Extra data. */
- png_warning(png_ptr, "Extra compressed data in IDAT");
+ if (png_ptr->zstream.avail_in)
+ png_warning(png_ptr, "Too much data in IDAT chunks");
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
- /* Do no more processing; skip the unprocessed
- * input check below.
- */
- return;
+ break;
}
-
- /* Do we have a complete row? */
- if (png_ptr->zstream.avail_out == 0)
png_push_process_row(png_ptr);
+ png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
+ png_ptr->zstream.next_out = png_ptr->row_buf;
}
- /* And check for the end of the stream. */
- if (ret == Z_STREAM_END)
- png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
+ else
+ break;
}
-
- /* All the data should have been processed, if anything
- * is left at this point we have bytes of IDAT data
- * after the zlib end code.
- */
- if (png_ptr->zstream.avail_in > 0)
- png_warning(png_ptr, "Extra compression data");
}
void /* PRIVATE */
@@ -1188,6 +1141,9 @@ png_read_push_finish_row(png_structp png_ptr)
png_pass_start[png_ptr->pass]) /
png_pass_inc[png_ptr->pass];
+ png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,
+ png_ptr->iwidth) + 1;
+
if (png_ptr->transformations & PNG_INTERLACE)
break;
diff --git a/gs/libpng/pngread.c b/gs/libpng/pngread.c
index 62076248e..f10be8c31 100644
--- a/gs/libpng/pngread.c
+++ b/gs/libpng/pngread.c
@@ -1,8 +1,8 @@
/* pngread.c - read a PNG file
*
- * Last changed in libpng 1.2.44 [June 26, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.2.41 [December 3, 2009]
+ * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -31,9 +31,7 @@ png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr,
warn_fn, png_voidp_NULL, png_malloc_ptr_NULL, png_free_ptr_NULL));
}
-/* Alternate create PNG structure for reading, and allocate any memory
- * needed.
- */
+/* Alternate create PNG structure for reading, and allocate any memory needed. */
png_structp PNGAPI
png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
@@ -66,17 +64,9 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
return (NULL);
/* Added at libpng-1.2.6 */
-#ifdef PNG_USER_LIMITS_SUPPORTED
+#ifdef PNG_SET_USER_LIMITS_SUPPORTED
png_ptr->user_width_max = PNG_USER_WIDTH_MAX;
png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;
-# ifdef PNG_USER_CHUNK_CACHE_MAX
- /* Added at libpng-1.2.43 and 1.4.0 */
- png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;
-# endif
-# ifdef PNG_SET_USER_CHUNK_MALLOC_MAX
- /* Added at libpng-1.2.43 and 1.4.1 */
- png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX;
-# endif
#endif
#ifdef PNG_SETJMP_SUPPORTED
@@ -241,8 +231,7 @@ png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
png_ptr->flags = 0;
#endif
png_error(png_ptr,
- "The png struct allocated by the application for reading is"
- " too small.");
+ "The png struct allocated by the application for reading is too small.");
}
if (png_sizeof(png_info) > png_info_size)
{
@@ -251,8 +240,7 @@ png_read_init_2(png_structp png_ptr, png_const_charp user_png_ver,
png_ptr->flags = 0;
#endif
png_error(png_ptr,
- "The info struct allocated by application for reading is"
- " too small.");
+ "The info struct allocated by application for reading is too small.");
}
png_read_init_3(&png_ptr, user_png_ver, png_struct_size);
}
@@ -282,8 +270,7 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
#else
png_ptr->warning_fn = NULL;
png_warning(png_ptr,
- "Application uses deprecated png_read_init() and should be"
- " recompiled.");
+ "Application uses deprecated png_read_init() and should be recompiled.");
break;
#endif
}
@@ -330,8 +317,7 @@ png_read_init_3(png_structpp ptr_ptr, png_const_charp user_png_ver,
{
case Z_OK: /* Do nothing */ break;
case Z_STREAM_ERROR: png_error(png_ptr, "zlib memory error"); break;
- case Z_VERSION_ERROR: png_error(png_ptr, "zlib version error");
- break;
+ case Z_VERSION_ERROR: png_error(png_ptr, "zlib version error"); break;
default: png_error(png_ptr, "Unknown zlib error");
}
@@ -623,8 +609,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
if (png_ptr->transformations & PNG_FILLER)
png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined.");
#endif
-#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \
- !defined(PNG_READ_PACKSWAP_SUPPORTED)
+#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && !defined(PNG_READ_PACKSWAP_SUPPORTED)
if (png_ptr->transformations & PNG_PACKSWAP)
png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined.");
#endif
@@ -727,9 +712,7 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
png_error(png_ptr, "Invalid attempt to read row data");
png_ptr->zstream.next_out = png_ptr->row_buf;
- png_ptr->zstream.avail_out =
- (uInt)(PNG_ROWBYTES(png_ptr->pixel_depth,
- png_ptr->iwidth) + 1);
+ png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
do
{
if (!(png_ptr->zstream.avail_in))
@@ -1196,8 +1179,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
/* Free all memory used by the read (old method) */
void /* PRIVATE */
-png_read_destroy(png_structp png_ptr, png_infop info_ptr,
- png_infop end_info_ptr)
+png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr)
{
#ifdef PNG_SETJMP_SUPPORTED
jmp_buf tmp_jmp;
diff --git a/gs/libpng/pngrio.c b/gs/libpng/pngrio.c
index 6978682c7..9ce073794 100644
--- a/gs/libpng/pngrio.c
+++ b/gs/libpng/pngrio.c
@@ -1,8 +1,8 @@
/* pngrio.c - functions for data input
*
- * Last changed in libpng 1.2.43 [February 25, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.2.41 [December 3, 2009]
+ * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -92,8 +92,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
if ((png_bytep)n_data == data)
{
#ifdef _WIN32_WCE
- if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check,
- NULL) )
+ if ( !ReadFile((HANDLE)(png_ptr->io_ptr), data, length, &check, NULL) )
check = 0;
#else
check = fread(n_data, 1, length, io_ptr);
diff --git a/gs/libpng/pngrtran.c b/gs/libpng/pngrtran.c
index 21c71b475..c7f71e1cc 100644
--- a/gs/libpng/pngrtran.c
+++ b/gs/libpng/pngrtran.c
@@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * Last changed in libpng 1.2.43 [February 25, 2010]
+ * Last changed in libpng 1.2.42 [January 3, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -432,10 +432,8 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
png_ptr->palette_to_index[png_ptr->index_to_palette[j]]
= png_ptr->palette_to_index[num_new_palette];
- png_ptr->index_to_palette[j] =
- (png_byte)num_new_palette;
- png_ptr->palette_to_index[num_new_palette] =
- (png_byte)j;
+ png_ptr->index_to_palette[j] = (png_byte)num_new_palette;
+ png_ptr->palette_to_index[num_new_palette] = (png_byte)j;
}
if (num_new_palette <= maximum_colors)
break;
@@ -504,8 +502,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
{
/* int dr = abs(ir - r); */
int dr = ((ir > r) ? ir - r : r - ir);
- int index_r = (ir << (PNG_DITHER_BLUE_BITS +
- PNG_DITHER_GREEN_BITS));
+ int index_r = (ir << (PNG_DITHER_BLUE_BITS + PNG_DITHER_GREEN_BITS));
for (ig = 0; ig < num_green; ig++)
{
@@ -775,9 +772,8 @@ png_init_read_transformations(png_structp png_ptr)
if (png_ptr != NULL)
#endif
{
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
- defined(PNG_READ_SHIFT_SUPPORTED) || \
- defined(PNG_READ_GAMMA_SUPPORTED)
+#if defined(PNG_READ_BACKGROUND_SUPPORTED) || defined(PNG_READ_SHIFT_SUPPORTED) \
+ || defined(PNG_READ_GAMMA_SUPPORTED)
int color_type = png_ptr->color_type;
#endif
@@ -974,8 +970,7 @@ png_init_read_transformations(png_structp png_ptr)
back.red = (png_byte)(pow(
(double)png_ptr->background.red/255, gs) * 255.0 + .5);
back.green = (png_byte)(pow(
- (double)png_ptr->background.green/255, gs) * 255.0
- + .5);
+ (double)png_ptr->background.green/255, gs) * 255.0 + .5);
back.blue = (png_byte)(pow(
(double)png_ptr->background.blue/255, gs) * 255.0 + .5);
}
@@ -1389,8 +1384,7 @@ png_do_read_transformations(png_structp png_ptr)
if (png_ptr->transformations & PNG_RGB_TO_GRAY)
{
int rgb_error =
- png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info),
- png_ptr->row_buf + 1);
+ png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), png_ptr->row_buf + 1);
if (rgb_error)
{
png_ptr->rgb_to_gray_status=1;
@@ -2402,8 +2396,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
{
png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >>
png_ptr->gamma_shift][red>>8];
- png_uint_16 green_1 =
- png_ptr->gamma_16_to_1[(green&0xff) >>
+ png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >>
png_ptr->gamma_shift][green>>8];
png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >>
png_ptr->gamma_shift][blue>>8];
@@ -2500,8 +2493,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
{
png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >>
png_ptr->gamma_shift][red>>8];
- png_uint_16 green_1 =
- png_ptr->gamma_16_to_1[(green&0xff) >>
+ png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >>
png_ptr->gamma_shift][green>>8];
png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >>
png_ptr->gamma_shift][blue>>8];
@@ -2605,8 +2597,7 @@ png_build_grayscale_palette(int bit_depth, png_colorp palette)
}
/* This function is currently unused. Do we really need it? */
-#if defined(PNG_READ_DITHER_SUPPORTED) && \
- defined(PNG_CORRECT_PALETTE_SUPPORTED)
+#if defined(PNG_READ_DITHER_SUPPORTED) && defined(PNG_CORRECT_PALETTE_SUPPORTED)
void /* PRIVATE */
png_correct_palette(png_structp png_ptr, png_colorp palette,
int num_palette)
@@ -2614,8 +2605,7 @@ png_correct_palette(png_structp png_ptr, png_colorp palette,
png_debug(1, "in png_correct_palette");
#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \
- defined(PNG_READ_GAMMA_SUPPORTED) && \
- defined(PNG_FLOATING_POINT_SUPPORTED)
+ defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
if (png_ptr->transformations & (PNG_GAMMA | PNG_BACKGROUND))
{
png_color back, back_1;
@@ -2636,8 +2626,8 @@ png_correct_palette(png_structp png_ptr, png_colorp palette,
g = 1.0 / (png_ptr->background_gamma * png_ptr->screen_gamma);
- if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_SCREEN
- || fabs(g - 1.0) < PNG_GAMMA_THRESHOLD)
+ if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_SCREEN ||
+ fabs(g - 1.0) < PNG_GAMMA_THRESHOLD)
{
back.red = png_ptr->background.red;
back.green = png_ptr->background.green;
diff --git a/gs/libpng/pngrutil.c b/gs/libpng/pngrutil.c
index 1bc3792ce..352910dd1 100644
--- a/gs/libpng/pngrutil.c
+++ b/gs/libpng/pngrutil.c
@@ -1,8 +1,8 @@
/* pngrutil.c - utilities to read a PNG file
*
- * Last changed in libpng 1.2.44 [June 26, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.2.41 [December 3, 2009]
+ * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -26,8 +26,7 @@
#ifdef PNG_FLOATING_POINT_SUPPORTED
# ifdef WIN32_WCE_OLD
/* The strtod() function is not supported on WindowsCE */
-__inline double png_strtod(png_structp png_ptr, PNG_CONST char *nptr,
- char **endptr)
+__inline double png_strtod(png_structp png_ptr, PNG_CONST char *nptr, char **endptr)
{
double result = 0;
int len;
@@ -218,214 +217,180 @@ png_crc_error(png_structp png_ptr)
#if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \
defined(PNG_READ_iCCP_SUPPORTED)
-static png_size_t
-png_inflate(png_structp png_ptr, const png_byte *data, png_size_t size,
- png_bytep output, png_size_t output_size)
+/*
+ * Decompress trailing data in a chunk. The assumption is that chunkdata
+ * points at an allocated area holding the contents of a chunk with a
+ * trailing compressed part. What we get back is an allocated area
+ * holding the original prefix part and an uncompressed version of the
+ * trailing part (the malloc area passed in is freed).
+ */
+void /* PRIVATE */
+png_decompress_chunk(png_structp png_ptr, int comp_type,
+ png_size_t chunklength,
+ png_size_t prefix_size, png_size_t *newlength)
{
- png_size_t count = 0;
-
- png_ptr->zstream.next_in = (png_bytep)data; /* const_cast: VALID */
- png_ptr->zstream.avail_in = size;
+ static PNG_CONST char msg[] = "Error decoding compressed chunk";
+ png_charp text;
+ png_size_t text_size;
- while (1)
+ if (comp_type == PNG_COMPRESSION_TYPE_BASE)
{
- int ret, avail;
-
- /* Reset the output buffer each time round - we empty it
- * after every inflate call.
- */
+ int ret = Z_OK;
+ png_ptr->zstream.next_in = (png_bytep)(png_ptr->chunkdata + prefix_size);
+ png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size);
png_ptr->zstream.next_out = png_ptr->zbuf;
- png_ptr->zstream.avail_out = png_ptr->zbuf_size;
+ png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
+
+ text_size = 0;
+ text = NULL;
- ret = inflate(&png_ptr->zstream, Z_NO_FLUSH);
- avail = png_ptr->zbuf_size - png_ptr->zstream.avail_out;
+ while (png_ptr->zstream.avail_in)
+ {
+ ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
+ if (ret != Z_OK && ret != Z_STREAM_END)
+ {
+ if (png_ptr->zstream.msg != NULL)
+ png_warning(png_ptr, png_ptr->zstream.msg);
+ else
+ png_warning(png_ptr, msg);
+ inflateReset(&png_ptr->zstream);
+ png_ptr->zstream.avail_in = 0;
- /* First copy/count any new output - but only if we didn't
- * get an error code.
- */
- if ((ret == Z_OK || ret == Z_STREAM_END) && avail > 0)
+ if (text == NULL)
{
- if (output != 0 && output_size > count)
+ text_size = prefix_size + png_sizeof(msg) + 1;
+ text = (png_charp)png_malloc_warn(png_ptr, text_size);
+ if (text == NULL)
{
- int copy = output_size - count;
- if (avail < copy) copy = avail;
- png_memcpy(output + count, png_ptr->zbuf, copy);
+ png_free(png_ptr, png_ptr->chunkdata);
+ png_ptr->chunkdata = NULL;
+ png_error(png_ptr, "Not enough memory to decompress chunk");
}
- count += avail;
+ png_memcpy(text, png_ptr->chunkdata, prefix_size);
}
- if (ret == Z_OK)
- continue;
-
- /* Termination conditions - always reset the zstream, it
- * must be left in inflateInit state.
- */
- png_ptr->zstream.avail_in = 0;
- inflateReset(&png_ptr->zstream);
-
- if (ret == Z_STREAM_END)
- return count; /* NOTE: may be zero. */
+ text[text_size - 1] = 0x00;
- /* Now handle the error codes - the API always returns 0
- * and the error message is dumped into the uncompressed
- * buffer if available.
- */
+ /* Copy what we can of the error message into the text chunk */
+ text_size = (png_size_t)(chunklength -
+ (text - png_ptr->chunkdata) - 1);
+ if (text_size > png_sizeof(msg))
+ text_size = png_sizeof(msg);
+ png_memcpy(text + prefix_size, msg, text_size);
+ break;
+ }
+ if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END)
+ {
+ if (text == NULL)
+ {
+ text_size = prefix_size +
+ png_ptr->zbuf_size - png_ptr->zstream.avail_out;
+ text = (png_charp)png_malloc_warn(png_ptr, text_size + 1);
+ if (text == NULL)
{
- PNG_CONST char *msg;
- if (png_ptr->zstream.msg != 0)
- msg = png_ptr->zstream.msg;
+ png_free(png_ptr, png_ptr->chunkdata);
+ png_ptr->chunkdata = NULL;
+ png_error(png_ptr,
+ "Not enough memory to decompress chunk.");
+ }
+ png_memcpy(text + prefix_size, png_ptr->zbuf,
+ text_size - prefix_size);
+ png_memcpy(text, png_ptr->chunkdata, prefix_size);
+ *(text + text_size) = 0x00;
+ }
else
{
-#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)
- char umsg[52];
+ png_charp tmp;
- switch (ret)
+ tmp = text;
+ text = (png_charp)png_malloc_warn(png_ptr,
+ (png_uint_32)(text_size +
+ png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1));
+ if (text == NULL)
{
- case Z_BUF_ERROR:
- msg = "Buffer error in compressed datastream in %s chunk";
- break;
- case Z_DATA_ERROR:
- msg = "Data error in compressed datastream in %s chunk";
- break;
- default:
- msg = "Incomplete compressed datastream in %s chunk";
- break;
+ png_free(png_ptr, tmp);
+ png_free(png_ptr, png_ptr->chunkdata);
+ png_ptr->chunkdata = NULL;
+ png_error(png_ptr,
+ "Not enough memory to decompress chunk..");
}
-
- png_snprintf(umsg, sizeof umsg, msg, png_ptr->chunk_name);
- msg = umsg;
-#else
- msg = "Damaged compressed datastream in chunk other than IDAT";
-#endif
+ png_memcpy(text, tmp, text_size);
+ png_free(png_ptr, tmp);
+ png_memcpy(text + text_size, png_ptr->zbuf,
+ (png_ptr->zbuf_size - png_ptr->zstream.avail_out));
+ text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out;
+ *(text + text_size) = 0x00;
}
-
- png_warning(png_ptr, msg);
+ if (ret == Z_STREAM_END)
+ break;
+ else
+ {
+ png_ptr->zstream.next_out = png_ptr->zbuf;
+ png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
}
-
- /* 0 means an error - notice that this code simple ignores
- * zero length compressed chunks as a result.
- */
- return 0;
}
-}
-
-/*
- * Decompress trailing data in a chunk. The assumption is that chunkdata
- * points at an allocated area holding the contents of a chunk with a
- * trailing compressed part. What we get back is an allocated area
- * holding the original prefix part and an uncompressed version of the
- * trailing part (the malloc area passed in is freed).
- */
-void /* PRIVATE */
-png_decompress_chunk(png_structp png_ptr, int comp_type,
- png_size_t chunklength,
- png_size_t prefix_size, png_size_t *newlength)
-{
- /* The caller should guarantee this */
- if (prefix_size > chunklength)
- {
- /* The recovery is to delete the chunk. */
- png_warning(png_ptr, "invalid chunklength");
- prefix_size = 0; /* To delete everything */
}
-
- else if (comp_type == PNG_COMPRESSION_TYPE_BASE)
+ if (ret != Z_STREAM_END)
{
- png_size_t expanded_size = png_inflate(png_ptr,
- (png_bytep)(png_ptr->chunkdata + prefix_size),
- chunklength - prefix_size,
- 0/*output*/, 0/*output size*/);
-
- /* Now check the limits on this chunk - if the limit fails the
- * compressed data will be removed, the prefix will remain.
- */
-#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
- if (png_ptr->user_chunk_malloc_max &&
- (prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1))
-#else
-# ifdef PNG_USER_CHUNK_MALLOC_MAX
- if ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
- prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)
-# endif
-#endif
- png_warning(png_ptr, "Exceeded size limit while expanding chunk");
+#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)
+ char umsg[52];
+
+ if (ret == Z_BUF_ERROR)
+ png_snprintf(umsg, 52,
+ "Buffer error in compressed datastream in %s chunk",
+ png_ptr->chunk_name);
+
+ else if (ret == Z_DATA_ERROR)
+ png_snprintf(umsg, 52,
+ "Data error in compressed datastream in %s chunk",
+ png_ptr->chunk_name);
- /* If the size is zero either there was an error and a message
- * has already been output (warning) or the size really is zero
- * and we have nothing to do - the code will exit through the
- * error case below.
- */
-#if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \
- defined(PNG_USER_CHUNK_MALLOC_MAX)
else
+ png_snprintf(umsg, 52,
+ "Incomplete compressed datastream in %s chunk",
+ png_ptr->chunk_name);
+
+ png_warning(png_ptr, umsg);
+#else
+ png_warning(png_ptr,
+ "Incomplete compressed datastream in chunk other than IDAT");
#endif
- if (expanded_size > 0)
+ text_size = prefix_size;
+ if (text == NULL)
{
- /* Success (maybe) - really uncompress the chunk. */
- png_size_t new_size = 0;
- png_charp text = png_malloc_warn(png_ptr,
- prefix_size + expanded_size + 1);
-
- if (text != NULL)
+ text = (png_charp)png_malloc_warn(png_ptr, text_size+1);
+ if (text == NULL)
{
+ png_free(png_ptr, png_ptr->chunkdata);
+ png_ptr->chunkdata = NULL;
+ png_error(png_ptr, "Not enough memory for text.");
+ }
png_memcpy(text, png_ptr->chunkdata, prefix_size);
- new_size = png_inflate(png_ptr,
- (png_bytep)(png_ptr->chunkdata + prefix_size),
- chunklength - prefix_size,
- (png_bytep)(text + prefix_size), expanded_size);
- text[prefix_size + expanded_size] = 0; /* just in case */
+ }
+ *(text + text_size) = 0x00;
+ }
+
+ inflateReset(&png_ptr->zstream);
+ png_ptr->zstream.avail_in = 0;
- if (new_size == expanded_size)
- {
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = text;
- *newlength = prefix_size + expanded_size;
- return; /* The success return! */
- }
-
- png_warning(png_ptr, "png_inflate logic error");
- png_free(png_ptr, text);
- }
- else
- png_warning(png_ptr, "Not enough memory to decompress chunk.");
- }
+ *newlength=text_size;
}
-
else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */
{
#if defined(PNG_STDIO_SUPPORTED) && !defined(_WIN32_WCE)
char umsg[50];
- png_snprintf(umsg, sizeof umsg, "Unknown zTXt compression type %d",
- comp_type);
+ png_snprintf(umsg, 50, "Unknown zTXt compression type %d", comp_type);
png_warning(png_ptr, umsg);
#else
png_warning(png_ptr, "Unknown zTXt compression type");
#endif
- /* The recovery is to simply drop the data. */
- }
-
- /* Generic error return - leave the prefix, delete the compressed
- * data, reallocate the chunkdata to remove the potentially large
- * amount of compressed data.
- */
- {
- png_charp text = png_malloc_warn(png_ptr, prefix_size + 1);
- if (text != NULL)
- {
- if (prefix_size > 0)
- png_memcpy(text, png_ptr->chunkdata, prefix_size);
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = text;
-
- /* This is an extra zero in the 'uncompressed' part. */
*(png_ptr->chunkdata + prefix_size) = 0x00;
+ *newlength = prefix_size;
}
- /* Ignore a malloc error here - it is safe. */
- }
-
- *newlength = prefix_size;
}
#endif
@@ -916,11 +881,9 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
green_x, green_y, blue_x, blue_y);
#else
fprintf(stderr, "wx=%ld, wy=%ld, rx=%ld, ry=%ld\n",
- (long)int_x_white, (long)int_y_white,
- (long)int_x_red, (long)int_y_red);
+ int_x_white, int_y_white, int_x_red, int_y_red);
fprintf(stderr, "gx=%ld, gy=%ld, bx=%ld, by=%ld\n",
- (long)int_x_green, (long)int_y_green,
- (long)int_x_blue, (long)int_y_blue);
+ int_x_green, int_y_green, int_x_blue, int_y_blue);
#endif
#endif /* PNG_CONSOLE_IO_SUPPORTED */
}
@@ -1174,24 +1137,6 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_sPLT");
-#ifdef PNG_USER_LIMITS_SUPPORTED
-
- if (png_ptr->user_chunk_cache_max != 0)
- {
- if (png_ptr->user_chunk_cache_max == 1)
- {
- png_crc_finish(png_ptr, length);
- return;
- }
- if (--png_ptr->user_chunk_cache_max == 1)
- {
- png_warning(png_ptr, "No space in chunk cache for sPLT");
- png_crc_finish(png_ptr, length);
- return;
- }
- }
-#endif
-
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before sPLT");
else if (png_ptr->mode & PNG_HAVE_IDAT)
@@ -1224,8 +1169,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata[slength] = 0x00;
- for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start;
- entry_start++)
+ for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start; entry_start++)
/* Empty loop to find end of name */ ;
++entry_start;
@@ -1818,7 +1762,6 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (png_ptr->chunkdata == NULL)
{
png_warning(png_ptr, "Out of memory while processing sCAL chunk");
- png_crc_finish(png_ptr, length);
return;
}
slength = (png_size_t)length;
@@ -1840,8 +1783,6 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (*vp)
{
png_warning(png_ptr, "malformed width string in sCAL chunk");
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
return;
}
#else
@@ -1850,8 +1791,6 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (swidth == NULL)
{
png_warning(png_ptr, "Out of memory while processing sCAL chunk width");
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
return;
}
png_memcpy(swidth, ep, (png_size_t)png_strlen(ep));
@@ -1865,7 +1804,8 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (png_ptr->chunkdata + slength < ep)
{
png_warning(png_ptr, "Truncated sCAL chunk");
-#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
+#if defined(PNG_FIXED_POINT_SUPPORTED) && \
+ !defined(PNG_FLOATING_POINT_SUPPORTED)
png_free(png_ptr, swidth);
#endif
png_free(png_ptr, png_ptr->chunkdata);
@@ -1878,11 +1818,6 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (*vp)
{
png_warning(png_ptr, "malformed height string in sCAL chunk");
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
-#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
- png_free(png_ptr, swidth);
-#endif
return;
}
#else
@@ -1891,11 +1826,6 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (sheight == NULL)
{
png_warning(png_ptr, "Out of memory while processing sCAL chunk height");
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
-#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
- png_free(png_ptr, swidth);
-#endif
return;
}
png_memcpy(sheight, ep, (png_size_t)png_strlen(ep));
@@ -1993,23 +1923,6 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_tEXt");
-#ifdef PNG_USER_LIMITS_SUPPORTED
- if (png_ptr->user_chunk_cache_max != 0)
- {
- if (png_ptr->user_chunk_cache_max == 1)
- {
- png_crc_finish(png_ptr, length);
- return;
- }
- if (--png_ptr->user_chunk_cache_max == 1)
- {
- png_warning(png_ptr, "No space in chunk cache for tEXt");
- png_crc_finish(png_ptr, length);
- return;
- }
- }
-#endif
-
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before tEXt");
@@ -2095,23 +2008,6 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_zTXt");
-#ifdef PNG_USER_LIMITS_SUPPORTED
- if (png_ptr->user_chunk_cache_max != 0)
- {
- if (png_ptr->user_chunk_cache_max == 1)
- {
- png_crc_finish(png_ptr, length);
- return;
- }
- if (--png_ptr->user_chunk_cache_max == 1)
- {
- png_warning(png_ptr, "No space in chunk cache for zTXt");
- png_crc_finish(png_ptr, length);
- return;
- }
- }
-#endif
-
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before zTXt");
@@ -2216,23 +2112,6 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_iTXt");
-#ifdef PNG_USER_LIMITS_SUPPORTED
- if (png_ptr->user_chunk_cache_max != 0)
- {
- if (png_ptr->user_chunk_cache_max == 1)
- {
- png_crc_finish(png_ptr, length);
- return;
- }
- if (--png_ptr->user_chunk_cache_max == 1)
- {
- png_warning(png_ptr, "No space in chunk cache for iTXt");
- png_crc_finish(png_ptr, length);
- return;
- }
- }
-#endif
-
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before iTXt");
@@ -2360,23 +2239,6 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_unknown");
-#ifdef PNG_USER_LIMITS_SUPPORTED
- if (png_ptr->user_chunk_cache_max != 0)
- {
- if (png_ptr->user_chunk_cache_max == 1)
- {
- png_crc_finish(png_ptr, length);
- return;
- }
- if (--png_ptr->user_chunk_cache_max == 1)
- {
- png_warning(png_ptr, "No space in chunk cache for unknown chunk");
- png_crc_finish(png_ptr, length);
- return;
- }
- }
-#endif
-
if (png_ptr->mode & PNG_HAVE_IDAT)
{
#ifdef PNG_USE_LOCAL_ARRAYS
@@ -2417,8 +2279,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_memcpy((png_charp)png_ptr->unknown_chunk.name,
(png_charp)png_ptr->chunk_name,
png_sizeof(png_ptr->unknown_chunk.name));
- png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1]
- = '\0';
+ png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] = '\0';
png_ptr->unknown_chunk.size = (png_size_t)length;
if (length == 0)
png_ptr->unknown_chunk.data = NULL;
@@ -2890,8 +2751,7 @@ png_do_read_interlace(png_structp png_ptr)
default:
{
png_size_t pixel_bytes = (row_info->pixel_depth >> 3);
- png_bytep sp = row + (png_size_t)(row_info->width - 1)
- * pixel_bytes;
+ png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes;
png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes;
int jstop = png_pass_inc[pass];
@@ -3086,6 +2946,9 @@ png_read_finish_row(png_structp png_ptr)
png_pass_start[png_ptr->pass]) /
png_pass_inc[png_ptr->pass];
+ png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,
+ png_ptr->iwidth) + 1;
+
if (!(png_ptr->transformations & PNG_INTERLACE))
{
png_ptr->num_rows = (png_ptr->height +
@@ -3144,7 +3007,7 @@ png_read_finish_row(png_structp png_ptr)
{
if (!(png_ptr->zstream.avail_out) || png_ptr->zstream.avail_in ||
png_ptr->idat_size)
- png_warning(png_ptr, "Extra compressed data.");
+ png_warning(png_ptr, "Extra compressed data");
png_ptr->mode |= PNG_AFTER_IDAT;
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
break;
@@ -3166,7 +3029,7 @@ png_read_finish_row(png_structp png_ptr)
}
if (png_ptr->idat_size || png_ptr->zstream.avail_in)
- png_warning(png_ptr, "Extra compression data.");
+ png_warning(png_ptr, "Extra compression data");
inflateReset(&png_ptr->zstream);
@@ -3212,12 +3075,16 @@ png_read_start_row(png_structp png_ptr)
png_pass_inc[png_ptr->pass] - 1 -
png_pass_start[png_ptr->pass]) /
png_pass_inc[png_ptr->pass];
+
+ png_ptr->irowbytes =
+ PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1;
}
else
#endif /* PNG_READ_INTERLACING_SUPPORTED */
{
png_ptr->num_rows = png_ptr->height;
png_ptr->iwidth = png_ptr->width;
+ png_ptr->irowbytes = png_ptr->rowbytes + 1;
}
max_pixel_depth = png_ptr->pixel_depth;
@@ -3374,8 +3241,7 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
png_debug1(3, "iwidth = %lu,", png_ptr->iwidth);
png_debug1(3, "num_rows = %lu,", png_ptr->num_rows);
png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes);
- png_debug1(3, "irowbytes = %lu",
- PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1);
+ png_debug1(3, "irowbytes = %lu", png_ptr->irowbytes);
png_ptr->flags |= PNG_FLAG_ROW_INIT;
}
diff --git a/gs/libpng/pngset.c b/gs/libpng/pngset.c
index 717757fc4..faf738431 100644
--- a/gs/libpng/pngset.c
+++ b/gs/libpng/pngset.c
@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
- * Last changed in libpng 1.2.43 [February 25, 2010]
+ * Last changed in libpng 1.2.42 [January 3, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -1144,6 +1144,7 @@ png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
}
#endif
+#ifdef PNG_WRITE_SUPPORTED
void PNGAPI
png_set_compression_buffer_size(png_structp png_ptr,
png_uint_32 size)
@@ -1156,6 +1157,7 @@ png_set_compression_buffer_size(png_structp png_ptr,
png_ptr->zstream.next_out = png_ptr->zbuf;
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
}
+#endif
void PNGAPI
png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
diff --git a/gs/libpng/pngtest.c b/gs/libpng/pngtest.c
index fd0e432cc..294ede2ad 100644
--- a/gs/libpng/pngtest.c
+++ b/gs/libpng/pngtest.c
@@ -1,8 +1,8 @@
/* pngtest.c - a simple test program to test libpng
*
- * Last changed in libpng 1.2.43 [February 25, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.2.41 [December 3, 2009]
+ * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -719,8 +719,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef _WIN32_WCE
MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH);
- if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0,
- NULL)) == INVALID_HANDLE_VALUE)
+ if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
#else
if ((fpin = fopen(inname, "rb")) == NULL)
#endif
@@ -731,8 +730,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef _WIN32_WCE
MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH);
- if ((fpout = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
- 0, NULL)) == INVALID_HANDLE_VALUE)
+ if ((fpout = CreateFile(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL)) == INVALID_HANDLE_VALUE)
#else
if ((fpout = fopen(outname, "wb")) == NULL)
#endif
@@ -922,8 +920,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
{
png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x,
blue_y;
- if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y,
- &red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y))
+ if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, &red_x,
+ &red_y, &green_x, &green_y, &blue_x, &blue_y))
{
png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x,
red_y, green_x, green_y, blue_x, blue_y);
@@ -1075,8 +1073,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width,
&scal_height))
{
- png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width,
- scal_height);
+ png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, scal_height);
}
}
#endif
@@ -1360,8 +1357,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_debug(0, "Opening files for comparison");
#ifdef _WIN32_WCE
MultiByteToWideChar(CP_ACP, 0, inname, -1, path, MAX_PATH);
- if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING,
- 0, NULL)) == INVALID_HANDLE_VALUE)
+ if ((fpin = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
#else
if ((fpin = fopen(inname, "rb")) == NULL)
#endif
@@ -1372,8 +1368,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef _WIN32_WCE
MultiByteToWideChar(CP_ACP, 0, outname, -1, path, MAX_PATH);
- if ((fpout = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING,
- 0, NULL)) == INVALID_HANDLE_VALUE)
+ if ((fpout = CreateFile(path, GENERIC_READ, 0, NULL, OPEN_EXISTING, 0, NULL)) == INVALID_HANDLE_VALUE)
#else
if ((fpout = fopen(outname, "rb")) == NULL)
#endif
@@ -1541,14 +1536,14 @@ main(int argc, char *argv[])
#endif
for (i=2; i<argc; ++i)
{
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
+ int k;
+#endif
int kerror;
fprintf(STDERR, "\n Testing %s:", argv[i]);
kerror = test_one_file(argv[i], outname);
if (kerror == 0)
{
-#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
- int k;
-#endif
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
fprintf(STDERR, "\n PASS (%lu zero samples)\n",
(unsigned long)zero_samples);
@@ -1634,7 +1629,8 @@ main(int argc, char *argv[])
for (k = 0; k<256; k++)
if (filters_used[k])
fprintf(STDERR, " Filter %d was used %lu times\n",
- k, (unsigned long)filters_used[k]);
+ k,
+ (unsigned long)filters_used[k]);
#endif
#ifdef PNG_TIME_RFC1123_SUPPORTED
if (tIME_chunk_present != 0)
@@ -1702,4 +1698,4 @@ main(int argc, char *argv[])
}
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_2_44 your_png_h_is_not_version_1_2_44;
+typedef version_1_2_42 your_png_h_is_not_version_1_2_42;
diff --git a/gs/libpng/pngwio.c b/gs/libpng/pngwio.c
index 44e5ea91c..5a4d04a67 100644
--- a/gs/libpng/pngwio.c
+++ b/gs/libpng/pngwio.c
@@ -174,7 +174,7 @@ png_default_flush(png_structp png_ptr)
* arguments a pointer to a png_struct. After a call to
* the flush function, there should be no data in any buffers
* or pending transmission. If the output method doesn't do
- * any buffering of output, a function prototype must still be
+ * any buffering of ouput, a function prototype must still be
* supplied although it doesn't have to do anything. If
* PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile
* time, output_flush_fn will be ignored, although it must be
diff --git a/gs/libpng/pngwrite.c b/gs/libpng/pngwrite.c
index e411e8165..386b8af6e 100644
--- a/gs/libpng/pngwrite.c
+++ b/gs/libpng/pngwrite.c
@@ -38,8 +38,7 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
/* Write PNG signature */
png_write_sig(png_ptr);
#ifdef PNG_MNG_FEATURES_SUPPORTED
- if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \
- (png_ptr->mng_features_permitted))
+ if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted))
{
png_warning(png_ptr, "MNG features are not allowed in a PNG datastream");
png_ptr->mng_features_permitted = 0;
@@ -640,8 +639,7 @@ png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,
png_ptr->flags = 0;
#endif
png_error(png_ptr,
- "The png struct allocated by the application for writing is"
- " too small.");
+ "The png struct allocated by the application for writing is too small.");
}
if (png_sizeof(png_info) > png_info_size)
{
@@ -650,8 +648,7 @@ png_write_init_2(png_structp png_ptr, png_const_charp user_png_ver,
png_ptr->flags = 0;
#endif
png_error(png_ptr,
- "The info struct allocated by the application for writing is"
- " too small.");
+ "The info struct allocated by the application for writing is too small.");
}
png_write_init_3(&png_ptr, user_png_ver, png_struct_size);
}
@@ -806,19 +803,15 @@ png_write_row(png_structp png_ptr, png_bytep row)
/* Check for transforms that have been set but were defined out */
#if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED)
if (png_ptr->transformations & PNG_INVERT_MONO)
- png_warning(png_ptr,
- "PNG_WRITE_INVERT_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined.");
#endif
#if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED)
if (png_ptr->transformations & PNG_FILLER)
- png_warning(png_ptr,
- "PNG_WRITE_FILLER_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined.");
#endif
-#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \
- defined(PNG_READ_PACKSWAP_SUPPORTED)
+#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && defined(PNG_READ_PACKSWAP_SUPPORTED)
if (png_ptr->transformations & PNG_PACKSWAP)
- png_warning(png_ptr,
- "PNG_WRITE_PACKSWAP_SUPPORTED is not defined.");
+ png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined.");
#endif
#if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED)
if (png_ptr->transformations & PNG_PACK)
@@ -1073,7 +1066,7 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
{
png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
if (png_ptr->num_chunk_list)
{
png_free(png_ptr, png_ptr->chunk_list);
diff --git a/gs/libpng/pngwtran.c b/gs/libpng/pngwtran.c
index 0ce9b9b50..e5bd4a3ad 100644
--- a/gs/libpng/pngwtran.c
+++ b/gs/libpng/pngwtran.c
@@ -1,8 +1,8 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
- * Last changed in libpng 1.2.43 [February 25, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.2.41 [December 3, 2009]
+ * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -30,8 +30,7 @@ png_do_write_transformations(png_structp png_ptr)
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
if (png_ptr->transformations & PNG_USER_TRANSFORM)
if (png_ptr->write_user_transform_fn != NULL)
- (*(png_ptr->write_user_transform_fn)) /* User write transform
- function */
+ (*(png_ptr->write_user_transform_fn)) /* User write transform function */
(png_ptr, /* png_ptr */
&(png_ptr->row_info), /* row_info: */
/* png_uint_32 width; width of row */
diff --git a/gs/libpng/pngwutil.c b/gs/libpng/pngwutil.c
index c75f53eb7..39884470b 100644
--- a/gs/libpng/pngwutil.c
+++ b/gs/libpng/pngwutil.c
@@ -1,8 +1,8 @@
/* pngwutil.c - utilities to write a PNG file
*
- * Last changed in libpng 1.2.43 [February 25, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.2.41 [December 3, 2009]
+ * Copyright (c) 1998-2009 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -59,7 +59,7 @@ png_save_uint_16(png_bytep buf, unsigned int i)
* we should call png_set_sig_bytes() to tell libpng how many of the
* bytes have already been written.
*/
-void /* PRIVATE */
+void PNGAPI
png_write_sig(png_structp png_ptr)
{
png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
@@ -413,8 +413,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
case 4:
case 8:
case 16: png_ptr->channels = 1; break;
- default: png_error(png_ptr,
- "Invalid bit depth for grayscale image");
+ default: png_error(png_ptr, "Invalid bit depth for grayscale image");
}
break;
case PNG_COLOR_TYPE_RGB:
@@ -619,9 +618,7 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
png_write_chunk_data(png_ptr, buf, (png_size_t)3);
}
#else
- /* This is a little slower but some buggy compilers need to do this
- * instead
- */
+ /* This is a little slower but some buggy compilers need to do this instead */
pal_ptr=palette;
for (i = 0; i < num_pal; i++)
{
@@ -1643,8 +1640,7 @@ png_write_sCAL(png_structp png_ptr, int unit, double width, double height)
size_t wc_len;
swprintf(wc_buf, TEXT("%12.12e"), width);
wc_len = wcslen(wc_buf);
- WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + 1, wc_len, NULL,
- NULL);
+ WideCharToMultiByte(CP_ACP, 0, wc_buf, -1, buf + 1, wc_len, NULL, NULL);
total_len = wc_len + 2;
swprintf(wc_buf, TEXT("%12.12e"), height);
wc_len = wcslen(wc_buf);
diff --git a/gs/libpng/projects/wince.txt b/gs/libpng/projects/wince.txt
index c59ec883a..b1fb5a729 100644
--- a/gs/libpng/projects/wince.txt
+++ b/gs/libpng/projects/wince.txt
@@ -1,6 +1,6 @@
A set of project files is available for WinCE. Get
-libpng-1.2.44-project-wince.zip from a libpng distribution
+libpng-1.2.42-project-wince.zip from a libpng distribution
site such as http://libpng.sourceforge.net/index.html
Put the zip file in this directory (projects) and then run
-"unzip -a libpng-1.2.44-project-wince.zip"
+"unzip -a libpng-1.2.42-project-wince.zip"
diff --git a/gs/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj b/gs/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj
index c2eb46864..4376ac360 100644
--- a/gs/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj
+++ b/gs/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj
@@ -222,7 +222,7 @@
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 3;
DYLIB_CURRENT_VERSION = 3;
- FRAMEWORK_VERSION = 1.2.44;
+ FRAMEWORK_VERSION = 1.2.42;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = Info.plist;
@@ -240,7 +240,7 @@
buildSettings = {
DYLIB_COMPATIBILITY_VERSION = 3;
DYLIB_CURRENT_VERSION = 3;
- FRAMEWORK_VERSION = 1.2.44;
+ FRAMEWORK_VERSION = 1.2.42;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = Info.plist;
diff --git a/gs/libpng/scripts/README.txt b/gs/libpng/scripts/README.txt
index a6f33e9fa..70b28b967 100644
--- a/gs/libpng/scripts/README.txt
+++ b/gs/libpng/scripts/README.txt
@@ -1,8 +1,8 @@
-Makefiles for libpng version 1.2.44 - June 26, 2010
+Makefiles for libpng version 1.2.42 - January 3, 2010
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng12.so.0.1.2.44)
+ (gcc, creates libpng12.so.0.1.2.42)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -20,7 +20,7 @@ Makefiles for libpng version 1.2.44 - June 26, 2010
makefile.dec => DEC Alpha UNIX makefile
makefile.dj2 => DJGPP 2 makefile
makefile.elf => Linux/ELF makefile symbol versioning,
- gcc, creates libpng12.so.0.1.2.44)
+ gcc, creates libpng12.so.0.1.2.42)
makefile.freebsd => FreeBSD makefile
makefile.gcc => Generic gcc makefile
makefile.gccmmx => Generic gcc makefile previously using MMX code
@@ -38,14 +38,14 @@ Makefiles for libpng version 1.2.44 - June 26, 2010
makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
- creates libpng12.so.0.1.2.44)
+ creates libpng12.so.0.1.2.42)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
- creates libpng12.so.0.1.2.44)
+ creates libpng12.so.0.1.2.42)
makefile.solaris-x86 => Solaris 2.X makefile (gcc, no MMX code,
- creates libpng12.so.0.1.2.44)
+ creates libpng12.so.0.1.2.42)
makefile.so9 => Solaris 9 makefile (gcc,
- creates libpng12.so.0.1.2.44)
+ creates libpng12.so.0.1.2.42)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile
diff --git a/gs/libpng/scripts/libpng-config-head.in b/gs/libpng/scripts/libpng-config-head.in
index 82e0fdd50..ea11c0bd4 100755
--- a/gs/libpng/scripts/libpng-config-head.in
+++ b/gs/libpng/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
# Modeled after libxml-config.
-version=1.2.44
+version=1.2.42
prefix=""
libdir=""
libs=""
diff --git a/gs/libpng/scripts/libpng.pc.in b/gs/libpng/scripts/libpng.pc.in
index 9a3053495..0ed4a2e8c 100644
--- a/gs/libpng/scripts/libpng.pc.in
+++ b/gs/libpng/scripts/libpng.pc.in
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng12
Name: libpng
Description: Loads and saves PNG files
-Version: 1.2.44
+Version: 1.2.42
Libs: -L${libdir} -lpng12
Cflags: -I${includedir}
diff --git a/gs/libpng/scripts/makefile.32sunu b/gs/libpng/scripts/makefile.32sunu
index db0f3e599..72220284b 100644
--- a/gs/libpng/scripts/makefile.32sunu
+++ b/gs/libpng/scripts/makefile.32sunu
@@ -11,7 +11,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.64sunu b/gs/libpng/scripts/makefile.64sunu
index e7e531706..b045508a4 100644
--- a/gs/libpng/scripts/makefile.64sunu
+++ b/gs/libpng/scripts/makefile.64sunu
@@ -11,7 +11,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.aix b/gs/libpng/scripts/makefile.aix
index 6be3f0c05..67517b05a 100644
--- a/gs/libpng/scripts/makefile.aix
+++ b/gs/libpng/scripts/makefile.aix
@@ -23,7 +23,7 @@ LN_SF = ln -f -s
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
prefix=/usr/local
@@ -48,7 +48,7 @@ LDDEBUG =
CRELEASE = -O2
LDRELEASE = -s
WARNMORE=-W -Wall
-CFLAGS = -D_ALL_SOURCE -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
+CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
LDFLAGS = -L. -L$(ZLIBLIB) -lpng12 -lz -lm $(LDRELEASE)
# File extensions
diff --git a/gs/libpng/scripts/makefile.beos b/gs/libpng/scripts/makefile.beos
index 9c0b28798..dc8e49862 100644
--- a/gs/libpng/scripts/makefile.beos
+++ b/gs/libpng/scripts/makefile.beos
@@ -11,7 +11,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.cegcc b/gs/libpng/scripts/makefile.cegcc
index f18614a7c..34d7c867e 100644
--- a/gs/libpng/scripts/makefile.cegcc
+++ b/gs/libpng/scripts/makefile.cegcc
@@ -23,7 +23,7 @@
VERMAJ = 1
VERMIN = 2
-VERMIC = 44
+VERMIC = 42
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
NAME = libpng
PACKAGE = $(NAME)-$(VER)
diff --git a/gs/libpng/scripts/makefile.cygwin b/gs/libpng/scripts/makefile.cygwin
index 11ec1e51c..408c61903 100644
--- a/gs/libpng/scripts/makefile.cygwin
+++ b/gs/libpng/scripts/makefile.cygwin
@@ -77,7 +77,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng12
PNGMAJ = 0
CYGDLL = 12
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=cygpng$(CYGDLL).dll
diff --git a/gs/libpng/scripts/makefile.darwin b/gs/libpng/scripts/makefile.darwin
index ed7a8e37c..9b99f3d58 100644
--- a/gs/libpng/scripts/makefile.darwin
+++ b/gs/libpng/scripts/makefile.darwin
@@ -22,7 +22,7 @@ ZLIBINC=../zlib
# Library name:
LIBNAME = libpng12
PNGMAJ = 12
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.dec b/gs/libpng/scripts/makefile.dec
index c97c6e6dd..36e90bc28 100644
--- a/gs/libpng/scripts/makefile.dec
+++ b/gs/libpng/scripts/makefile.dec
@@ -8,7 +8,7 @@
# Library name:
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
diff --git a/gs/libpng/scripts/makefile.elf b/gs/libpng/scripts/makefile.elf
index 2631247c1..f15dc084d 100644
--- a/gs/libpng/scripts/makefile.elf
+++ b/gs/libpng/scripts/makefile.elf
@@ -16,7 +16,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.gcmmx b/gs/libpng/scripts/makefile.gcmmx
index 833d11456..e637d98cb 100644
--- a/gs/libpng/scripts/makefile.gcmmx
+++ b/gs/libpng/scripts/makefile.gcmmx
@@ -17,7 +17,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.hp64 b/gs/libpng/scripts/makefile.hp64
index 0f8b3402b..ffa1d7d52 100644
--- a/gs/libpng/scripts/makefile.hp64
+++ b/gs/libpng/scripts/makefile.hp64
@@ -21,7 +21,7 @@ ZLIBINC=/opt/zlib/include
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.hpgcc b/gs/libpng/scripts/makefile.hpgcc
index bd7d8758b..2559d6658 100644
--- a/gs/libpng/scripts/makefile.hpgcc
+++ b/gs/libpng/scripts/makefile.hpgcc
@@ -11,7 +11,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.hpux b/gs/libpng/scripts/makefile.hpux
index c24b6674d..0bc60fee3 100644
--- a/gs/libpng/scripts/makefile.hpux
+++ b/gs/libpng/scripts/makefile.hpux
@@ -21,7 +21,7 @@ ZLIBINC=/opt/zlib/include
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.linux b/gs/libpng/scripts/makefile.linux
index faf697fdb..cc3a7c890 100644
--- a/gs/libpng/scripts/makefile.linux
+++ b/gs/libpng/scripts/makefile.linux
@@ -10,7 +10,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.mingw b/gs/libpng/scripts/makefile.mingw
index 1d7444e50..e48f54b68 100644
--- a/gs/libpng/scripts/makefile.mingw
+++ b/gs/libpng/scripts/makefile.mingw
@@ -14,10 +14,6 @@
# Built from makefile.cygwin
-# This makefile expects to be run under the MSYS shell (part of
-# the MINGW project) and not under CMD.EXE which does not provide
-# "cat" or "sed".
-
# This makefile intends to support building outside the src directory
# if desired. When invoking it, specify an argument to SRCDIR on the
# command line that points to the top of the directory where your source
@@ -81,7 +77,7 @@ CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
LIBNAME = libpng12
PNGMAJ = 0
MINGDLL = 12
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
SHAREDLIB=libpng$(MINGDLL).dll
diff --git a/gs/libpng/scripts/makefile.ne12bsd b/gs/libpng/scripts/makefile.ne12bsd
index fa0501f59..ce43b5818 100644
--- a/gs/libpng/scripts/makefile.ne12bsd
+++ b/gs/libpng/scripts/makefile.ne12bsd
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng12
LIB= png12
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.2.44
+SHLIB_MINOR= 1.2.42
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/gs/libpng/scripts/makefile.netbsd b/gs/libpng/scripts/makefile.netbsd
index 47cd7df55..71d1aec69 100644
--- a/gs/libpng/scripts/makefile.netbsd
+++ b/gs/libpng/scripts/makefile.netbsd
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
LIB= png
SHLIB_MAJOR= 3
-SHLIB_MINOR= 1.2.44
+SHLIB_MINOR= 1.2.42
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/gs/libpng/scripts/makefile.nommx b/gs/libpng/scripts/makefile.nommx
index b41443386..3625e767d 100644
--- a/gs/libpng/scripts/makefile.nommx
+++ b/gs/libpng/scripts/makefile.nommx
@@ -10,7 +10,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.openbsd b/gs/libpng/scripts/makefile.openbsd
index d5cbe2396..9e0290258 100644
--- a/gs/libpng/scripts/makefile.openbsd
+++ b/gs/libpng/scripts/makefile.openbsd
@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.2.44
+SHLIB_MINOR= 1.2.42
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
diff --git a/gs/libpng/scripts/makefile.sco b/gs/libpng/scripts/makefile.sco
index a3c9f0f28..41ad8ca1e 100644
--- a/gs/libpng/scripts/makefile.sco
+++ b/gs/libpng/scripts/makefile.sco
@@ -12,7 +12,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.sggcc b/gs/libpng/scripts/makefile.sggcc
index 28b129ec8..83c847f26 100644
--- a/gs/libpng/scripts/makefile.sggcc
+++ b/gs/libpng/scripts/makefile.sggcc
@@ -9,7 +9,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.sgi b/gs/libpng/scripts/makefile.sgi
index 0baa9d03f..25e8a2536 100644
--- a/gs/libpng/scripts/makefile.sgi
+++ b/gs/libpng/scripts/makefile.sgi
@@ -9,7 +9,7 @@
# Library name:
LIBNAME=libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.so9 b/gs/libpng/scripts/makefile.so9
index 5350af496..ed9708833 100644
--- a/gs/libpng/scripts/makefile.so9
+++ b/gs/libpng/scripts/makefile.so9
@@ -11,7 +11,7 @@
# Library name:
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
LIBNAME = libpng12
diff --git a/gs/libpng/scripts/makefile.solaris b/gs/libpng/scripts/makefile.solaris
index eb65495e0..fd0a491a7 100644
--- a/gs/libpng/scripts/makefile.solaris
+++ b/gs/libpng/scripts/makefile.solaris
@@ -11,7 +11,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/makefile.solaris-x86 b/gs/libpng/scripts/makefile.solaris-x86
index 940ff9302..d491c3358 100644
--- a/gs/libpng/scripts/makefile.solaris-x86
+++ b/gs/libpng/scripts/makefile.solaris-x86
@@ -11,7 +11,7 @@
# Library name:
LIBNAME = libpng12
PNGMAJ = 0
-PNGMIN = 1.2.44
+PNGMIN = 1.2.42
PNGVER = $(PNGMAJ).$(PNGMIN)
# Shared library names:
diff --git a/gs/libpng/scripts/png32ce.def b/gs/libpng/scripts/png32ce.def
index 97bcdecea..69b0a02b9 100644
--- a/gs/libpng/scripts/png32ce.def
+++ b/gs/libpng/scripts/png32ce.def
@@ -5,7 +5,7 @@
LIBRARY lpngce
EXPORTS
-;Version 1.2.44
+;Version 1.2.42
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3
diff --git a/gs/libpng/scripts/pngos2.def b/gs/libpng/scripts/pngos2.def
index 8f16fb15d..c65955862 100644
--- a/gs/libpng/scripts/pngos2.def
+++ b/gs/libpng/scripts/pngos2.def
@@ -2,7 +2,7 @@
; PNG.LIB module definition file for OS/2
;----------------------------------------
-; Version 1.2.44
+; Version 1.2.42
LIBRARY PNG
DESCRIPTION "PNG image compression library for OS/2"
diff --git a/gs/libpng/scripts/pngw32.def b/gs/libpng/scripts/pngw32.def
index e09e70831..d569ec033 100644
--- a/gs/libpng/scripts/pngw32.def
+++ b/gs/libpng/scripts/pngw32.def
@@ -5,7 +5,7 @@
LIBRARY
EXPORTS
-;Version 1.2.44
+;Version 1.2.42
png_build_grayscale_palette @1
png_check_sig @2
png_chunk_error @3
diff --git a/gs/psi/msvc32.mak b/gs/psi/msvc32.mak
index cf3157df0..7c0ee9751 100644
--- a/gs/psi/msvc32.mak
+++ b/gs/psi/msvc32.mak
@@ -288,7 +288,6 @@ JPXSRCDIR=jasper
# See lcms.mak for more information
!ifndef LCMSSRCDIR
LCMSSRCDIR=lcms
-LCMSPLATFORM=win32
!endif
# Define the directory where the ijs source is stored,
diff --git a/language_switch/pspcl6_msvc.mak b/language_switch/pspcl6_msvc.mak
index d54f5c78d..245c1b0aa 100644
--- a/language_switch/pspcl6_msvc.mak
+++ b/language_switch/pspcl6_msvc.mak
@@ -48,13 +48,6 @@ PSLIBDIR=..\gs\lib
ICCSRCDIR=..\gs\icclib
!endif
-# Define the directory where the lcms source is stored.
-# See lcms.mak for more information
-!ifndef LCMSSRCDIR
-LCMSSRCDIR=..\gs\lcms
-LCMSPLATFORM=win32
-!endif
-
!ifndef FTSRCDIR
FTSRCDIR=..\gs\freetype
!endif
diff --git a/main/pcl6_gcc.mak b/main/pcl6_gcc.mak
index 025faf27b..29592cc72 100644
--- a/main/pcl6_gcc.mak
+++ b/main/pcl6_gcc.mak
@@ -48,7 +48,6 @@ LCMSSRCDIR?=../gs/lcms
SHARE_LCMS?=0
IMDISRCDIR?=../gs/imdi
-LCMSPLATFORM?=unix
# PCL_INCLUDED means pcl + pcl xl
PDL_INCLUDE_FLAGS?=-DPCL_INCLUDED
diff --git a/main/pcl6_msvc.mak b/main/pcl6_msvc.mak
index e72745c69..c7f04d8c2 100644
--- a/main/pcl6_msvc.mak
+++ b/main/pcl6_msvc.mak
@@ -64,7 +64,6 @@ IMDISRCDIR=..\gs\imdi
!ifndef LCMSSRCDIR
LCMSSRCDIR=..\gs\lcms
-LCMSPLATFORM=win32
!endif
!ifndef COMPILE_INITS
diff --git a/xps/xps_msvc.mak b/xps/xps_msvc.mak
index f886fcbd1..2692d3849 100644
--- a/xps/xps_msvc.mak
+++ b/xps/xps_msvc.mak
@@ -60,7 +60,6 @@ ICCSRCDIR=..\gs\icclib
# See lcms.mak for more information
!ifndef LCMSSRCDIR
LCMSSRCDIR=..\gs\lcms
-LCMSPLATFORM=win32
!endif
!ifndef PNGSRCDIR
diff --git a/xps/xpsglyphs.c b/xps/xpsglyphs.c
index f002abec2..9ca65a9e6 100644
--- a/xps/xpsglyphs.c
+++ b/xps/xpsglyphs.c
@@ -607,10 +607,7 @@ xps_parse_glyphs(xps_context_t *ctx,
code = xps_begin_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
if (code)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot create transparency group");
- }
/*
* If it's a solid color brush fill/stroke do a simple fill
@@ -636,11 +633,7 @@ xps_parse_glyphs(xps_context_t *ctx,
is_sideways, bidi_level,
indices_att, unicode_att, 0);
if (code)
- {
- xps_end_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot parse glyphs data");
- }
}
/*
@@ -654,19 +647,10 @@ xps_parse_glyphs(xps_context_t *ctx,
atof(origin_x_att), atof(origin_y_att),
is_sideways, bidi_level, indices_att, unicode_att, 1);
if (code)
- {
- xps_end_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot parse glyphs data");
- }
-
code = xps_parse_brush(ctx, fill_uri, dict, fill_tag);
if (code)
- {
- xps_end_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot parse fill brush");
- }
}
xps_end_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
diff --git a/xps/xpsgradient.c b/xps/xpsgradient.c
index d6f3b0d20..c00b48134 100644
--- a/xps/xpsgradient.c
+++ b/xps/xpsgradient.c
@@ -547,29 +547,17 @@ xps_draw_radial_gradient(xps_context_t *ctx, xps_item_t *root, int spread, gs_fu
reverse = xps_reverse_function(ctx, func, fary, vary);
if (!reverse)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(-1, "could not create the reversed function");
- }
-
code = xps_draw_one_radial_gradient(ctx, reverse, 1, x1, y1, r1, x0, y0, r0);
if (code < 0)
- {
- xps_free(ctx, reverse);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "could not draw radial gradient");
- }
-
xps_free(ctx, reverse);
}
else
{
code = xps_draw_one_radial_gradient(ctx, func, 1, x0, y0, r0, x1, y1, r1);
if (code < 0)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "could not draw radial gradient");
- }
}
}
else
@@ -586,10 +574,7 @@ xps_draw_radial_gradient(xps_context_t *ctx, xps_item_t *root, int spread, gs_fu
else
code = xps_draw_one_radial_gradient(ctx, func, 0, x0, y0, r0, x1, y1, r1);
if (code < 0)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "could not draw axial gradient");
- }
/* Check if circle encompassed the entire bounding box (break loop if we do) */
@@ -797,25 +782,20 @@ xps_parse_gradient_brush(xps_context_t *ctx, char *base_uri, xps_resource_t *dic
xps_clip(ctx, &saved_bounds);
gs_gsave(ctx->pgs);
+
gs_concat(ctx->pgs, &transform);
xps_bounds_in_user_space(ctx, &bbox);
code = xps_begin_opacity(ctx, base_uri, dict, opacity_att, NULL);
if (code)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot create transparency group");
- }
if (ctx->opacity_only)
{
code = draw(ctx, root, spread_method, opacity_func);
if (code)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot draw gradient opacity");
- }
}
else
{
@@ -828,32 +808,21 @@ xps_parse_gradient_brush(xps_context_t *ctx, char *base_uri, xps_resource_t *dic
gs_begin_transparency_mask(ctx->pgs, &params, &bbox, 0);
code = draw(ctx, root, spread_method, opacity_func);
if (code)
- {
- gs_end_transparency_mask(ctx->pgs, TRANSPARENCY_CHANNEL_Opacity);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot draw gradient opacity");
- }
gs_end_transparency_mask(ctx->pgs, TRANSPARENCY_CHANNEL_Opacity);
gs_trans_group_params_init(&tgp);
gs_begin_transparency_group(ctx->pgs, &tgp, &bbox);
code = draw(ctx, root, spread_method, color_func);
if (code)
- {
- gs_end_transparency_group(ctx->pgs);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot draw gradient color");
- }
gs_end_transparency_group(ctx->pgs);
}
else
{
code = draw(ctx, root, spread_method, color_func);
if (code)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot draw gradient color");
- }
}
}
diff --git a/xps/xpsimage.c b/xps/xpsimage.c
index 0e10720da..79231ae7a 100644
--- a/xps/xpsimage.c
+++ b/xps/xpsimage.c
@@ -300,11 +300,7 @@ xps_paint_image_brush(xps_context_t *ctx, char *base_uri, xps_resource_t *dict,
gs_begin_transparency_mask(ctx->pgs, &params, &bbox, 0);
code = xps_paint_image_brush_imp(ctx, image, 1);
if (code < 0)
- {
- gs_end_transparency_mask(ctx->pgs, TRANSPARENCY_CHANNEL_Opacity);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot draw alpha channel image");
- }
gs_end_transparency_mask(ctx->pgs, TRANSPARENCY_CHANNEL_Opacity);
gs_setcolorspace(ctx->pgs, image->colorspace);
@@ -312,11 +308,7 @@ xps_paint_image_brush(xps_context_t *ctx, char *base_uri, xps_resource_t *dict,
gs_begin_transparency_group(ctx->pgs, &tgp, &bbox);
code = xps_paint_image_brush_imp(ctx, image, 0);
if (code < 0)
- {
- gs_end_transparency_group(ctx->pgs);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot draw color channel image");
- }
gs_end_transparency_group(ctx->pgs);
code = gs_grestore(ctx->pgs);
diff --git a/xps/xpsopacity.c b/xps/xpsopacity.c
index 59407492c..5350a4ab9 100644
--- a/xps/xpsopacity.c
+++ b/xps/xpsopacity.c
@@ -56,19 +56,17 @@ xps_begin_opacity(xps_context_t *ctx, char *base_uri, xps_resource_t *dict,
code = xps_parse_brush(ctx, base_uri, dict, opacity_mask_tag);
if (code)
- {
- gs_grestore(ctx->pgs);
- gs_end_transparency_mask(ctx->pgs, TRANSPARENCY_CHANNEL_Opacity);
- ctx->opacity_only = save;
return gs_rethrow(code, "cannot parse opacity mask brush");
- }
gs_grestore(ctx->pgs);
- gs_end_transparency_mask(ctx->pgs, TRANSPARENCY_CHANNEL_Opacity);
+
ctx->opacity_only = save;
+
+ gs_end_transparency_mask(ctx->pgs, TRANSPARENCY_CHANNEL_Opacity);
}
gs_trans_group_params_init(&tgp);
+
gs_begin_transparency_group(ctx->pgs, &tgp, &bbox);
return 0;
diff --git a/xps/xpspage.c b/xps/xpspage.c
index 1d98e0d96..a0218cc00 100644
--- a/xps/xpspage.c
+++ b/xps/xpspage.c
@@ -85,20 +85,13 @@ xps_parse_canvas(xps_context_t *ctx, char *base_uri, xps_resource_t *dict, xps_i
code = xps_begin_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
if (code)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot create transparency group");
- }
for (node = xps_down(root); node; node = xps_next(node))
{
code = xps_parse_element(ctx, base_uri, dict, node);
if (code)
- {
- xps_end_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot parse child of Canvas");
- }
}
if (clip_att || clip_tag)
@@ -111,7 +104,9 @@ xps_parse_canvas(xps_context_t *ctx, char *base_uri, xps_resource_t *dict, xps_i
gs_grestore(ctx->pgs);
if (new_dict)
+ {
xps_free_resource_dictionary(ctx, new_dict);
+ }
return 0;
}
@@ -227,10 +222,7 @@ xps_parse_fixed_page(xps_context_t *ctx, xps_part_t *part)
{
code = gs_push_pdf14trans_device(ctx->pgs);
if (code < 0)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot install transparency device");
- }
}
/* Initialize the default profiles in the ctx to what is in the manager */
@@ -249,39 +241,25 @@ xps_parse_fixed_page(xps_context_t *ctx, xps_part_t *part)
{
dict = xps_parse_resource_dictionary(ctx, base_uri, xps_down(node));
if (!dict)
- {
- gs_pop_pdf14trans_device(ctx->pgs);
- gs_grestore(ctx->pgs);
return gs_rethrow(-1, "cannot load FixedPage.Resources");
- }
}
code = xps_parse_element(ctx, base_uri, dict, node);
if (code)
- {
- gs_pop_pdf14trans_device(ctx->pgs);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot parse child of FixedPage");
- }
}
if (ctx->use_transparency && has_transparency)
{
code = gs_pop_pdf14trans_device(ctx->pgs);
if (code < 0)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot uninstall transparency device");
- }
}
/* Flush page */
{
code = xps_show_page(ctx, 1, true); /* copies, flush */
if (code < 0)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot flush page");
- }
}
/* restore the original device, discarding the pdf14 compositor */
diff --git a/xps/xpspath.c b/xps/xpspath.c
index 3b93a0cf2..0b6518dbc 100644
--- a/xps/xpspath.c
+++ b/xps/xpspath.c
@@ -1101,10 +1101,7 @@ xps_parse_path(xps_context_t *ctx, char *base_uri, xps_resource_t *dict, xps_ite
code = xps_begin_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
if (code)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot create transparency group");
- }
}
if (fill_att)
@@ -1131,11 +1128,7 @@ xps_parse_path(xps_context_t *ctx, char *base_uri, xps_resource_t *dict, xps_ite
code = xps_parse_brush(ctx, fill_uri, dict, fill_tag);
if (code < 0)
- {
- xps_end_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot parse fill brush");
- }
}
if (stroke_att)
@@ -1165,17 +1158,15 @@ xps_parse_path(xps_context_t *ctx, char *base_uri, xps_resource_t *dict, xps_ite
code = xps_parse_brush(ctx, stroke_uri, dict, stroke_tag);
if (code < 0)
- {
- xps_end_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot parse stroke brush");
- }
}
if (opacity_att || opacity_mask_tag)
+ {
xps_restore_bounds(ctx, &saved_bounds_opacity);
- xps_end_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
+ xps_end_opacity(ctx, opacity_mask_uri, dict, opacity_att, opacity_mask_tag);
+ }
gs_grestore(ctx->pgs);
diff --git a/xps/xpstile.c b/xps/xpstile.c
index 866a56cc2..968d14314 100644
--- a/xps/xpstile.c
+++ b/xps/xpstile.c
@@ -82,7 +82,7 @@ xps_paint_tiling_brush(const gs_client_color *pcc, gs_state *pgs)
gs_gsave(ctx->pgs);
code = xps_paint_tiling_brush_clipped(c);
if (code)
- goto cleanup;
+ return gs_rethrow(code, "cannot draw tile");
gs_grestore(ctx->pgs);
if (c->tile_mode == TILE_FLIP_X || c->tile_mode == TILE_FLIP_X_Y)
@@ -92,7 +92,7 @@ xps_paint_tiling_brush(const gs_client_color *pcc, gs_state *pgs)
gs_scale(ctx->pgs, -1.0, 1.0);
xps_paint_tiling_brush_clipped(c);
if (code)
- goto cleanup;
+ return gs_rethrow(code, "cannot draw tile flipped x");
gs_grestore(ctx->pgs);
}
@@ -103,7 +103,7 @@ xps_paint_tiling_brush(const gs_client_color *pcc, gs_state *pgs)
gs_scale(ctx->pgs, 1.0, -1.0);
xps_paint_tiling_brush_clipped(c);
if (code)
- goto cleanup;
+ return gs_rethrow(code, "cannot draw tile flipped y");
gs_grestore(ctx->pgs);
}
@@ -114,18 +114,13 @@ xps_paint_tiling_brush(const gs_client_color *pcc, gs_state *pgs)
gs_scale(ctx->pgs, -1.0, -1.0);
xps_paint_tiling_brush_clipped(c);
if (code)
- goto cleanup;
+ return gs_rethrow(code, "cannot draw tile flipped x and y");
gs_grestore(ctx->pgs);
}
ctx->pgs = saved_pgs;
return 0;
-
-cleanup:
- gs_grestore(ctx->pgs);
- ctx->pgs = saved_pgs;
- return gs_rethrow(code, "cannot draw tile");
}
int
@@ -154,7 +149,7 @@ xps_high_level_pattern(xps_context_t *ctx)
code = gs_bbox_transform(&ppat->BBox, &ctm_only(ctx->pgs), &bbox);
if (code < 0) {
gs_grestore(ctx->pgs);
- return code;
+ return code;
}
clip_box.p.x = float2fixed(bbox.p.x);
clip_box.p.y = float2fixed(bbox.p.y);
@@ -304,10 +299,7 @@ xps_parse_tiling_brush(xps_context_t *ctx, char *base_uri, xps_resource_t *dict,
code = xps_begin_opacity(ctx, base_uri, dict, opacity_att, NULL);
if (code)
- {
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot create transparency group");
- }
/* TODO(tor): check viewport and tiling to see if we can set it to TILE_NONE */
@@ -398,11 +390,7 @@ xps_parse_tiling_brush(xps_context_t *ctx, char *base_uri, xps_resource_t *dict,
code = func(ctx, base_uri, dict, root, user);
if (code < 0)
- {
- xps_end_opacity(ctx, base_uri, dict, opacity_att, NULL);
- gs_grestore(ctx->pgs);
return gs_rethrow(code, "cannot draw tile");
- }
xps_restore_bounds(ctx, &saved_bounds);
}