This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 1/2] mingw: update gnulib: prepare the sources
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: Kai Tietz <ktietz at redhat dot com>, gdb-patches at sourceware dot org, Corinna Vinschen <vinschen at redhat dot com>, Nicholas Clifton <nickc at redhat dot com>
- Date: Mon, 23 Mar 2015 18:08:30 +0100
- Subject: Re: [patch 1/2] mingw: update gnulib: prepare the sources
- Authentication-results: sourceware.org; auth=none
- References: <20141222221229 dot GA30575 at host2 dot jankratochvil dot net> <108241234 dot 1319759 dot 1419335690162 dot JavaMail dot zimbra at redhat dot com> <20141224222045 dot GA30482 at host2 dot jankratochvil dot net> <551044A0 dot 9070607 at redhat dot com>
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