changeset 1685:29c45c1b64f3

[xemacs-hg @ 2003-09-15 21:19:11 by james] Quiet compiler warnings on Cygwin.
author james
date Mon, 15 Sep 2003 21:19:17 +0000
parents fba0799e2d79
children d625b0459318
files src/ChangeLog src/event-msw.c src/syswindows.h src/unexcw.c
diffstat 4 files changed, 22 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- 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  <james@xemacs.org>
+
+	* 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  <jonathan@xemacs.org>
 
 	* intl-encap-win32.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,
--- 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 */
--- 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);