diff options
-rwxr-xr-x | Build/source/utils/pmx/configure | 11 | ||||
-rw-r--r-- | Build/source/utils/pmx/configure.ac | 8 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.18-PATCHES/ChangeLog | 6 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.18-PATCHES/patch-06-WIN32 | 70 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.18/libf2c/f2c.h | 7 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.18/libf2c/fio.h | 4 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.18/libf2c/lread.c | 2 | ||||
-rw-r--r-- | Build/source/utils/pmx/pmx-2.6.18/libf2c/rsne.c | 1 |
8 files changed, 98 insertions, 11 deletions
diff --git a/Build/source/utils/pmx/configure b/Build/source/utils/pmx/configure index 4ebb43932ca..448f5c7c10d 100755 --- a/Build/source/utils/pmx/configure +++ b/Build/source/utils/pmx/configure @@ -3893,9 +3893,14 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_win32" >&5 $as_echo "$kpse_cv_have_win32" >&6; } -if test "x$kpse_cv_have_win32" != xno; then - AM_CPPFLAGS="$AM_CPPPFLAGS -DUSE_CLOCK" -fi +case $kpse_cv_have_win32 in #( + native) : + AM_CPPFLAGS="$AM_CPPPFLAGS -DMSDOS" ;; #( + mingw32) : + AM_CPPFLAGS="$AM_CPPPFLAGS -DUSE_CLOCK" ;; #( + *) : + ;; +esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 diff --git a/Build/source/utils/pmx/configure.ac b/Build/source/utils/pmx/configure.ac index d0c9afb24f8..cc355615553 100644 --- a/Build/source/utils/pmx/configure.ac +++ b/Build/source/utils/pmx/configure.ac @@ -29,11 +29,11 @@ AM_CONDITIONAL([WIN32_WRAP], dnl initial value for AM_CPPFLAGS AC_SUBST([AM_CPPFLAGS], ['-DNON_UNIX_STDIO']) -dnl WIN32 has no <sys/times.h> +dnl WIN32 has no <sys/times.h>, native WIN32 is as MSDOS KPSE_CHECK_WIN32 -if test "x$kpse_cv_have_win32" != xno; then - AM_CPPFLAGS="$AM_CPPPFLAGS -DUSE_CLOCK" -fi +AS_CASE([$kpse_cv_have_win32], + [native], [AM_CPPFLAGS="$AM_CPPPFLAGS -DMSDOS"], + [mingw32], [AM_CPPFLAGS="$AM_CPPPFLAGS -DUSE_CLOCK"]) dnl Checks for programs. AC_PROG_INSTALL diff --git a/Build/source/utils/pmx/pmx-2.6.18-PATCHES/ChangeLog b/Build/source/utils/pmx/pmx-2.6.18-PATCHES/ChangeLog index bc303f33655..085196947ec 100644 --- a/Build/source/utils/pmx/pmx-2.6.18-PATCHES/ChangeLog +++ b/Build/source/utils/pmx/pmx-2.6.18-PATCHES/ChangeLog @@ -1,3 +1,9 @@ +2012-07-11 Peter Breitenlohner <peb@mppmu.mpg.de> + + * patch-06-WIN32 (new): Build fix for MSVC (from W32TeX). + Avoid the problematic prototype for isatty(). + We pass -DMSDOS to MSVC or -DUSE_CLOCK to the MinGW compiler. + 2012-05-19 Peter Breitenlohner <peb@mppmu.mpg.de> Imported pmx-2.6.18 source tree from: diff --git a/Build/source/utils/pmx/pmx-2.6.18-PATCHES/patch-06-WIN32 b/Build/source/utils/pmx/pmx-2.6.18-PATCHES/patch-06-WIN32 new file mode 100644 index 00000000000..c969f3aaaf7 --- /dev/null +++ b/Build/source/utils/pmx/pmx-2.6.18-PATCHES/patch-06-WIN32 @@ -0,0 +1,70 @@ +diff -ur pmx-2.6.18.orig/libf2c/f2c.h pmx-2.6.18/libf2c/f2c.h +--- pmx-2.6.18.orig/libf2c/f2c.h 2012-05-19 18:49:12.000000000 +0200 ++++ pmx-2.6.18/libf2c/f2c.h 2012-07-11 17:17:59.000000000 +0200 +@@ -23,8 +23,13 @@ + typedef char logical1; + typedef char integer1; + #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */ ++#if defined(WIN32) && !defined(__MINGW32__) ++typedef __int64 longint; /* system-dependent */ ++typedef unsigned __int64 ulongint; /* system-dependent */ ++#else + typedef long long longint; /* system-dependent */ + typedef unsigned long long ulongint; /* system-dependent */ ++#endif + #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) + #define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) + #endif +@@ -159,6 +164,8 @@ + + #define abs(x) ((x) >= 0 ? (x) : -(x)) + #define dabs(x) (doublereal)abs(x) ++#undef min ++#undef max + #define min(a,b) ((a) <= (b) ? (a) : (b)) + #define max(a,b) ((a) >= (b) ? (a) : (b)) + #define dmin(a,b) (doublereal)min(a,b) +diff -ur pmx-2.6.18.orig/libf2c/fio.h pmx-2.6.18/libf2c/fio.h +--- pmx-2.6.18.orig/libf2c/fio.h 2012-05-19 18:50:13.000000000 +0200 ++++ pmx-2.6.18/libf2c/fio.h 2012-07-11 17:46:22.000000000 +0200 +@@ -3,6 +3,9 @@ + #endif + #include <sys/types.h> /* for off_t */ + #include "stdio.h" ++#ifdef HAVE_UNISTD_H ++#include <unistd.h> /* for isatty() */ ++#endif + #ifdef WIN32 + extern int w32getc(FILE *f); + #define getc w32getc +@@ -113,7 +116,6 @@ + extern int (*f__donewrec)(void), t_putc(int), x_wSL(void); + extern void b_char(char*,char*,ftnlen), g_char(char*,ftnlen,char*); + extern int c_sfe(cilist*), z_rnew(void); +-extern int isatty(int); + extern int err__fl(int,int,char*); + extern int xrd_SL(void); + extern int f__putbuf(int); +diff -ur pmx-2.6.18.orig/libf2c/lread.c pmx-2.6.18/libf2c/lread.c +--- pmx-2.6.18.orig/libf2c/lread.c 2012-04-09 18:24:12.000000000 +0200 ++++ pmx-2.6.18/libf2c/lread.c 2012-07-11 17:23:48.000000000 +0200 +@@ -74,8 +74,6 @@ + #define un_getc ungetc + #ifdef KR_headers + extern int ungetc(); +-#else +-extern int ungetc(int, FILE*); /* for systems with a buggy stdio.h */ + #endif + #endif + +diff -ur pmx-2.6.18.orig/libf2c/rsne.c pmx-2.6.18/libf2c/rsne.c +--- pmx-2.6.18.orig/libf2c/rsne.c 2012-04-09 18:24:12.000000000 +0200 ++++ pmx-2.6.18/libf2c/rsne.c 2012-07-11 17:23:51.000000000 +0200 +@@ -66,7 +66,6 @@ + { return ungetc(x,f__cf); } + #else + #define un_getc ungetc +-extern int ungetc(int, FILE*); /* for systems with a buggy stdio.h */ + #endif + #endif + diff --git a/Build/source/utils/pmx/pmx-2.6.18/libf2c/f2c.h b/Build/source/utils/pmx/pmx-2.6.18/libf2c/f2c.h index a91de9bf804..f66d28be5d2 100644 --- a/Build/source/utils/pmx/pmx-2.6.18/libf2c/f2c.h +++ b/Build/source/utils/pmx/pmx-2.6.18/libf2c/f2c.h @@ -23,8 +23,13 @@ typedef short int shortlogical; typedef char logical1; typedef char integer1; #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */ +#if defined(WIN32) && !defined(__MINGW32__) +typedef __int64 longint; /* system-dependent */ +typedef unsigned __int64 ulongint; /* system-dependent */ +#else typedef long long longint; /* system-dependent */ typedef unsigned long long ulongint; /* system-dependent */ +#endif #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) #define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) #endif @@ -159,6 +164,8 @@ typedef struct Namelist Namelist; #define abs(x) ((x) >= 0 ? (x) : -(x)) #define dabs(x) (doublereal)abs(x) +#undef min +#undef max #define min(a,b) ((a) <= (b) ? (a) : (b)) #define max(a,b) ((a) >= (b) ? (a) : (b)) #define dmin(a,b) (doublereal)min(a,b) diff --git a/Build/source/utils/pmx/pmx-2.6.18/libf2c/fio.h b/Build/source/utils/pmx/pmx-2.6.18/libf2c/fio.h index b16957a8fae..e709dde1934 100644 --- a/Build/source/utils/pmx/pmx-2.6.18/libf2c/fio.h +++ b/Build/source/utils/pmx/pmx-2.6.18/libf2c/fio.h @@ -3,6 +3,9 @@ #endif #include <sys/types.h> /* for off_t */ #include "stdio.h" +#ifdef HAVE_UNISTD_H +#include <unistd.h> /* for isatty() */ +#endif #ifdef WIN32 extern int w32getc(FILE *f); #define getc w32getc @@ -113,7 +116,6 @@ extern void f_init(void); extern int (*f__donewrec)(void), t_putc(int), x_wSL(void); extern void b_char(char*,char*,ftnlen), g_char(char*,ftnlen,char*); extern int c_sfe(cilist*), z_rnew(void); -extern int isatty(int); extern int err__fl(int,int,char*); extern int xrd_SL(void); extern int f__putbuf(int); diff --git a/Build/source/utils/pmx/pmx-2.6.18/libf2c/lread.c b/Build/source/utils/pmx/pmx-2.6.18/libf2c/lread.c index 55e068bf9fe..9636ae9c46e 100644 --- a/Build/source/utils/pmx/pmx-2.6.18/libf2c/lread.c +++ b/Build/source/utils/pmx/pmx-2.6.18/libf2c/lread.c @@ -74,8 +74,6 @@ un_getc(int x, FILE *f__cf) #define un_getc ungetc #ifdef KR_headers extern int ungetc(); -#else -extern int ungetc(int, FILE*); /* for systems with a buggy stdio.h */ #endif #endif diff --git a/Build/source/utils/pmx/pmx-2.6.18/libf2c/rsne.c b/Build/source/utils/pmx/pmx-2.6.18/libf2c/rsne.c index f3fcfac13b1..3a32c40b259 100644 --- a/Build/source/utils/pmx/pmx-2.6.18/libf2c/rsne.c +++ b/Build/source/utils/pmx/pmx-2.6.18/libf2c/rsne.c @@ -66,7 +66,6 @@ un_getc(int x, FILE *f__cf) { return ungetc(x,f__cf); } #else #define un_getc ungetc -extern int ungetc(int, FILE*); /* for systems with a buggy stdio.h */ #endif #endif |