monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] strptime not in MinGW time.h


From: Stephen Leake
Subject: Re: [Monotone-devel] strptime not in MinGW time.h
Date: Wed, 19 May 2010 05:56:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt)

Derek Scherger <address@hidden> writes:

> On Tue, May 18, 2010 at 2:49 AM, Stephen Leake <
> address@hidden> wrote:
>
>> which identifies 'strptime' as an "XSI"; "X/Open System Interfaces
>> Extension". So apparently MinGW doesn't support that.
>>
>> Annotate says 'strptime' was added recently, as part of the
>> changelog-editor work:
>>
>
> Uh oh.
>
>
>> Can this be rewritten using more standard libraries?
>>
>
> Do you have any in mind? 

No, but see below.

> This sounds like maybe mingw missed it. Maybe it will appear in a future
> release?
>
> http://www.mail-archive.com/address@hidden/msg17739.html

Hmm. That says it's merely a header problem. So I added a local
declaration of the function in dates.cc:

extern char *strptime (__const char *__restrict __s,
                       __const char *__restrict __fmt, struct tm *__tp);

but now I get a link error:

dates.o: In function `ZN6date_t24from_formatted_localtimeERKSsS1_':
c:/MinGW/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/bits/basic_string.h:1456:
 undefined reference to `strptime(char const*, char const*, tm*)'

So it's not just a header problem.

> We could possibly copy an strptime implementation into our win32 directory I
> suppose.

Various web links hint that strptime is in glibc, so I don't understand
why it's not in MinGW.

But we should be able to get the source from the Debian glibc package;
I'll give that a try.

-- 
-- Stephe



reply via email to

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