From: Pedro Alves <palves@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: Kai Tietz <ktietz@redhat.com>,
gdb-patches@sourceware.org,
Corinna Vinschen <vinschen@redhat.com>,
Nicholas Clifton <nickc@redhat.com>
Subject: Re: [patch 1/2] mingw: update gnulib: prepare the sources
Date: Mon, 23 Mar 2015 17:25:00 -0000 [thread overview]
Message-ID: <55104C7B.9060405@redhat.com> (raw)
In-Reply-To: <20150323170830.GA8493@host1.jankratochvil.net>
On 03/23/2015 05:08 PM, Jan Kratochvil wrote:
> 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?
Other than rpl_gettimeofday (the gettimeofday replacement):
gettimeofday.o:0000005a T _rpl_gettimeofday
AFAICS, there's no other use of "struct timeval" or gettimeofday in gnulib's
sources.
So although rpl_gettimeofday is built expecting rpl_timeval as
parameter, given the #undef above, gdb never calls it:
$ x86_64-w64-mingw32-nm -A *.o build-gnulib/import/*.o | grep gettimeofday
event-loop.o: U gettimeofday
maint.o: U gettimeofday
mi-main.o: U gettimeofday
remote-fileio.o: U gettimeofday
remote-fileio.o:0000000000001b4b t remote_fileio_func_gettimeofday
symfile.o: U gettimeofday
utils.o: U gettimeofday
build-gnulib/import/gettimeofday.o:0000000000000000 b .bss
build-gnulib/import/gettimeofday.o:0000000000000000 d .data
build-gnulib/import/gettimeofday.o:0000000000000000 N .debug_abbrev
build-gnulib/import/gettimeofday.o:0000000000000000 N .debug_aranges
build-gnulib/import/gettimeofday.o:0000000000000000 N .debug_frame
build-gnulib/import/gettimeofday.o:0000000000000000 N .debug_info
build-gnulib/import/gettimeofday.o:0000000000000000 N .debug_line
build-gnulib/import/gettimeofday.o:0000000000000000 N .debug_macro
build-gnulib/import/gettimeofday.o: U gettimeofday
build-gnulib/import/gettimeofday.o: U gmtime
build-gnulib/import/gettimeofday.o: U localtime
build-gnulib/import/gettimeofday.o:0000000000000000 d localtime_buffer_addr
build-gnulib/import/gettimeofday.o:0000000000000000 p .pdata
build-gnulib/import/gettimeofday.o:0000000000000000 r .rdata$zzz
build-gnulib/import/gettimeofday.o:0000000000000082 T rpl_gettimeofday
build-gnulib/import/gettimeofday.o:0000000000000041 T rpl_gmtime
build-gnulib/import/gettimeofday.o:0000000000000000 T rpl_localtime
build-gnulib/import/gettimeofday.o:0000000000000000 t .text
build-gnulib/import/gettimeofday.o:0000000000000000 b tm_zero_buffer
build-gnulib/import/gettimeofday.o:0000000000000000 r .xdata
Do you think we still have a problem?
Thanks,
Pedro Alves
next prev parent reply other threads:[~2015-03-23 17:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-22 22:12 Jan Kratochvil
2014-12-23 11:54 ` Kai Tietz
2014-12-24 22:20 ` Jan Kratochvil
2015-03-23 16:51 ` Pedro Alves
2015-03-23 17:08 ` Jan Kratochvil
2015-03-23 17:25 ` Pedro Alves [this message]
2015-03-23 17:32 ` Jan Kratochvil
2015-03-23 17:37 ` Eli Zaretskii
2015-03-23 17:57 ` Pedro Alves
2015-08-24 18:09 ` Pedro Alves
2015-03-23 19:17 ` Corinna Vinschen
2015-03-23 19:28 ` Pedro Alves
2015-03-23 19:47 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55104C7B.9060405@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@redhat.com \
--cc=ktietz@redhat.com \
--cc=nickc@redhat.com \
--cc=vinschen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox