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: Thu, 20 May 2010 07:04:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (windows-nt)

Thomas Moschny <address@hidden> writes:

> Stephen Leake <address@hidden>:
>
>> Various web links hint that strptime is in glibc, so I don't
>> understand why it's not in MinGW.
>
> MinGW uses (i.e. provides headers for) the standard C runtime as
> provided by the Windows OS. And as far as I understand, there's simply
> no strptime() in that runtime, so we have to provide our own
> implementation (which basically means copying one of the various
> versions already provided by other open source projects).

Well, now I know why glibc is not in MinGW:

configure: running configure fragment for add-on nptl
*** The GNU C library is currently not available for this platform.
*** So far nobody cared to port it and if there is no volunteer it
*** might never happen.  So, if you have interest to see glibc on
*** this platform visit
***     http://www.gnu.org/software/libc/porting.html
*** and join the group of porters

So I tried copying just the part needed for strptime to monotone/glibc,
and compiling there.

It's currently dying with some mysterious C messages:

../monotone/glibc/strptime_l.c: In function `__strptime_internal':
../monotone/glibc/strptime_l.c:387: error: `locale' undeclared (first use in 
this function)
../monotone/glibc/strptime_l.c:387: error: (Each undeclared identifier is 
reported only once
../monotone/glibc/strptime_l.c:387: error: for each function it appears in.)
../monotone/glibc/strptime_l.c:781: error: structure has no member named 
`tm_gmtoff'
../monotone/glibc/strptime_l.c:783: error: structure has no member named 
`tm_gmtoff'
../monotone/glibc/strptime_l.c:783: error: structure has no member named 
`tm_gmtoff'
../monotone/glibc/strptime_l.c:1122: warning: assignment makes pointer from 
integer without a cast
../monotone/glibc/strptime_l.c:1126: error: dereferencing pointer to incomplete 
type
../monotone/glibc/strptime_l.c:1127: error: dereferencing pointer to incomplete 
type
../monotone/glibc/strptime_l.c:1128: error: dereferencing pointer to incomplete 
type
../monotone/glibc/strptime_l.c:1131: error: dereferencing pointer to incomplete 
type


These do _not_ look easy to fix.

So I'm looking at where strptime is used, to see what the impact of this is.

It's used in three places:

get_log_message_interactively, if date_fmt is not empty

status, to check that date_fmt is compatible with get_log_message_interactively

commit, to check that date_fmt is compatible with something (I'm not sure what)

date_fmt is set by the user, via a command line option or
hook_get_date_format_spec.

So this is in support of user-configurable date formats.

How important is that?

Perhaps we could simply say "user-configurable date formats not
available on Win32". I'm ok with that.

But it looks like some parts of monotone need to parse dates stored in
certs, which may be in some user-configurable format? That seems like a
bad idea in the first place (so I hope I'm wrong).

-- 
-- Stephe



reply via email to

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