|
From: マーズ ho h. k. <ma...@th...> - 2015-01-17 23:08:22
|
Hello Eli, I dual boot Fedora 20 Heisenbug x86_64 and Win 8.1. It is still 32 bit time_t in both OS. May be the problem is hardware related, ie. the RTC is ticking away in 32-bit register. I did a simple C++ a.out to test the numeric limits of time_t for Heisenbug and time_t overflows by the year 2106. So we may not be around then, not our problem? Eli Zaretskii wrote: > This is just to draw people's attention to one issue I've bumped into > with the latest MinGW runtime v3.21. > > The runtime now defines 'struct timespec' in an internal header > parts/time.h which is included by unistd.h, presumably to be able to > declare a prototype of 'nanosleep'. > > There are 2 problems with this: > > . time.h does not include parts/time.h, although I think it was meant > to do so. As result, configure scripts that check whether system > headers define the struct, and look for it in time.h and > sys/time.h, will not find it. > > . The "usual" definition of 'struct timespec' uses time_t as the type > of the tv_sec member, but MinGW runtime uses 'long long' instead. > Since time_t is still 32-bit wide, this means potential trouble, at > least in the following cases: > > . if the replacement definition, generated as result of the failure > of the configure script to find the definition provided by MinGW, > uses time_t, and the application then includes unistd.h, the > compilation will fail; for one such problem that already happened > see > http://lists.gnu.org/archive/html/bug- gnulib/2015-01/msg00042.html > > . including pthread.h in a program that also includes unistd.h will > most probably also fail, since pthread.h defines this structure > using time_t > > I think MinGW should at least include parts/time.h in time.h. Not > sure what to do with the Pthreads incompatibility, though. It might > be possible to add to parts/time.h the HAVE_STRUCT_TIMESPEC guard that > pthread.h uses to define its own struct, but that won't help with > using precompiled binaries of Pthreads, if they were built with > previous versions of MinGW. Any suggestions? > > ------------------------------------------------------------------------------ > New Year. New Location. New Benefits. New Data Center in Ashburn, VA. > GigeNET is offering a free month of service with a new server in Ashburn. > Choose from 2 high performing configs, both with 100TB of bandwidth. > Higher redundancy.Lower latency.Increased capacity.Completely compliant. > http://p.sf.net/sfu/gigenet > _______________________________________________ > MinGW-users mailing list > MinGW- us...@li... > > This list observes the Etiquette found at > http://www.mingw.org/Mailing_Lists. > We ask that you be polite and do the same. Disregard for the list etiquette > may cause your account to be moderated. > > _______________________________________________ > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > Also: > mailto:mingw-users- re...@li...?subject=unsubscribe |