This is the mail archive of the cygwin-patches@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]

Re: [PATCH] winsock related changes for w32api


 --- Bart Oldeman <bart.oldeman@btinternet.com> wrote: > On Mon, 26 Aug 2002,
Danny Smith wrote:
> 
> >  --- Bart Oldeman <bart.oldeman@btinternet.com> wrote: > Hi,
> > >
> > > here's a patch adding some winsock, IPX and Netware related definitions.
> > > It was necessary to compile the Watcom Novell debug helper, but can be
> > > useful for others too.
> > >
> > > 2002-08-25  Bart Oldeman  <bart.oldeman@btinternet.com>
> > >
> > > 	* include/nspapi.h (NS_*): Add defines.
> > > 	(SERVICE_*): Add defines.
> > > 	(SERVICE_ADDRESS): Add structure and typedefs.
> > > 	(SERVICE_ADDRESSES): Ditto.
> > > 	(SERVICE_INFO): Ditto.
> > > 	(LPSERVICE_ASYNC_INFO): Add typedef.
> > > 	(SetService, GetAddressByName): Add prototypes.
> >
> > Shouldn't structs and protos  be Unicoded properly, rather than using
> LPTSTR
> 
> LPTSTR should be fine, since:
> <winnt.h>:
> typedef TCHAR *LPTCH,*PTSTR,*LPTSTR,*LP,*PTCHAR;
> and
> #ifdef UNICODE
> typedef WCHAR TCHAR;
> #else
> typedef CHAR TCHAR;
> #endif

No it is not fine. We need explict A and W SERVICE_INFO structure definitions. 

> 
> > Are you sure?  Including wtypes.h can bring in a lot of unnessary COM/OLE
> > through rpc api.
> 
> Well I needed it for BLOB - I saw the same thing happened in winsock2.h,
> which already includes nspapi.h, so I moved the winsock2.h BLOB typedef
> to nspapi.h. and now wtypes.h is not necessary anymore.


This is not fine either. Did you read the FIXME in winsock2.h next to include
#<nspapi.h.>  My reading of the Windows Sockest 2.2 spec is that is not meant
to depend on other api's.  

The FIXME refers to getting rid of dependence of winsock on service provider
api, not reinforcing that dependence

Danny

http://digital.yahoo.com.au - Yahoo! Digital How To
- Get the best out of your PC!


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