delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/05/30/03:09:48

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 30 May 2002 19:07:44 +1200 (NZST)
From: Clive Nicolson <clive AT baby DOT bedroom DOT gen DOT nz>
X-X-Sender: clive AT PentiumII DOT bedroom DOT gen DOT nz
To: cygwin AT cygwin DOT com
cc: clive AT baby DOT bedroom DOT gen DOT nz
Subject: Problems with w32api includes
Message-ID: <Pine.LNX.4.44.0205301856480.3077-100000@PentiumII.bedroom.gen.nz>
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019