This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: Follow-up on patch to ser-tcp.c


mark.kettenis@xs4all.nl (Mark Kettenis)  wrote on 06.04.05 in <200504060739.j367dlM3000821@elgar.sibelius.xs4all.nl>:

> Actually I think the WINAPI thingy is more descriptive.  In light of
> the discussion above, I think there should be a single spot in
> configure.ac where we decide whether we want to use the native Windows
> API or the proper POSIX interfaces that Cygwin provides get used.
> Some sort of "Windows but not Cygwin" would than add -lws2_23 and
> define something like USE_WIN32API, and we'd use that define
> everywhere where there is a choice between the native Windows API and
> the proper POSIX interfaces.

I seem to recall that autoconf does know something about that difference.

> Great!  In this area we also have the ioctlsock v.s. ioctl issue.  Is
> it possible to keep using the proper POSIX interfaces in the code and
> #define ioctl ioctlsock in the USE_WIN32API case instead of the other
> way around?  I think that makes it easier for non-Windows programmers
> to understand the code.

The whole point is that Windows has two different ioctl functions, whereas  
POSIX only has one. Now if you never need to use the non-socket ioctl on  
Windows, that would be possible - otherwise ...

MfG Kai


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