Changeset 2873 for box/trunk/lib


Ignore:
Timestamp:
26/03/2011 23:21:03 (14 months ago)
Author:
chris
Message:

Define WINVER and _WIN32_WINNT to Windows 2000 to avoid importing WSAPoll
from winsock2.h, which conflicts with our definition of struct pollfd,
on Windows Vista and above.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/win32/emu.h

    r2511 r2873  
    5151#endif 
    5252 
     53// WIN32_WINNT versions 0x0600 (Vista) and higher enable WSAPoll() in 
     54// winsock2.h, whose struct pollfd conflicts with ours below, so for 
     55// now we just set it lower than that, to Windows 2000. 
     56#ifdef WINVER 
     57        #if WINVER != 0x0500 
     58                #error Must include emu.h before setting WINVER 
     59        #endif 
     60#endif 
     61#define WINVER 0x0500 
     62 
     63#ifdef _WIN32_WINNT 
     64        #if _WIN32_WINNT != 0x0500 
     65                #error Must include emu.h before setting _WIN32_WINNT 
     66        #endif 
     67#endif 
     68#define _WIN32_WINNT 0x0500 
     69 
    5370// Windows headers 
    5471 
     
    287304 
    288305#define INFTIM -1 
    289 #define POLLIN 0x1 
    290 #define POLLERR 0x8 
    291 #define POLLOUT 0x4 
     306 
     307#ifndef POLLIN 
     308#       define POLLIN 0x1 
     309#endif 
     310 
     311#ifndef POLLERR 
     312#       define POLLERR 0x8 
     313#endif 
     314 
     315#ifndef POLLOUT 
     316#       define POLLOUT 0x4 
     317#endif 
    292318 
    293319#define SHUT_RDWR SD_BOTH 
Note: See TracChangeset for help on using the changeset viewer.