public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Problems with w32api includes
@ 2002-05-30  6:59 Clive Nicolson
  0 siblings, 0 replies; only message in thread
From: Clive Nicolson @ 2002-05-30  6:59 UTC (permalink / raw)
  To: cygwin; +Cc: clive

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/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-05-30  7:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-30  6:59 Problems with w32api includes Clive Nicolson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).