dear fellow cygwin users, i run into problem compiling a program, the section with the problem is in this function:
char *FFSS_GetOS(void) { #ifdef _WIN32 if(FFSS_WinServerVersion[0] == 0) { DWORD dwVersion = GetVersion(); if(dwVersion < 0x80000000) /* Windows NT/2K/XP */ { DWORD dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion))); DWORD dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion))); if(dwWindowsMajorVersion < 4) /* Win32s */ SU_strcpy(FFSS_WinServerVersion,"Win32s",sizeof(FFSS_WinServerVersion)); else if(dwWindowsMajorVersion == 4) /* Windows NT 4 */ SU_strcpy(FFSS_WinServerVersion,"WinNT",sizeof(FFSS_WinServerVersion)); else /* 2K/XP */ { if(dwWindowsMinorVersion == 0) SU_strcpy(FFSS_WinServerVersion,"Win2k",sizeof(FFSS_WinServerVersion)); else SU_strcpy(FFSS_WinServerVersion,"WinXP",sizeof(FFSS_WinServerVersion)); } } else /* Windows 9x */ SU_strcpy(FFSS_WinServerVersion,"Win9x",sizeof(FFSS_WinServerVersion)); } return FFSS_WinServerVersion; #elif __CYGWIN32__ if(FFSS_WinServerVersion[0] == 0) { DWORD dwVersion = GetVersion(); if(dwVersion < 0x80000000) /* Windows NT/2K/XP */ { DWORD dwWindowsMajorVersion = (DWORD)(LOBYTE(LOWORD(dwVersion))); DWORD dwWindowsMinorVersion = (DWORD)(HIBYTE(LOWORD(dwVersion))); if(dwWindowsMajorVersion < 4) /* Win32s */ SU_strcpy(FFSS_WinServerVersion,"Cyg-Win32s",sizeof(FFSS_WinServerVersion)); else if(dwWindowsMajorVersion == 4) /* Windows NT 4 */ SU_strcpy(FFSS_WinServerVersion,"Cyg-WinNT",sizeof(FFSS_WinServerVersion)); else /* 2K/XP */ { if(dwWindowsMinorVersion == 0) SU_strcpy(FFSS_WinServerVersion,"Cyg-Win2k",sizeof(FFSS_WinServerVersion)); else SU_strcpy(FFSS_WinServerVersion,"Cyg-WinXP",sizeof(FFSS_WinServerVersion)); } } else /* Windows 9x */ SU_strcpy(FFSS_WinServerVersion,"Cyg-Win9x",sizeof(FFSS_WinServerVersion)); } return FFSS_WinServerVersion; #else /* !_WIN32 & !__CYGWIN32__ */ return FFSS_SERVER_OS; #endif /* _WIN32 */ } this is not a critical function as what it does is to return what operation systems it is running on. the program comes without the #include <windef.h> directive. it doesn't compile because DWORD is not defined. after i added the windef.h header, it still doesn't compile and the error mrssage is: In file included from utils.c:4: /usr/include/w32api/windef.h:273: parse error before "void" has anyone successfully used the windef.h header and could you tell me how to compile program like this? my windef.h is attached here. regards, lionel -- _______________________________________________ Get your free Verizonmail at www.verizonmail.com
windef.h
Description: Binary data
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/