diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-07-13 13:40:27 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2014-07-13 13:40:27 +0000 |
commit | 0453db105ed84bf57356a8f81ba35a47c4996371 (patch) | |
tree | f36d03398b1a41387a4970c9ef26b114a18895b2 /Build | |
parent | 6a1902e0bcd1e17c89ff56a758a974fdbd0eea7d (diff) |
texk/kpathsea [WIN64]: Avoid cast from pointer to integer of different size
git-svn-id: svn://tug.org/texlive/trunk@34591 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r-- | Build/source/texk/kpathsea/ChangeLog | 5 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/debug.c | 16 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/hash.c | 4 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/knj.c | 12 | ||||
-rw-r--r-- | Build/source/texk/kpathsea/tex-make.c | 2 |
5 files changed, 32 insertions, 7 deletions
diff --git a/Build/source/texk/kpathsea/ChangeLog b/Build/source/texk/kpathsea/ChangeLog index 72633457487..baf8f109a1b 100644 --- a/Build/source/texk/kpathsea/ChangeLog +++ b/Build/source/texk/kpathsea/ChangeLog @@ -1,3 +1,8 @@ +2014-07-13 Peter Breitenlohner <peb@mppmu.mpg.de> + + * debug.c, hash.c, knj.c, tex-make.c: [WIN64] Avoid cast from + pointer to integer of different size. + 2014-06-20 Peter Breitenlohner <peb@mppmu.mpg.de> * mingw32.h: Require WINVER >= 0x0500. diff --git a/Build/source/texk/kpathsea/debug.c b/Build/source/texk/kpathsea/debug.c index 5e4af3b6283..0bcd62495ac 100644 --- a/Build/source/texk/kpathsea/debug.c +++ b/Build/source/texk/kpathsea/debug.c @@ -25,30 +25,34 @@ FILE * fopen (const char *filename, const char *mode) { -#if defined (KPSE_COMPAT_API) - kpathsea kpse = kpse_def; -#endif #undef fopen FILE *ret = fopen (filename, mode); #if defined (KPSE_COMPAT_API) + kpathsea kpse = kpse_def; if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN)) +#if defined(_WIN64) + DEBUGF3 ("fopen(%s, %s) => 0x%I64x\n", filename, mode, (unsigned __int64) ret); +#else DEBUGF3 ("fopen(%s, %s) => 0x%lx\n", filename, mode, (unsigned long) ret); #endif +#endif return ret; } int fclose (FILE * f) { -#if defined (KPSE_COMPAT_API) - kpathsea kpse = kpse_def; -#endif #undef fclose int ret = fclose (f); #if defined (KPSE_COMPAT_API) + kpathsea kpse = kpse_def; if (KPATHSEA_DEBUG_P (KPSE_DEBUG_FOPEN)) +#if defined(_WIN64) + DEBUGF2 ("fclose(0x%I64x) => %d\n", (unsigned __int64) f, ret); +#else DEBUGF2 ("fclose(0x%lx) => %d\n", (unsigned long) f, ret); #endif +#endif return ret; } diff --git a/Build/source/texk/kpathsea/hash.c b/Build/source/texk/kpathsea/hash.c index f1d81dbd3a6..22c2b0806ff 100644 --- a/Build/source/texk/kpathsea/hash.c +++ b/Build/source/texk/kpathsea/hash.c @@ -191,7 +191,11 @@ hash_lookup (hash_table_type table, const_string key) { putc (' ', stderr); if (kpse->debug_hash_lookup_int) +#if defined(_WIN64) + fprintf (stderr, "%I64d", (__int64) *r); +#else fprintf (stderr, "%ld", (long) *r); +#endif else fputs (*r, stderr); } diff --git a/Build/source/texk/kpathsea/knj.c b/Build/source/texk/kpathsea/knj.c index 92116c0f64b..3cc8b3ff428 100644 --- a/Build/source/texk/kpathsea/knj.c +++ b/Build/source/texk/kpathsea/knj.c @@ -121,7 +121,11 @@ fsyscp_xfopen (const char *filename, const char *mode) DEBUGF_START (); fprintf (stderr, "fsyscp_xfopen(%s [", filename); WriteConsoleW( GetStdHandle( STD_ERROR_HANDLE ), fnamew, wcslen( fnamew ), NULL, NULL ); +#if defined(_WIN64) + fprintf (stderr, "], %s) => 0x%I64x\n", mode, (unsigned __int64) f); +#else fprintf (stderr, "], %s) => 0x%lx\n", mode, (unsigned long) f); +#endif DEBUGF_END (); } #endif @@ -154,7 +158,11 @@ fsyscp_fopen (const char *filename, const char *mode) DEBUGF_START (); fprintf (stderr, "fsyscp_fopen(%s [", filename); WriteConsoleW( GetStdHandle( STD_ERROR_HANDLE ), fnamew, wcslen( fnamew ), NULL, NULL ); +#if defined(_WIN64) + fprintf (stderr, "], %s) => 0x%I64x\n", mode, (unsigned __int64) f); +#else fprintf (stderr, "], %s) => 0x%lx\n", mode, (unsigned long) f); +#endif DEBUGF_END (); } } @@ -188,7 +196,11 @@ fsyscp_popen (const char *command, const char *mode) DEBUGF_START (); fprintf (stderr, "fsyscp_popen(%s [", command); WriteConsoleW( GetStdHandle( STD_ERROR_HANDLE ), commandw, wcslen( commandw ), NULL, NULL ); +#if defined(_WIN64) + fprintf (stderr, "], %s) => 0x%I64x\n", mode, (unsigned __int64) f); +#else fprintf (stderr, "], %s) => 0x%lx\n", mode, (unsigned long) f); +#endif DEBUGF_END (); } } diff --git a/Build/source/texk/kpathsea/tex-make.c b/Build/source/texk/kpathsea/tex-make.c index bcb51e911b8..8c3e46816d0 100644 --- a/Build/source/texk/kpathsea/tex-make.c +++ b/Build/source/texk/kpathsea/tex-make.c @@ -236,7 +236,7 @@ maketex (kpathsea kpse, kpse_file_format_type format, string* args) _dup2(hstdout, fileno(stdout)); close(hstdout); - if((int)hchild == -1) { + if(hchild == (HANDLE)(-1)) { close(childpipe[0]); goto labeldone; } |