# HG changeset patch # User james # Date 1063639497 0 # Node ID 74353ce403ce82f590151ad6eb324d89671ca423 # Parent 33ac0945e3a28abc16f4f081446d1ff037e648dd [xemacs-hg @ 2003-09-15 15:24:56 by james] Fix some brokenness for new w32api versions on Cygwin. diff -r 33ac0945e3a2 -r 74353ce403ce src/ChangeLog --- a/src/ChangeLog Sun Sep 14 21:52:26 2003 +0000 +++ b/src/ChangeLog Mon Sep 15 15:24:57 2003 +0000 @@ -1,3 +1,10 @@ +2003-09-15 Jerry James + + * syswindows.h: Quiet compiler warnings about struct stat. + (W32API_VER): + (W32API_INSTALLED_VER): New macros to compare w32api versions. + (_SHQUERYRBINFO): Define for w32api < 2.4 only. + 2003-09-11 Marcus Crestani * alloc.c: Clean up #ifdef USE_KKCC, move stack code to better diff -r 33ac0945e3a2 -r 74353ce403ce src/syswindows.h --- a/src/syswindows.h Sun Sep 14 21:52:26 2003 +0000 +++ b/src/syswindows.h Mon Sep 15 15:24:57 2003 +0000 @@ -151,11 +151,13 @@ #ifdef CYGWIN_HEADERS +#include /* for struct stat */ #include /* for version info */ -#if __W32API_MAJOR_VERSION > 2 || (__W32API_MAJOR_VERSION == 2 && __W32API_MINOR_VERSION >= 2) -#define W32API_2_2 -#endif +/* Test for a specific version of w32api */ +#define W32API_VER(major,minor) (((major) << 16) + (minor)) +#define W32API_INSTALLED_VER \ + W32API_VER (__W32API_MAJOR_VERSION, __W32API_MINOR_VERSION) /* Various brokennesses in various versions of Cygwin */ @@ -362,7 +364,7 @@ WCHAR szDisplay[64]; } NMDATETIMEFORMATW, FAR * LPNMDATETIMEFORMATW; -#ifndef W32API_2_2 +#if W32API_INSTALLED_VER < W32API_VER(2,2) typedef struct tagNMTTDISPIFNOA { @@ -388,7 +390,7 @@ #endif } NMTTDISPINFOW, FAR *LPNMTTDISPINFOW; -#endif /* not W32API_2_2 */ +#endif /* W32API_INSTALLED_VER < W32API_VER(2,2) */ #endif /* (_WIN32_IE >= 0x0400) */ @@ -474,12 +476,14 @@ #include +#if W32API_INSTALLED_VER < W32API_VER(2,4) typedef struct _SHQUERYRBINFO { DWORD cbSize; __int64 i64Size; __int64 i64NumItems; } SHQUERYRBINFO, *LPSHQUERYRBINFO; +#endif typedef LPCDLGTEMPLATE LPCDLGTEMPLATEW; typedef LPCDLGTEMPLATE LPCDLGTEMPLATEA;