summaryrefslogtreecommitdiff
path: root/Build/source/texk/ptexenc
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-13 15:54:41 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-04-13 15:54:41 +0000
commit40c685605fff5c81fdbc5f7107d6bb26837570bb (patch)
treee0936cf7bde8a121e3f44d9e719a0bda498ed1f2 /Build/source/texk/ptexenc
parentc690a1039d577adfbf4c82ed43bb1f37774829b2 (diff)
fix linux => mingw32 cross build
git-svn-id: svn://tug.org/texlive/trunk@17843 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/ptexenc')
-rw-r--r--Build/source/texk/ptexenc/ChangeLog.TL6
-rw-r--r--Build/source/texk/ptexenc/Makefile.am20
-rw-r--r--Build/source/texk/ptexenc/Makefile.in56
-rw-r--r--Build/source/texk/ptexenc/ptexenc.c11
4 files changed, 41 insertions, 52 deletions
diff --git a/Build/source/texk/ptexenc/ChangeLog.TL b/Build/source/texk/ptexenc/ChangeLog.TL
new file mode 100644
index 00000000000..a2796b0aaab
--- /dev/null
+++ b/Build/source/texk/ptexenc/ChangeLog.TL
@@ -0,0 +1,6 @@
+ChangeLog.TL: TeX Live (TL) changes for ptexenc
+===============================================
+
+2010-04-12 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * ptexenc.c (NOFILE) [MinGW32]: Always define it.
diff --git a/Build/source/texk/ptexenc/Makefile.am b/Build/source/texk/ptexenc/Makefile.am
index 75e136c1d16..fcc54254338 100644
--- a/Build/source/texk/ptexenc/Makefile.am
+++ b/Build/source/texk/ptexenc/Makefile.am
@@ -1,12 +1,10 @@
## Makefile.am for the TeX Live subdirectory texk/ptexenc/
##
-## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2010 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
ACLOCAL_AMFLAGS = -I ../../m4
-EXTRA_DIST = COPYRIGHT ChangeLog README
-
INCLUDES = -I$(top_builddir)/.. -I$(top_srcdir)/..
AM_CFLAGS = $(WARNING_CFLAGS)
@@ -16,21 +14,15 @@ libptexenc_la_CPPFLAGS = -DMAKE_KPSE_DLL
libptexenc_la_LDFLAGS = -version-number $(PTEXENC_LT_VERSNUM)
-libptexenc_la_LIBADD = $(LTLIBOBJS)
-
-## Put tex-file.c first, because it's what depends on the paths, and may
-## reduce frustration if the paths are wrong by doing it first.
-libptexenc_la_SOURCES = \
- ptexenc.c kanjicnv.c unicode.c unicode-jp.c
-
-$(libptexenc_la_OBJECTS): kanjicnv.h ptexenc.h unicode-jp.h unicode.h
+libptexenc_la_SOURCES = kanjicnv.c ptexenc.c unicode-jp.c unicode.c
ptexencincludedir = ${includedir}/ptexenc
-nodist_ptexencinclude_HEADERS = \
- c-auto.h
+nodist_ptexencinclude_HEADERS = c-auto.h
+
+ptexencinclude_HEADERS = kanjicnv.h ptexenc.h unicode-jp.h unicode.h
-ptexencinclude_HEADERS = kanjicnv.h ptexenc.h unicode-jp.h unicode.h
+EXTRA_DIST = COPYRIGHT ChangeLog.TL
## Eventually delete these files
##
diff --git a/Build/source/texk/ptexenc/Makefile.in b/Build/source/texk/ptexenc/Makefile.in
index c71dedd84c3..b118ce5340a 100644
--- a/Build/source/texk/ptexenc/Makefile.in
+++ b/Build/source/texk/ptexenc/Makefile.in
@@ -92,10 +92,10 @@ am__installdirs = "$(DESTDIR)$(libdir)" \
"$(DESTDIR)$(ptexencincludedir)" \
"$(DESTDIR)$(ptexencincludedir)"
LTLIBRARIES = $(lib_LTLIBRARIES)
-libptexenc_la_DEPENDENCIES = $(LTLIBOBJS)
-am_libptexenc_la_OBJECTS = libptexenc_la-ptexenc.lo \
- libptexenc_la-kanjicnv.lo libptexenc_la-unicode.lo \
- libptexenc_la-unicode-jp.lo
+libptexenc_la_LIBADD =
+am_libptexenc_la_OBJECTS = libptexenc_la-kanjicnv.lo \
+ libptexenc_la-ptexenc.lo libptexenc_la-unicode-jp.lo \
+ libptexenc_la-unicode.lo
libptexenc_la_OBJECTS = $(am_libptexenc_la_OBJECTS)
libptexenc_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
@@ -250,26 +250,20 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I ../../m4
-EXTRA_DIST = COPYRIGHT ChangeLog README \
- patches/jmpost-0.04b-ptexenc.patch \
- patches/makejvf-1.1a-ptexenc.patch \
- patches/mendexk2.6f-ptexenc.patch \
- patches/ptex-src-3.1.11-ptexenc.patch \
- patches/texlive2009-ptexenc.patch patches/texlive2009.sh
INCLUDES = -I$(top_builddir)/.. -I$(top_srcdir)/..
AM_CFLAGS = $(WARNING_CFLAGS)
lib_LTLIBRARIES = libptexenc.la
libptexenc_la_CPPFLAGS = -DMAKE_KPSE_DLL
libptexenc_la_LDFLAGS = -version-number $(PTEXENC_LT_VERSNUM)
-libptexenc_la_LIBADD = $(LTLIBOBJS)
-libptexenc_la_SOURCES = \
- ptexenc.c kanjicnv.c unicode.c unicode-jp.c
-
+libptexenc_la_SOURCES = kanjicnv.c ptexenc.c unicode-jp.c unicode.c
ptexencincludedir = ${includedir}/ptexenc
-nodist_ptexencinclude_HEADERS = \
- c-auto.h
-
-ptexencinclude_HEADERS = kanjicnv.h ptexenc.h unicode-jp.h unicode.h
+nodist_ptexencinclude_HEADERS = c-auto.h
+ptexencinclude_HEADERS = kanjicnv.h ptexenc.h unicode-jp.h unicode.h
+EXTRA_DIST = COPYRIGHT ChangeLog.TL patches/jmpost-0.04b-ptexenc.patch \
+ patches/makejvf-1.1a-ptexenc.patch \
+ patches/mendexk2.6f-ptexenc.patch \
+ patches/ptex-src-3.1.11-ptexenc.patch \
+ patches/texlive2009-ptexenc.patch patches/texlive2009.sh
all: c-auto.h
$(MAKE) $(AM_MAKEFLAGS) all-am
@@ -392,13 +386,6 @@ distclean-compile:
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-libptexenc_la-ptexenc.lo: ptexenc.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libptexenc_la-ptexenc.lo -MD -MP -MF $(DEPDIR)/libptexenc_la-ptexenc.Tpo -c -o libptexenc_la-ptexenc.lo `test -f 'ptexenc.c' || echo '$(srcdir)/'`ptexenc.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libptexenc_la-ptexenc.Tpo $(DEPDIR)/libptexenc_la-ptexenc.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ptexenc.c' object='libptexenc_la-ptexenc.lo' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libptexenc_la-ptexenc.lo `test -f 'ptexenc.c' || echo '$(srcdir)/'`ptexenc.c
-
libptexenc_la-kanjicnv.lo: kanjicnv.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libptexenc_la-kanjicnv.lo -MD -MP -MF $(DEPDIR)/libptexenc_la-kanjicnv.Tpo -c -o libptexenc_la-kanjicnv.lo `test -f 'kanjicnv.c' || echo '$(srcdir)/'`kanjicnv.c
@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libptexenc_la-kanjicnv.Tpo $(DEPDIR)/libptexenc_la-kanjicnv.Plo
@@ -406,12 +393,12 @@ libptexenc_la-kanjicnv.lo: kanjicnv.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libptexenc_la-kanjicnv.lo `test -f 'kanjicnv.c' || echo '$(srcdir)/'`kanjicnv.c
-libptexenc_la-unicode.lo: unicode.c
-@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libptexenc_la-unicode.lo -MD -MP -MF $(DEPDIR)/libptexenc_la-unicode.Tpo -c -o libptexenc_la-unicode.lo `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c
-@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libptexenc_la-unicode.Tpo $(DEPDIR)/libptexenc_la-unicode.Plo
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unicode.c' object='libptexenc_la-unicode.lo' libtool=yes @AMDEPBACKSLASH@
+libptexenc_la-ptexenc.lo: ptexenc.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libptexenc_la-ptexenc.lo -MD -MP -MF $(DEPDIR)/libptexenc_la-ptexenc.Tpo -c -o libptexenc_la-ptexenc.lo `test -f 'ptexenc.c' || echo '$(srcdir)/'`ptexenc.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libptexenc_la-ptexenc.Tpo $(DEPDIR)/libptexenc_la-ptexenc.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ptexenc.c' object='libptexenc_la-ptexenc.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libptexenc_la-unicode.lo `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libptexenc_la-ptexenc.lo `test -f 'ptexenc.c' || echo '$(srcdir)/'`ptexenc.c
libptexenc_la-unicode-jp.lo: unicode-jp.c
@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libptexenc_la-unicode-jp.lo -MD -MP -MF $(DEPDIR)/libptexenc_la-unicode-jp.Tpo -c -o libptexenc_la-unicode-jp.lo `test -f 'unicode-jp.c' || echo '$(srcdir)/'`unicode-jp.c
@@ -420,6 +407,13 @@ libptexenc_la-unicode-jp.lo: unicode-jp.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libptexenc_la-unicode-jp.lo `test -f 'unicode-jp.c' || echo '$(srcdir)/'`unicode-jp.c
+libptexenc_la-unicode.lo: unicode.c
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libptexenc_la-unicode.lo -MD -MP -MF $(DEPDIR)/libptexenc_la-unicode.Tpo -c -o libptexenc_la-unicode.lo `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libptexenc_la-unicode.Tpo $(DEPDIR)/libptexenc_la-unicode.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='unicode.c' object='libptexenc_la-unicode.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libptexenc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libptexenc_la-unicode.lo `test -f 'unicode.c' || echo '$(srcdir)/'`unicode.c
+
mostlyclean-libtool:
-rm -f *.lo
@@ -800,8 +794,6 @@ uninstall-am: uninstall-libLTLIBRARIES \
uninstall-ptexencincludeHEADERS
-$(libptexenc_la_OBJECTS): kanjicnv.h ptexenc.h unicode-jp.h unicode.h
-
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/Build/source/texk/ptexenc/ptexenc.c b/Build/source/texk/ptexenc/ptexenc.c
index f9e8f165527..613044341fd 100644
--- a/Build/source/texk/ptexenc/ptexenc.c
+++ b/Build/source/texk/ptexenc/ptexenc.c
@@ -6,6 +6,7 @@
#include <kpathsea/c-memstr.h>
#include <kpathsea/variable.h>
#include <kpathsea/readable.h>
+#include <kpathsea/c-limits.h>
#include <ptexenc/c-auto.h>
#include <ptexenc/ptexenc.h>
@@ -23,13 +24,11 @@
#define ESC '\033'
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#else
-#include <limits.h>
-#endif /* HAVE_SYS_PARAM_H */
#ifndef NOFILE
-#define NOFILE OPEN_MAX
+# ifndef OPEN_MAX
+# define OPEN_MAX 24 /* The POSIX minimum. */
+# endif
+# define NOFILE OPEN_MAX
#endif
char *ptexenc_version_string = "ptetex " PTEXENC_VERSION;