# HG changeset patch # User james # Date 1063660757 0 # Node ID 29c45c1b64f396fcef950a57934454891cea3cb1 # Parent fba0799e2d79fb27f86ff454c1cc6865389b4eb6 [xemacs-hg @ 2003-09-15 21:19:11 by james] Quiet compiler warnings on Cygwin. diff -r fba0799e2d79 -r 29c45c1b64f3 src/ChangeLog --- a/src/ChangeLog Mon Sep 15 20:21:47 2003 +0000 +++ b/src/ChangeLog Mon Sep 15 21:19:17 2003 +0000 @@ -1,3 +1,10 @@ +2003-09-15 Jerry James + + * event-msw.c (mswindows_wnd_proc): Use new w32api macros. + * syswindows.h: Define w32api macros as 0 for non-Cygwin. + * unexcw.c (CHECK_AOUT_POS): Add cast to quiet compiler. + * unexcw.c (copy_executable_and_dump_data_section): Ditto. + 2002-07-04 Jonathan Harris * intl-encap-win32.c: diff -r fba0799e2d79 -r 29c45c1b64f3 src/event-msw.c --- a/src/event-msw.c Mon Sep 15 20:21:47 2003 +0000 +++ b/src/event-msw.c Mon Sep 15 21:19:17 2003 +0000 @@ -3793,7 +3793,7 @@ But "cch" means "count of characters", not bytes. I'll assume the doc writers messed up and the programmer was correct. Also, this approach is safe even if it's actually the other way around. */ -#if defined (CYGWIN_HEADERS) && !defined (W32API_2_2) +#if defined (CYGWIN_HEADERS) && W32API_INSTALLED_VER < W32API_VER(2,2) /* Another Cygwin prototype error, fixed in v2.2 of w32api */ XECOMCALL4 (psl, GetPath, (LPSTR) resolved, diff -r fba0799e2d79 -r 29c45c1b64f3 src/syswindows.h --- a/src/syswindows.h Mon Sep 15 20:21:47 2003 +0000 +++ b/src/syswindows.h Mon Sep 15 21:19:17 2003 +0000 @@ -488,6 +488,9 @@ typedef LPCDLGTEMPLATE LPCDLGTEMPLATEW; typedef LPCDLGTEMPLATE LPCDLGTEMPLATEA; +#else /* !CYGWIN_HEADERS */ +#define W32API_VER(major,minor) 0 +#define W32API_INSTALLED_VER 0 #endif /* CYGWIN_HEADERS */ /* Not in VC 6 */ diff -r fba0799e2d79 -r 29c45c1b64f3 src/unexcw.c --- a/src/unexcw.c Mon Sep 15 20:21:47 2003 +0000 +++ b/src/unexcw.c Mon Sep 15 21:19:17 2003 +0000 @@ -84,14 +84,15 @@ PEAOUTHDR f_ohdr; SCNHDR f_data, f_bss, f_text, f_nextdata; -#define CHECK_AOUT_POS(a) \ -do { \ - if (lseek (a_out, 0, SEEK_CUR) != a) \ - { \ - printf ("we are at %lx, should be at %lx\n", \ - lseek (a_out, 0, SEEK_CUR), a); \ - exit (-1); \ - } \ +#define CHECK_AOUT_POS(a) \ +do { \ + if (lseek (a_out, 0, SEEK_CUR) != a) \ + { \ + printf ("we are at %lx, should be at %lx\n", \ + (unsigned long) lseek (a_out, 0, SEEK_CUR), \ + (unsigned long) (a)); \ + exit (-1); \ + } \ } while (0) /* Dump out .data and .bss sections into a new executable. */ @@ -440,8 +441,8 @@ if (lseek (a_new, 0, SEEK_CUR) != (long) f_nextdata.s_scnptr) { printf ("at %lx should be at %lx\n", - lseek (a_new, 0, SEEK_CUR), - f_nextdata.s_scnptr); + (unsigned long) lseek (a_new, 0, SEEK_CUR), + (unsigned long) f_nextdata.s_scnptr); PERROR ("file positioning error\n"); } lseek (a_out, f_nextdata_s_scnptr, SEEK_SET);