This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Problems with w32api includes


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==========================



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]