winnt.h: VOID already defined

DJ Delorie dj@redhat.com
Thu Jul 5 13:29:00 GMT 2001


If I try to cross-build a native cygwin expect under linux, tcl's
headers already define VOID to void, and thus winnt.h is missing a
number of important typedefs.  This patch seems to fix it, but I'm
worried that this just hides a true problem elsewhere.

Index: winnt.h
===================================================================
RCS file: /cvs/uberbaum/winsup/w32api/include/winnt.h,v
retrieving revision 1.22
diff -p -3 -r1.22 winnt.h
*** winnt.h     2001/05/17 21:13:10     1.22
--- winnt.h     2001/07/05 20:07:35
*************** extern "C" {
*** 41,50 ****
  
  #ifndef VOID
  #define VOID void
  typedef char CHAR;
  typedef short SHORT;
  typedef long LONG;
- #endif
  typedef CHAR CCHAR;
  typedef unsigned char UCHAR,*PUCHAR;
  typedef unsigned short USHORT,*PUSHORT;
--- 41,50 ----
  
  #ifndef VOID
  #define VOID void
+ #endif
  typedef char CHAR;
  typedef short SHORT;
  typedef long LONG;
  typedef CHAR CCHAR;
  typedef unsigned char UCHAR,*PUCHAR;
  typedef unsigned short USHORT,*PUSHORT;



More information about the Cygwin-patches mailing list