From: <no...@so...> - 2002-06-10 09:41:45
|
Bugs item #563469, was opened at 2002-06-02 17:38 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=102435&aid=563469&group_id=2435 Category: w32api Group: Feature requests Status: Closed Resolution: Remind Priority: 5 Submitted By: Clive Nicolson (cliven) Assigned to: Danny Smith (dannysmith) Summary: problems with w32api includes Initial Comment: Recently I've been "porting" some Win32/Perl packages to cygwin/Perl and have had to add __CYGWIN__ conditioned patches to overcome what I assume are differences between native Win include files and those provided by w32api. I've not got access to native Win include files, so can not work out what the extact problems are, but below are 5 examples of the changes I've had to make. I've included all the preceeding context as a aid. The w32api maintainer is most likely to be in a better position to fix these problems than I. I think that items 4) and 5) maybe difficult as those string declarations are most likely in <strings.h> on Win32 systems. Clive 1) #include <windows.h> #ifdef __CYGWIN__ #include <wtypes.h> #include <objbase.h> #endif /* __CYGWIN__ */ 2) #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <winbase.h> #ifdef __CYGWIN__ #include <winnt.h> typedef ACE_HEADER *PACE_HEADER; typedef ACCESS_ALLOWED_ACE *PACCESS_ALLOWED_ACE; #endif /* __CYGWIN__ */ 3) #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <lmcons.h> /* LAN Manager common definitions */ #include <lmerr.h> /* LAN Manager network error definitions */ #include <lmUseFlg.h> #include <lmAccess.h> #include <lmAPIBuf.h> #undef LPTSTR #define LPTSTR LPWSTR #include <lmServer.h> #include <lmwksta.h> #undef LPTSTR #define LPTSTR LPSTR #ifdef __CYGWIN__ #include <winnls.h> #endif 4) #define WIN32_LEAN_AND_MEAN #include <windows.h> #ifdef __CYGWIN__ WCHAR *wcschr(const WCHAR *, WCHAR); #endif 5) #ifdef __CYGWIN__ int _wcsicmp(const WCHAR *, const WCHAR *); long _wtol(const WCHAR *); #endif /* __CYGWIN__ */ ===============The end========================== ---------------------------------------------------------------------- >Comment By: Clive Nicolson (cliven) Date: 2002-06-10 21:41 Message: Logged In: YES user_id=556789 Thanks, Fixes for 1 and 2 are much appretiated, 3 seems to have been my problem and for 4 and 5 I've modified my prototypes. Clive ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2002-06-10 20:06 Message: Logged In: YES user_id=11494 I think I've fixed 1) and 2) . I can't reproduce 3). 4) and 5) are problems I can't fix. the prototypes are wrong anyway, So I'll close for now. Feel free to reopen if you can narrow down to a specific bug. Danny ---------------------------------------------------------------------- Comment By: Clive Nicolson (cliven) Date: 2002-06-05 06:00 Message: Logged In: YES user_id=556789 Thanks, I've discovered that I updated to the latest w32api while I was constructing my patches, so a couple of my problems have lessened. >1) I think this is due to the fact that windows.h does not >include ole2.h by default. Perhaps, with vtable-thunk >implementation now default in C++, we should. That would be much appreciated. >2) I don't have a clue. >including windows.h normally includes winnt.h (and winbase.h) >What version of w32api are you using? Ok, the <winnt.h> is not needed, but the PACE_HEADER and PACCESS_ALLOWED_ACE are! The latest version of w32api. Thanks Clive ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2002-06-04 15:47 Message: Logged In: YES user_id=11494 Thanks Earnie 1) I think this is due to the fact that windows.h does not include ole2.h by default. Perhaps, with vtable-thunk implementation now default in C++, we should. 2) I don't have a clue. including windows.h normally includes winnt.h (and winbase.h) What version of w32api are you using? 3) Ditto. Maybe you've done something like this in an earlier header (copied from cygwin's winsup.h): #define WIN32_LEAN_AND_MEAN 1 #define _WINGDI_H #define _WINUSER_H #define _WINNLS_H #define _WINVER_H #define _WINNETWK_H #define _WINSVC_H #include <windows.h> #include <wincrypt.h> #include <lmcons.h> #undef _WINGDI_H #undef _WINUSER_H #undef _WINNLS_H #undef _WINVER_H #undef _WINNETWK_H #undef _WINSVC_H 4) Can't help you here. You can't include mingw headers if your using cygwin. This is in mingw's string.h: wchar_t* wcschr (const wchar_t*, wchar_t); It is not part of w32api 5) same as 4 Danny ---------------------------------------------------------------------- Comment By: Earnie Boyd (earnie) Date: 2002-06-04 00:14 Message: Logged In: YES user_id=15438 I don't think your methods are valid. I'm passing to Danny to get his opinion. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=102435&aid=563469&group_id=2435 |