bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ::gettimeofday' has not been declared - on cygwin


From: Paul Eggert
Subject: Re: ::gettimeofday' has not been declared - on cygwin
Date: Mon, 18 Mar 2013 23:34:14 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4

On 03/01/2013 08:40 PM in 
<http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html> marco 
atzeri wrote:

> reverting the commit:
> 
> http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=db61fd22822da6974c2ca4caa2975d74229a4c70
> 
> solves the issue.

Thanks for reporting that.  Most likely the problem is in the following
part of lib/sys_select.in.h.  My guess is that Cygwin is like OSF/1 and
Solaris 2.6 in that <sys/time.h> (and perhaps sys/types.h) include sys/select.h
and we need to catch that, and delegate to the system's header in this case.
Can you please analyze or supply copies of the relevant include files on Cygwin,
so that we can add the appropriate "|| defined __CYGWIN__ && ..."  clauses
below?  We need to know under which circumstances, exactly, the system
<sys/time.h> includes <sys/select.h>, and what macros the system <sys/time.h>
defines to prevent double inclusion, and likewise for <sys/types.h>.

Thanks.

/* On OSF/1 and Solaris 2.6, <sys/types.h> and <sys/time.h>
   both include <sys/select.h>.
   Simply delegate to the system's header in this case.  */
#if (@HAVE_SYS_SELECT_H@                                                \
     && ((defined __osf__ && defined _SYS_TYPES_H_ && defined _OSF_SOURCE) \
         || (defined __sun && defined _SYS_TYPES_H                      \
             && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE)   \
                 || defined __EXTENSIONS__)))                           \
     && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H)

# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TYPES_H
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@

#elif (@HAVE_SYS_SELECT_H@                                              \
       && ((defined __osf__ && defined _SYS_TIME_H_ && defined _OSF_SOURCE) \
           || (defined __sun && defined _SYS_TIME_H                     \
               && (! (defined _XOPEN_SOURCE || defined _POSIX_C_SOURCE) \
                   || defined __EXTENSIONS__)))                         \
       && !defined _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H)

# define _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H
# @INCLUDE_NEXT@ @NEXT_SYS_SELECT_H@




reply via email to

[Prev in Thread] Current Thread [Next in Thread]