diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-04-01 13:16:51 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-04-01 13:16:51 +0000 |
commit | 1fedf7730131627fc42776988e6bf0b316d5910e (patch) | |
tree | 1031faf52fe1b94dd13467dcc5d331dcf3abf09b | |
parent | fe9173c8e4478f11c5474ec6e67ab3eaec2567ad (diff) |
pmx: More WIN32 fixes from Akira
git-svn-id: svn://tug.org/texlive/trunk@25818 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/dvipsk/ChangeLog | 2 | ||||
-rw-r--r-- | Build/source/utils/pmx/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/utils/pmx/Makefile.am | 5 | ||||
-rw-r--r-- | Build/source/utils/pmx/Makefile.in | 95 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.17-PATCHES/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-01-binary | 2 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-03-DOS-line-endings | 18 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-04-MSVC-complex | 18 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.17/libf2c/f2c.h | 3 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.17/libf2c/fio.h | 4 | ||||
-rw-r--r-- | Build/source/utils/pmx/w32getc.c | 14 |
11 files changed, 167 insertions, 6 deletions
diff --git a/Build/source/texk/dvipsk/ChangeLog b/Build/source/texk/dvipsk/ChangeLog index 4b27b615311..509214002ae 100644 --- a/Build/source/texk/dvipsk/ChangeLog +++ b/Build/source/texk/dvipsk/ChangeLog @@ -6,7 +6,7 @@ * resident.c: add new directive "c<filename> to config files, allowing to include other config files. - * dvips.texi: document t. + * dvips.texi: document it. * contrib/config.proto: add example. 2012-03-15 Peter Breitenlohner <peb@mppmu.mpg.de> diff --git a/Build/source/utils/pmx/ChangeLog b/Build/source/utils/pmx/ChangeLog index b01a3d422f8..9d507b1f556 100644 --- a/Build/source/utils/pmx/ChangeLog +++ b/Build/source/utils/pmx/ChangeLog @@ -1,3 +1,9 @@ +2012-04-01 Peter Breitenlohner <peb@mppmu.mpg.de> + + * w32getc.c (new): Handle DOS line endings (on Windows). + Mail from Akira, 31 Mar 2012 21:36:26. + * Makefile.am [WIN32]: Add the new file. + 2012-03-28 Peter Breitenlohner <peb@mppmu.mpg.de> * arith.h (new): Dummy header to avoid the need to run arithchk. diff --git a/Build/source/utils/pmx/Makefile.am b/Build/source/utils/pmx/Makefile.am index 03e21695697..84e655c85f0 100644 --- a/Build/source/utils/pmx/Makefile.am +++ b/Build/source/utils/pmx/Makefile.am @@ -220,6 +220,11 @@ libf2c_a_SOURCES += \ $(PMX_TREE)/libf2c/dtime_.c \ $(PMX_TREE)/libf2c/etime_.c +## Handle DOS line endings +if WIN32 +libf2c_a_SOURCES += w32getc.c +endif WIN32 + ## QINT (unused) EXTRA_libf2c_a_SOURCES += \ $(PMX_TREE)/libf2c/ftell64_.c \ diff --git a/Build/source/utils/pmx/Makefile.in b/Build/source/utils/pmx/Makefile.in index 9b4977917a5..bf7775117b0 100644 --- a/Build/source/utils/pmx/Makefile.in +++ b/Build/source/utils/pmx/Makefile.in @@ -35,6 +35,7 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = pmxab$(EXEEXT) scor2prt$(EXEEXT) +@WIN32_TRUE@am__append_1 = w32getc.c DIST_COMMON = README $(am__configure_deps) $(dist_man1_MANS) \ $(dist_texmf_SCRIPTS) $(srcdir)/../../build-aux/depcomp \ $(srcdir)/../../build-aux/install-sh \ @@ -45,7 +46,7 @@ DIST_COMMON = README $(am__configure_deps) $(dist_man1_MANS) \ ../../build-aux/depcomp ../../build-aux/install-sh \ ../../build-aux/ltmain.sh ../../build-aux/missing \ ../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog -@WIN32_TRUE@@WIN32_WRAP_TRUE@am__append_1 = $(wrappers) +@WIN32_TRUE@@WIN32_WRAP_TRUE@am__append_2 = $(wrappers) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \ @@ -63,6 +64,88 @@ AR = ar ARFLAGS = cru libf2c_a_AR = $(AR) $(ARFLAGS) libf2c_a_LIBADD = +am__libf2c_a_SOURCES_DIST = arith.h $(PMX_TREE)/libf2c/f2c.h \ + $(PMX_TREE)/libf2c/fio.h $(PMX_TREE)/libf2c/fmt.h \ + $(PMX_TREE)/libf2c/fp.h $(PMX_TREE)/libf2c/lio.h \ + $(PMX_TREE)/libf2c/rawio.h $(PMX_TREE)/libf2c/signal1.h \ + $(PMX_TREE)/libf2c/sysdep1.h $(PMX_TREE)/libf2c/abort_.c \ + $(PMX_TREE)/libf2c/cabs.c $(PMX_TREE)/libf2c/derf_.c \ + $(PMX_TREE)/libf2c/derfc_.c $(PMX_TREE)/libf2c/erf_.c \ + $(PMX_TREE)/libf2c/erfc_.c $(PMX_TREE)/libf2c/exit_.c \ + $(PMX_TREE)/libf2c/f77vers.c $(PMX_TREE)/libf2c/getarg_.c \ + $(PMX_TREE)/libf2c/getenv_.c $(PMX_TREE)/libf2c/i77vers.c \ + $(PMX_TREE)/libf2c/iargc_.c $(PMX_TREE)/libf2c/main.c \ + $(PMX_TREE)/libf2c/s_paus.c $(PMX_TREE)/libf2c/s_rnge.c \ + $(PMX_TREE)/libf2c/s_stop.c $(PMX_TREE)/libf2c/sig_die.c \ + $(PMX_TREE)/libf2c/signal_.c $(PMX_TREE)/libf2c/system_.c \ + $(PMX_TREE)/libf2c/pow_ci.c $(PMX_TREE)/libf2c/pow_dd.c \ + $(PMX_TREE)/libf2c/pow_di.c $(PMX_TREE)/libf2c/pow_hh.c \ + $(PMX_TREE)/libf2c/pow_ii.c $(PMX_TREE)/libf2c/pow_ri.c \ + $(PMX_TREE)/libf2c/pow_zi.c $(PMX_TREE)/libf2c/pow_zz.c \ + $(PMX_TREE)/libf2c/c_abs.c $(PMX_TREE)/libf2c/c_cos.c \ + $(PMX_TREE)/libf2c/c_div.c $(PMX_TREE)/libf2c/c_exp.c \ + $(PMX_TREE)/libf2c/c_log.c $(PMX_TREE)/libf2c/c_sin.c \ + $(PMX_TREE)/libf2c/c_sqrt.c $(PMX_TREE)/libf2c/z_abs.c \ + $(PMX_TREE)/libf2c/z_cos.c $(PMX_TREE)/libf2c/z_div.c \ + $(PMX_TREE)/libf2c/z_exp.c $(PMX_TREE)/libf2c/z_log.c \ + $(PMX_TREE)/libf2c/z_sin.c $(PMX_TREE)/libf2c/z_sqrt.c \ + $(PMX_TREE)/libf2c/r_abs.c $(PMX_TREE)/libf2c/r_acos.c \ + $(PMX_TREE)/libf2c/r_asin.c $(PMX_TREE)/libf2c/r_atan.c \ + $(PMX_TREE)/libf2c/r_atn2.c $(PMX_TREE)/libf2c/r_cnjg.c \ + $(PMX_TREE)/libf2c/r_cos.c $(PMX_TREE)/libf2c/r_cosh.c \ + $(PMX_TREE)/libf2c/r_dim.c $(PMX_TREE)/libf2c/r_exp.c \ + $(PMX_TREE)/libf2c/r_imag.c $(PMX_TREE)/libf2c/r_int.c \ + $(PMX_TREE)/libf2c/r_lg10.c $(PMX_TREE)/libf2c/r_log.c \ + $(PMX_TREE)/libf2c/r_mod.c $(PMX_TREE)/libf2c/r_nint.c \ + $(PMX_TREE)/libf2c/r_sign.c $(PMX_TREE)/libf2c/r_sin.c \ + $(PMX_TREE)/libf2c/r_sinh.c $(PMX_TREE)/libf2c/r_sqrt.c \ + $(PMX_TREE)/libf2c/r_tan.c $(PMX_TREE)/libf2c/r_tanh.c \ + $(PMX_TREE)/libf2c/d_abs.c $(PMX_TREE)/libf2c/d_acos.c \ + $(PMX_TREE)/libf2c/d_asin.c $(PMX_TREE)/libf2c/d_atan.c \ + $(PMX_TREE)/libf2c/d_atn2.c $(PMX_TREE)/libf2c/d_cnjg.c \ + $(PMX_TREE)/libf2c/d_cos.c $(PMX_TREE)/libf2c/d_cosh.c \ + $(PMX_TREE)/libf2c/d_dim.c $(PMX_TREE)/libf2c/d_exp.c \ + $(PMX_TREE)/libf2c/d_imag.c $(PMX_TREE)/libf2c/d_int.c \ + $(PMX_TREE)/libf2c/d_lg10.c $(PMX_TREE)/libf2c/d_log.c \ + $(PMX_TREE)/libf2c/d_mod.c $(PMX_TREE)/libf2c/d_nint.c \ + $(PMX_TREE)/libf2c/d_prod.c $(PMX_TREE)/libf2c/d_sign.c \ + $(PMX_TREE)/libf2c/d_sin.c $(PMX_TREE)/libf2c/d_sinh.c \ + $(PMX_TREE)/libf2c/d_sqrt.c $(PMX_TREE)/libf2c/d_tan.c \ + $(PMX_TREE)/libf2c/d_tanh.c $(PMX_TREE)/libf2c/i_abs.c \ + $(PMX_TREE)/libf2c/i_dim.c $(PMX_TREE)/libf2c/i_dnnt.c \ + $(PMX_TREE)/libf2c/i_indx.c $(PMX_TREE)/libf2c/i_len.c \ + $(PMX_TREE)/libf2c/i_mod.c $(PMX_TREE)/libf2c/i_nint.c \ + $(PMX_TREE)/libf2c/i_sign.c $(PMX_TREE)/libf2c/lbitbits.c \ + $(PMX_TREE)/libf2c/lbitshft.c $(PMX_TREE)/libf2c/h_abs.c \ + $(PMX_TREE)/libf2c/h_dim.c $(PMX_TREE)/libf2c/h_dnnt.c \ + $(PMX_TREE)/libf2c/h_indx.c $(PMX_TREE)/libf2c/h_len.c \ + $(PMX_TREE)/libf2c/h_mod.c $(PMX_TREE)/libf2c/h_nint.c \ + $(PMX_TREE)/libf2c/h_sign.c $(PMX_TREE)/libf2c/hl_ge.c \ + $(PMX_TREE)/libf2c/hl_gt.c $(PMX_TREE)/libf2c/hl_le.c \ + $(PMX_TREE)/libf2c/hl_lt.c $(PMX_TREE)/libf2c/l_ge.c \ + $(PMX_TREE)/libf2c/l_gt.c $(PMX_TREE)/libf2c/l_le.c \ + $(PMX_TREE)/libf2c/l_lt.c $(PMX_TREE)/libf2c/ef1asc_.c \ + $(PMX_TREE)/libf2c/ef1cmc_.c $(PMX_TREE)/libf2c/f77_aloc.c \ + $(PMX_TREE)/libf2c/s_cat.c $(PMX_TREE)/libf2c/s_cmp.c \ + $(PMX_TREE)/libf2c/s_copy.c $(PMX_TREE)/libf2c/backspac.c \ + $(PMX_TREE)/libf2c/close.c $(PMX_TREE)/libf2c/dfe.c \ + $(PMX_TREE)/libf2c/dolio.c $(PMX_TREE)/libf2c/due.c \ + $(PMX_TREE)/libf2c/endfile.c $(PMX_TREE)/libf2c/err.c \ + $(PMX_TREE)/libf2c/fmt.c $(PMX_TREE)/libf2c/fmtlib.c \ + $(PMX_TREE)/libf2c/ftell_.c $(PMX_TREE)/libf2c/iio.c \ + $(PMX_TREE)/libf2c/ilnw.c $(PMX_TREE)/libf2c/inquire.c \ + $(PMX_TREE)/libf2c/lread.c $(PMX_TREE)/libf2c/lwrite.c \ + $(PMX_TREE)/libf2c/open.c $(PMX_TREE)/libf2c/rdfmt.c \ + $(PMX_TREE)/libf2c/rewind.c $(PMX_TREE)/libf2c/rsfe.c \ + $(PMX_TREE)/libf2c/rsli.c $(PMX_TREE)/libf2c/rsne.c \ + $(PMX_TREE)/libf2c/sfe.c $(PMX_TREE)/libf2c/sue.c \ + $(PMX_TREE)/libf2c/typesize.c $(PMX_TREE)/libf2c/uio.c \ + $(PMX_TREE)/libf2c/util.c $(PMX_TREE)/libf2c/wref.c \ + $(PMX_TREE)/libf2c/wrtfmt.c $(PMX_TREE)/libf2c/wsfe.c \ + $(PMX_TREE)/libf2c/wsle.c $(PMX_TREE)/libf2c/wsne.c \ + $(PMX_TREE)/libf2c/xwsne.c $(PMX_TREE)/libf2c/dtime_.c \ + $(PMX_TREE)/libf2c/etime_.c w32getc.c +@WIN32_TRUE@am__objects_1 = w32getc.$(OBJEXT) am_libf2c_a_OBJECTS = abort_.$(OBJEXT) cabs.$(OBJEXT) derf_.$(OBJEXT) \ derfc_.$(OBJEXT) erf_.$(OBJEXT) erfc_.$(OBJEXT) \ exit_.$(OBJEXT) f77vers.$(OBJEXT) getarg_.$(OBJEXT) \ @@ -110,7 +193,8 @@ am_libf2c_a_OBJECTS = abort_.$(OBJEXT) cabs.$(OBJEXT) derf_.$(OBJEXT) \ rsli.$(OBJEXT) rsne.$(OBJEXT) sfe.$(OBJEXT) sue.$(OBJEXT) \ typesize.$(OBJEXT) uio.$(OBJEXT) util.$(OBJEXT) wref.$(OBJEXT) \ wrtfmt.$(OBJEXT) wsfe.$(OBJEXT) wsle.$(OBJEXT) wsne.$(OBJEXT) \ - xwsne.$(OBJEXT) dtime_.$(OBJEXT) etime_.$(OBJEXT) + xwsne.$(OBJEXT) dtime_.$(OBJEXT) etime_.$(OBJEXT) \ + $(am__objects_1) libf2c_a_OBJECTS = $(am_libf2c_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(texmfdir)" \ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" @@ -161,7 +245,7 @@ CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libf2c_a_SOURCES) $(EXTRA_libf2c_a_SOURCES) \ $(pmxab_SOURCES) $(scor2prt_SOURCES) -DIST_SOURCES = $(libf2c_a_SOURCES) $(EXTRA_libf2c_a_SOURCES) \ +DIST_SOURCES = $(am__libf2c_a_SOURCES_DIST) $(EXTRA_libf2c_a_SOURCES) \ $(pmxab_SOURCES) $(scor2prt_SOURCES) man1dir = $(mandir)/man1 NROFF = nroff @@ -367,14 +451,14 @@ libf2c_a_SOURCES = arith.h $(PMX_TREE)/libf2c/f2c.h \ $(PMX_TREE)/libf2c/wrtfmt.c $(PMX_TREE)/libf2c/wsfe.c \ $(PMX_TREE)/libf2c/wsle.c $(PMX_TREE)/libf2c/wsne.c \ $(PMX_TREE)/libf2c/xwsne.c $(PMX_TREE)/libf2c/dtime_.c \ - $(PMX_TREE)/libf2c/etime_.c + $(PMX_TREE)/libf2c/etime_.c $(am__append_1) EXTRA_libf2c_a_SOURCES = $(PMX_TREE)/libf2c/uninit.c \ $(PMX_TREE)/libf2c/ftell64_.c $(PMX_TREE)/libf2c/pow_qq.c \ $(PMX_TREE)/libf2c/qbitbits.c $(PMX_TREE)/libf2c/qbitshft.c \ $(PMX_TREE)/libf2c/signbit.c lua_scripts = pmx scriptsdir = texmf/scripts/pmx -nodist_bin_SCRIPTS = $(am__append_1) +nodist_bin_SCRIPTS = $(am__append_2) all_scripts = $(lua_scripts) $(perl_scripts) $(shell_scripts) @WIN32_TRUE@@WIN32_WRAP_TRUE@wrappers = $(all_scripts:=.exe) @WIN32_TRUE@@WIN32_WRAP_TRUE@runscript = $(top_srcdir)/../../texk/texlive/w32_wrapper/runscript.exe @@ -690,6 +774,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uninit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/w32getc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wref.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wrtfmt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wsfe.Po@am__quote@ diff --git a/Build/source/utils/pmx/pmx-2.6.17-PATCHES/ChangeLog b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/ChangeLog index fa7db92481b..62e565f55bd 100644 --- a/Build/source/utils/pmx/pmx-2.6.17-PATCHES/ChangeLog +++ b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/ChangeLog @@ -1,6 +1,12 @@ +2012-04-01 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-03-DOS-line-endings, patch-04-MSVC-complex (new): WIN32. + Mail from Akira, 31 Mar 2012 21:36:26. + 2012-03-28 Peter Breitenlohner <peb@mppmu.mpg.de> * patch-01-binary (new): Always use binary mode for WIN32. + Mail from Akira, 29 Mar 2012 23:50:53. * patch-02-bugfix (new): Bug fix, should be fixed in Fortran. diff --git a/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-01-binary b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-01-binary index 01947611c19..16819f76212 100644 --- a/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-01-binary +++ b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-01-binary @@ -1,5 +1,7 @@ On Windows fseek() etc. are meaningful only for binary access. + Mail from Akira, 29 Mar 2012 23:50:53. + diff -ur pmx-2.6.17.orig/libf2c/open.c pmx-2.6.17/libf2c/open.c --- pmx-2.6.17.orig/libf2c/open.c 2012-03-26 12:09:53.000000000 +0200 +++ pmx-2.6.17/libf2c/open.c 2012-03-29 17:12:53.000000000 +0200 diff --git a/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-03-DOS-line-endings b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-03-DOS-line-endings new file mode 100644 index 00000000000..5e36c101b5a --- /dev/null +++ b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-03-DOS-line-endings @@ -0,0 +1,18 @@ + Handle DOS line endings (using additional file ../w32getc.c). + + Mail from Akira, 31 Mar 2012 21:36:26. + +diff -ur pmx-2.6.17.orig/libf2c/fio.h pmx-2.6.17/libf2c/fio.h +--- pmx-2.6.17.orig/libf2c/fio.h 2012-03-26 12:09:53.000000000 +0200 ++++ pmx-2.6.17/libf2c/fio.h 2012-04-01 14:49:20.000000000 +0200 +@@ -2,6 +2,10 @@ + #include "sysdep1.h" + #endif + #include "stdio.h" ++#ifdef WIN32 ++extern int w32getc(FILE *f); ++#define getc w32getc ++#endif + #include "errno.h" + #ifndef NULL + /* ANSI C */ diff --git a/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-04-MSVC-complex b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-04-MSVC-complex new file mode 100644 index 00000000000..4017e79ac99 --- /dev/null +++ b/Build/source/utils/pmx/pmx-2.6.17-PATCHES/patch-04-MSVC-complex @@ -0,0 +1,18 @@ + _COMPLEX_DEFINED should be defined for MSVC, otherwise + complex is redefined inconsistently in <math.h>. + + Mail from Akira, 31 Mar 2012 21:36:26. + +diff -ur pmx-2.6.17.orig/libf2c/f2c.h pmx-2.6.17/libf2c/f2c.h +--- pmx-2.6.17.orig/libf2c/f2c.h 2012-03-26 12:09:53.000000000 +0200 ++++ pmx-2.6.17/libf2c/f2c.h 2012-04-01 14:50:19.000000000 +0200 +@@ -13,6 +13,9 @@ + typedef short int shortint; + typedef float real; + typedef double doublereal; ++#ifdef WIN32 ++#define _COMPLEX_DEFINED 1 ++#endif + typedef struct { real r, i; } complex; + typedef struct { doublereal r, i; } doublecomplex; + typedef long int logical; diff --git a/Build/source/utils/pmx/pmx-2.6.17/libf2c/f2c.h b/Build/source/utils/pmx/pmx-2.6.17/libf2c/f2c.h index b94ee7c8e12..a91de9bf804 100644 --- a/Build/source/utils/pmx/pmx-2.6.17/libf2c/f2c.h +++ b/Build/source/utils/pmx/pmx-2.6.17/libf2c/f2c.h @@ -13,6 +13,9 @@ typedef char *address; typedef short int shortint; typedef float real; typedef double doublereal; +#ifdef WIN32 +#define _COMPLEX_DEFINED 1 +#endif typedef struct { real r, i; } complex; typedef struct { doublereal r, i; } doublecomplex; typedef long int logical; diff --git a/Build/source/utils/pmx/pmx-2.6.17/libf2c/fio.h b/Build/source/utils/pmx/pmx-2.6.17/libf2c/fio.h index 3d168bfcd1a..1538d295411 100644 --- a/Build/source/utils/pmx/pmx-2.6.17/libf2c/fio.h +++ b/Build/source/utils/pmx/pmx-2.6.17/libf2c/fio.h @@ -2,6 +2,10 @@ #include "sysdep1.h" #endif #include "stdio.h" +#ifdef WIN32 +extern int w32getc(FILE *f); +#define getc w32getc +#endif #include "errno.h" #ifndef NULL /* ANSI C */ diff --git a/Build/source/utils/pmx/w32getc.c b/Build/source/utils/pmx/w32getc.c new file mode 100644 index 00000000000..e9147407298 --- /dev/null +++ b/Build/source/utils/pmx/w32getc.c @@ -0,0 +1,14 @@ +#include <stdio.h> +int w32getc(FILE *f) +{ + int c; + c = getc(f); + if(c=='\r') { + c = getc(f); + if(c!='\n') { + ungetc(c,f); + c='\r'; + } + } + return c; +} |