This is the mail archive of the cygwin-developers 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: Longstanding __USE_W32_SOCKETS hiccup.


On Aug  7 15:29, Dave Korn wrote:
> Corinna Vinschen wrote:
> 
> > struct timeval in winsock2.h only differs by using `long' instead of
> > time_t and susecond_t as types of tv_sec and tv_usec.  The size of the
> > structs is the same, the underlying types are equivalent.
> > 
> > So, wouldn't it be less hassle in the long run to define struct timeval
> > in winsock2.h equivalent to sys/time.h if building for Cygwin?
> 
>   Looking at your patch, I discovered that we never actually define
> _TIMEVAL_DEFINED anywhere!
> 
>   That gave me another idea; what if we turn your idea on its head, and define
> struct timeval in sys/time.h equivalent to winsock2.h if *not* building for
> Cygwin (sockets, i.e. if __USE_W32_SOCKETS).

I don't understand.  Who would use the *Cygwin* header sys/time.h
and then not build for Cygwin?

>   I _think_ (not having pondered it for very long yet) that doing it this way
> should work for any order of includes and any state of the __USE_W32_SOCKETS macro.

What was wrong with my proposal?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


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