This is the mail archive of the gdb-patches@sourceware.org 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: [patch 1/2] mingw: update gnulib: prepare the sources


On Mon, 23 Mar 2015 17:51:44 +0100, Pedro Alves wrote:
> --- /dev/null
> +++ b/gdb/common/gdb_sys_time.h
> @@ -0,0 +1,38 @@
[...]
> +#ifndef GDB_SYS_TIME_H
> +#define GDB_SYS_TIME_H
> +
> +#include <sys/time.h>
> +
> +/* On MinGW-w64, gnulib's sys/time.h replaces 'struct timeval' and
> +   gettimeofday with versions that support 64-bit time_t, for POSIX
> +   compliance.  However, the gettimeofday replacement does not ever
> +   return time_t values larger than 31-bit, as it simply returns the
> +   system's gettimeofday's (signed) 32-bit result as (signed) 64-bit.
> +   Because we don't really need the POSIX compliance, and it ends up
> +   causing conflicts with other libraries we use that don't use gnulib
> +   and thus work with the native struct timeval, such as Winsock2's
> +   native 'select' and libiberty, simply undefine away gnulib's
> +   replacements.  */
> +#if GNULIB_defined_struct_timeval
> +# undef timeval
> +# undef gettimeofday
> +#endif
> +
> +#endif /* #ifndef GDB_SYS_TIME_H */

With this header file used for GDB's sources aren't gnulib's .c files compiled
with incompatible ABI?


Jan


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