From: arton Date: 2011-05-13T01:30:22+09:00 Subject: [ruby-core:36140] Re: [ruby-cvs:38172] Ruby:r30989 (trunk): * include/ruby/win32.h: define WIN32 if neither _WIN64 nor WIN32 defined. it forces to use push/pop for pack(4) pragma. Hi, You are right _WIN32 and _WIN64. These macros are predefined by compilers. The problem is just WIN32. The problem that I've met is Winsock2.h that included by ruby/win32.h On my MS SDK (v7.0A) it contains the line below: #if (!defined(_WIN64) && !defined(WIN32)) #include /* WIN32 can be defined between here and the required poppack so define this special macro to ensure poppack */ #define _NEED_POPPACK #endif I believe that WIN32 and _WIN32 has historycal reason, once MS pre defined WIN32 (but as you know it's not ANSI compatible because lack of prefix '_') not _WIN32. So most headers support _WIN32 but winsock2.h is not and unfortunaly ruby/win32.h requires winsock2.h, maybe keeping historical source file level compatibility. And I - extension library developer - really need not pshapack4.h (the cause of many trouble for latest headers). -- arton