public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* Re: Cygwin strptime() is missing "%s" which strftime() has
       [not found] ` <acc19ec5-055b-1bd4-997d-a247755163bf@SystematicSw.ab.ca>
@ 2017-07-24 20:42   ` Brian Inglis
  2017-07-24 21:36     ` Craig Howland
  2017-07-25  9:16     ` Corinna Vinschen
  0 siblings, 2 replies; 25+ messages in thread
From: Brian Inglis @ 2017-07-24 20:42 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 2234 bytes --]

On Mon, 24 Jul 2017 02:32:14 -0700, Corinna Vinschen wrote:> On Jul 23 22:07,
Brian Inglis wrote:
>> On 2017-07-23 20:09, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
>>>> But that's just scanning a decimal integer to time_t.
>>> 
>>> It's not a question of whether I can or can't convert a string into an 
>>> integer, rather it's a question about portability of code that uses %s for 
>>> both functions and expects it to work unchanged in the Cygwin environment.  
>>> Also, strptime() was designed to be a reversal to strftime() (from the 
>>> man-pages: the  strptime() function is the converse function to 
>>> strftime(3)) so both are supposed to "understand" the same basic set of 
>>> formats.  Because of Cygwin's strptime() missing "%s", the following also 
>>> does not work even from command line:
>>> 
>>> $ date +"%s" | strptime "%s"
>> 
>> Attached diff for proposed strptime %s and %F support.
>> Let me know if you would prefer a different approach before I submit a git
>> format-patch.

> Approach looks good, so please send the patch to the newlib mailing list
> with a nice log message.

Thinking just "add strptime %F %s support"; involved because I use date and
dateutils a lot in shell scripts; also hope this will also allow %F %s support
in dateutils strptime, which the OP just added to his cygwin posts.

> In fact, just send patches like these immediately in the right format to
> the right list.  Chances are good that the patch is taken without further
> ado and you skip the part where you have to send the patch twice :)

Darn, originated on cygwin list, forwarded to cygwin-patches, forgot this should
have gone to newlib list.

> In this case I have a nit, but this should be discussed on the right
> mailing list so all affected parties can chime in.  Hint: strtoimax is
> not available on all platforms yet (patches still in limbo)...

Figured there would need to be some tweaks for newlib platforms, compilers, and
style, so made some changes, attached another diff for discussion, before
submitting a patch.
Let me know if you want conditionals or declarations changed, hoisted to
function start, case braces removed, other issues?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

[-- Attachment #2: 0001-add-strptime-%s-%F.patch --]
[-- Type: text/plain, Size: 1497 bytes --]

diff --git a/newlib/libc/time/strptime.c b/newlib/libc/time/strptime.c
index c0861eb87..112227e40 100644
--- a/newlib/libc/time/strptime.c
+++ b/newlib/libc/time/strptime.c
@@ -38,6 +38,8 @@
 #include <strings.h>
 #include <ctype.h>
 #include <stdlib.h>
+#include <inttypes.h>
+#include <limits.h>
 #include "../locale/setlocale.h"
 
 #define _ctloc(x) (_CurrentTimeLocale->x)
@@ -230,6 +232,13 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
 		buf = s;
 		ymd |= SET_MDAY;
 		break;
+	    case 'F' :		/* %Y-%m-%d */
+		s = strptime_l (buf, "%Y-%m-%d", timeptr, locale);
+		if (s == NULL)
+		    return NULL;
+		buf = s;
+		ymd |= SET_YMD;
+		break;
 	    case 'H' :
 	    case 'k' :
 		ret = strtol_l (buf, &s, 10, locale);
@@ -300,6 +309,31 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
 		    return NULL;
 		buf = s;
 		break;
+	    case 's' : {
+#if defined(INTMAX_MAX)
+#  define BIG_T		intmax_t
+#  define STRTOBIG	strtoimax
+#elif defined(LLONG_MAX)
+#  define BIG_T		long long
+#  define STRTOBIG	strtoll
+#else
+#  define BIG_T		long
+#  define STRTOBIG	strtol
+#endif
+		    BIG_T sec;
+		    time_t t;
+
+		    sec = STRTOBIG (buf, &s, 10);
+		    t = (time_t)sec;
+		    if (s == buf
+			|| (BIG_T)t != sec
+			|| localtime_r (&t, timeptr) != timeptr)
+			return NULL;
+		    ;
+		    buf = s;
+		    ymd |= SET_YDAY | SET_WDAY | SET_YMD;
+		    break;
+		}
 	    case 'S' :
 		ret = strtol_l (buf, &s, 10, locale);
 		if (s == buf)

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-24 20:42   ` Cygwin strptime() is missing "%s" which strftime() has Brian Inglis
@ 2017-07-24 21:36     ` Craig Howland
  2017-07-24 23:04       ` Brian Inglis
  2017-07-25  9:19       ` Corinna Vinschen
  2017-07-25  9:16     ` Corinna Vinschen
  1 sibling, 2 replies; 25+ messages in thread
From: Craig Howland @ 2017-07-24 21:36 UTC (permalink / raw)
  To: newlib

On 07/24/2017 04:41 PM, Brian Inglis wrote:
> On Mon, 24 Jul 2017 02:32:14 -0700, Corinna Vinschen wrote:> On Jul 23 22:07,
> Brian Inglis wrote:
>>> On 2017-07-23 20:09, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
>>>>> But that's just scanning a decimal integer to time_t.
>>>> It's not a question of whether I can or can't convert a string into an
>>>> integer, rather it's a question about portability of code that uses %s for
>>>> both functions and expects it to work unchanged in the Cygwin environment.
>>>> Also, strptime() was designed to be a reversal to strftime() (from the
>>>> man-pages: the  strptime() function is the converse function to
>>>> strftime(3)) so both are supposed to "understand" the same basic set of
>>>> formats.  Because of Cygwin's strptime() missing "%s", the following also
>>>> does not work even from command line:
>>>>
>>>> $ date +"%s" | strptime "%s"
>>> Attached diff for proposed strptime %s and %F support.
>>> Let me know if you would prefer a different approach before I submit a git
>>> format-patch.
>> Approach looks good, so please send the patch to the newlib mailing list
>> with a nice log message.
> Thinking just "add strptime %F %s support"; involved because I use date and
> dateutils a lot in shell scripts; also hope this will also allow %F %s support
> in dateutils strptime, which the OP just added to his cygwin posts.
>
>> In fact, just send patches like these immediately in the right format to
>> the right list.  Chances are good that the patch is taken without further
>> ado and you skip the part where you have to send the patch twice :)
> Darn, originated on cygwin list, forwarded to cygwin-patches, forgot this should
> have gone to newlib list.
>
>> In this case I have a nit, but this should be discussed on the right
>> mailing list so all affected parties can chime in.  Hint: strtoimax is
>> not available on all platforms yet (patches still in limbo)...
> Figured there would need to be some tweaks for newlib platforms, compilers, and
> style, so made some changes, attached another diff for discussion, before
> submitting a patch.
> Let me know if you want conditionals or declarations changed, hoisted to
> function start, case braces removed, other issues?
>
Neither %F nor %s are defined for strptime() in POSIX, so they should not be 
expected to be portable.  (See 
http://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html) For 
that matter, %s is not defined for strftime(), either in POSIX or C99, even 
though it is in Newlib.  If either of these are added, they should have gates 
(or at the very least, comments) to show they are extensions.  (They appear to 
be GLIBC extensions, based on comments in the man page from a GLIBC-based system.)
Craig

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-24 21:36     ` Craig Howland
@ 2017-07-24 23:04       ` Brian Inglis
  2017-07-25  9:19       ` Corinna Vinschen
  1 sibling, 0 replies; 25+ messages in thread
From: Brian Inglis @ 2017-07-24 23:04 UTC (permalink / raw)
  To: newlib

On 2017-07-24 15:36, Craig Howland wrote:
> On 07/24/2017 04:41 PM, Brian Inglis wrote:
>> On Mon, 24 Jul 2017 02:32:14 -0700, Corinna Vinschen wrote:> On Jul 23 22:07,
>> Brian Inglis wrote:
>>>> On 2017-07-23 20:09, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
>>>>>> But that's just scanning a decimal integer to time_t.
>>>>> It's not a question of whether I can or can't convert a string into an
>>>>> integer, rather it's a question about portability of code that uses %s for
>>>>> both functions and expects it to work unchanged in the Cygwin environment.
>>>>> Also, strptime() was designed to be a reversal to strftime() (from the
>>>>> man-pages: the  strptime() function is the converse function to
>>>>> strftime(3)) so both are supposed to "understand" the same basic set of
>>>>> formats.  Because of Cygwin's strptime() missing "%s", the following also
>>>>> does not work even from command line:
>>>>>
>>>>> $ date +"%s" | strptime "%s"
>>>> Attached diff for proposed strptime %s and %F support.
>>>> Let me know if you would prefer a different approach before I submit a git
>>>> format-patch.
>>> Approach looks good, so please send the patch to the newlib mailing list
>>> with a nice log message.
>> Thinking just "add strptime %F %s support"; involved because I use date and
>> dateutils a lot in shell scripts; also hope this will also allow %F %s support
>> in dateutils strptime, which the OP just added to his cygwin posts.
>>
>>> In fact, just send patches like these immediately in the right format to
>>> the right list.  Chances are good that the patch is taken without further
>>> ado and you skip the part where you have to send the patch twice :)
>> Darn, originated on cygwin list, forwarded to cygwin-patches, forgot this should
>> have gone to newlib list.
>>
>>> In this case I have a nit, but this should be discussed on the right
>>> mailing list so all affected parties can chime in.  Hint: strtoimax is
>>> not available on all platforms yet (patches still in limbo)...
>> Figured there would need to be some tweaks for newlib platforms, compilers, and
>> style, so made some changes, attached another diff for discussion, before
>> submitting a patch.
>> Let me know if you want conditionals or declarations changed, hoisted to
>> function start, case braces removed, other issues?
>>
> Neither %F nor %s are defined for strptime() in POSIX, so they should not be
> expected to be portable.  (See
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html) For
> that matter, %s is not defined for strftime(), either in POSIX or C99, even
> though it is in Newlib.  If either of these are added, they should have gates
> (or at the very least, comments) to show they are extensions.  (They appear to
> be GLIBC extensions, based on comments in the man page from a GLIBC-based system.)

GNU extensions supported in coreutils date(1) and glibc strftime(3) and
strptime(3).
One of my follow ups is what do we want to do about documenting this support,
and the other GNU extensions in strptime(3), for newlib?
Currently Cygwin has its own strftime(3) man page (which needs updated to note
%s as a non-POSIX extension) but distributes only the strptime(3p) POSIX man page.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-24 20:42   ` Cygwin strptime() is missing "%s" which strftime() has Brian Inglis
  2017-07-24 21:36     ` Craig Howland
@ 2017-07-25  9:16     ` Corinna Vinschen
  2017-07-25 16:47       ` Brian Inglis
  1 sibling, 1 reply; 25+ messages in thread
From: Corinna Vinschen @ 2017-07-25  9:16 UTC (permalink / raw)
  To: newlib; +Cc: Brian.Inglis

[-- Attachment #1: Type: text/plain, Size: 2965 bytes --]

Hi Brian,

On Jul 24 14:41, Brian Inglis wrote:
> On Mon, 24 Jul 2017 02:32:14 -0700, Corinna Vinschen wrote:> On Jul 23 22:07,
> > In this case I have a nit, but this should be discussed on the right
> > mailing list so all affected parties can chime in.  Hint: strtoimax is
> > not available on all platforms yet (patches still in limbo)...
> 
> Figured there would need to be some tweaks for newlib platforms, compilers, and
> style, so made some changes, attached another diff for discussion, before
> submitting a patch.
> Let me know if you want conditionals or declarations changed, hoisted to
> function start, case braces removed, other issues?

See below.

> diff --git a/newlib/libc/time/strptime.c b/newlib/libc/time/strptime.c
> index c0861eb87..112227e40 100644
> --- a/newlib/libc/time/strptime.c
> +++ b/newlib/libc/time/strptime.c
> @@ -38,6 +38,8 @@
>  #include <strings.h>
>  #include <ctype.h>
>  #include <stdlib.h>
> +#include <inttypes.h>
> +#include <limits.h>
>  #include "../locale/setlocale.h"
>  
>  #define _ctloc(x) (_CurrentTimeLocale->x)
> @@ -230,6 +232,13 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
>  		buf = s;
>  		ymd |= SET_MDAY;
>  		break;
> +	    case 'F' :		/* %Y-%m-%d */
> +		s = strptime_l (buf, "%Y-%m-%d", timeptr, locale);
> +		if (s == NULL)
> +		    return NULL;
> +		buf = s;
> +		ymd |= SET_YMD;
> +		break;
>  	    case 'H' :
>  	    case 'k' :
>  		ret = strtol_l (buf, &s, 10, locale);
> @@ -300,6 +309,31 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
>  		    return NULL;
>  		buf = s;
>  		break;
> +	    case 's' : {
> +#if defined(INTMAX_MAX)
> +#  define BIG_T		intmax_t
> +#  define STRTOBIG	strtoimax
> +#elif defined(LLONG_MAX)
> +#  define BIG_T		long long
> +#  define STRTOBIG	strtoll
> +#else
> +#  define BIG_T		long
> +#  define STRTOBIG	strtol
> +#endif

I don't think we need to use intmax_t at all here.  Checking for
LLONG_MAX should be sufficient.  However, this is strptime_l.  so you
should use strtoll_l/strtol_l, just like the rest of the function.

On second thought, do we have to do this at all?  Our time_t is always
long anyway so using just strtol_l and checking for ERANGE should be
sufficient:

  int old_errno = _REENT->_errno;
  sec = strtol_l (buf, &s, 10);
  int new_errno = _REENT->_errno;
  _REENT->_errno = old_errno;
  if (s == buf || new_errno == ERANGE || etc...

> +		    BIG_T sec;
> +		    time_t t;
> +
> +		    sec = STRTOBIG (buf, &s, 10);
> +		    t = (time_t)sec;
> +		    if (s == buf
> +			|| (BIG_T)t != sec
> +			|| localtime_r (&t, timeptr) != timeptr)

Shouldn't this be gmtime_r?

 %s     The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000
	(UTC).  Leap seconds are not counted unless leap second  support
	is available.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-24 21:36     ` Craig Howland
  2017-07-24 23:04       ` Brian Inglis
@ 2017-07-25  9:19       ` Corinna Vinschen
  1 sibling, 0 replies; 25+ messages in thread
From: Corinna Vinschen @ 2017-07-25  9:19 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 3239 bytes --]

On Jul 24 17:36, Craig Howland wrote:
> On 07/24/2017 04:41 PM, Brian Inglis wrote:
> > On Mon, 24 Jul 2017 02:32:14 -0700, Corinna Vinschen wrote:> On Jul 23 22:07,
> > Brian Inglis wrote:
> > > > On 2017-07-23 20:09, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
> > > > > > But that's just scanning a decimal integer to time_t.
> > > > > It's not a question of whether I can or can't convert a string into an
> > > > > integer, rather it's a question about portability of code that uses %s for
> > > > > both functions and expects it to work unchanged in the Cygwin environment.
> > > > > Also, strptime() was designed to be a reversal to strftime() (from the
> > > > > man-pages: the  strptime() function is the converse function to
> > > > > strftime(3)) so both are supposed to "understand" the same basic set of
> > > > > formats.  Because of Cygwin's strptime() missing "%s", the following also
> > > > > does not work even from command line:
> > > > > 
> > > > > $ date +"%s" | strptime "%s"
> > > > Attached diff for proposed strptime %s and %F support.
> > > > Let me know if you would prefer a different approach before I submit a git
> > > > format-patch.
> > > Approach looks good, so please send the patch to the newlib mailing list
> > > with a nice log message.
> > Thinking just "add strptime %F %s support"; involved because I use date and
> > dateutils a lot in shell scripts; also hope this will also allow %F %s support
> > in dateutils strptime, which the OP just added to his cygwin posts.
> > 
> > > In fact, just send patches like these immediately in the right format to
> > > the right list.  Chances are good that the patch is taken without further
> > > ado and you skip the part where you have to send the patch twice :)
> > Darn, originated on cygwin list, forwarded to cygwin-patches, forgot this should
> > have gone to newlib list.
> > 
> > > In this case I have a nit, but this should be discussed on the right
> > > mailing list so all affected parties can chime in.  Hint: strtoimax is
> > > not available on all platforms yet (patches still in limbo)...
> > Figured there would need to be some tweaks for newlib platforms, compilers, and
> > style, so made some changes, attached another diff for discussion, before
> > submitting a patch.
> > Let me know if you want conditionals or declarations changed, hoisted to
> > function start, case braces removed, other issues?
> > 
> Neither %F nor %s are defined for strptime() in POSIX, so they should not be
> expected to be portable.  (See
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html) For
> that matter, %s is not defined for strftime(), either in POSIX or C99, even
> though it is in Newlib.  If either of these are added, they should have
> gates (or at the very least, comments) to show they are extensions.  (They
> appear to be GLIBC extensions, based on comments in the man page from a
> GLIBC-based system.)

Right, in theory.  Just a bit late in the game I guess.  We already
support %u, %V, %Z unconditionally.  I checked the FreeBSD code and
they don't even bother to add comments ¯\_(ツ)_/¯


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-25  9:16     ` Corinna Vinschen
@ 2017-07-25 16:47       ` Brian Inglis
  2017-07-25 17:38         ` Craig Howland
  2017-07-25 18:52         ` Corinna Vinschen
  0 siblings, 2 replies; 25+ messages in thread
From: Brian Inglis @ 2017-07-25 16:47 UTC (permalink / raw)
  To: newlib

On 2017-07-25 03:16, Corinna Vinschen wrote:
> Hi Brian,
> 
> On Jul 24 14:41, Brian Inglis wrote:
>> On Mon, 24 Jul 2017 02:32:14 -0700, Corinna Vinschen wrote:> On Jul 23 22:07,
>>> In this case I have a nit, but this should be discussed on the right
>>> mailing list so all affected parties can chime in.  Hint: strtoimax is
>>> not available on all platforms yet (patches still in limbo)...
>>
>> Figured there would need to be some tweaks for newlib platforms, compilers, and
>> style, so made some changes, attached another diff for discussion, before
>> submitting a patch.
>> Let me know if you want conditionals or declarations changed, hoisted to
>> function start, case braces removed, other issues?
> 
> See below.
> 
>> diff --git a/newlib/libc/time/strptime.c b/newlib/libc/time/strptime.c
>> index c0861eb87..112227e40 100644
>> --- a/newlib/libc/time/strptime.c
>> +++ b/newlib/libc/time/strptime.c
>> @@ -38,6 +38,8 @@
>>  #include <strings.h>
>>  #include <ctype.h>
>>  #include <stdlib.h>
>> +#include <inttypes.h>
>> +#include <limits.h>
>>  #include "../locale/setlocale.h"
>>  
>>  #define _ctloc(x) (_CurrentTimeLocale->x)
>> @@ -230,6 +232,13 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
>>  		buf = s;
>>  		ymd |= SET_MDAY;
>>  		break;
>> +	    case 'F' :		/* %Y-%m-%d */
>> +		s = strptime_l (buf, "%Y-%m-%d", timeptr, locale);
>> +		if (s == NULL)
>> +		    return NULL;
>> +		buf = s;
>> +		ymd |= SET_YMD;
>> +		break;
>>  	    case 'H' :
>>  	    case 'k' :
>>  		ret = strtol_l (buf, &s, 10, locale);
>> @@ -300,6 +309,31 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
>>  		    return NULL;
>>  		buf = s;
>>  		break;
>> +	    case 's' : {
>> +#if defined(INTMAX_MAX)
>> +#  define BIG_T		intmax_t
>> +#  define STRTOBIG	strtoimax
>> +#elif defined(LLONG_MAX)
>> +#  define BIG_T		long long
>> +#  define STRTOBIG	strtoll
>> +#else
>> +#  define BIG_T		long
>> +#  define STRTOBIG	strtol
>> +#endif
> 
> I don't think we need to use intmax_t at all here.  Checking for
> LLONG_MAX should be sufficient.  However, this is strptime_l.  so you
> should use strtoll_l/strtol_l, just like the rest of the function.
> 
> On second thought, do we have to do this at all?  Our time_t is always
> long anyway so using just strtol_l and checking for ERANGE should be
> sufficient:
> 
>   int old_errno = _REENT->_errno;
>   sec = strtol_l (buf, &s, 10);
>   int new_errno = _REENT->_errno;
>   _REENT->_errno = old_errno;
>   if (s == buf || new_errno == ERANGE || etc...
> 
>> +		    BIG_T sec;
>> +		    time_t t;
>> +
>> +		    sec = STRTOBIG (buf, &s, 10);
>> +		    t = (time_t)sec;
>> +		    if (s == buf
>> +			|| (BIG_T)t != sec
>> +			|| localtime_r (&t, timeptr) != timeptr)

Is time_t always long on all newlib platforms, or could it be long long in some
environments/memory models e.g. Windows 64 VS/MinGW LLP64/IL32P64 vs Cygwin/Unix
LP64/I32LP64?
Could/should we keep the strtol[l] options and use the ..._l variants?

Can't we just use errno, as shouldn't that be mapped to _REENT->_errno in this
context if required, or can it/does it need to be explicit?
These are locale-dependent ..._l functions not reentrant ..._r functions, and
there is no "#include <reent.h>"?

Don't we need to save and zero errno to distinguish a new error, and restore if
it stays zero, rather than just pick up the current value, and assume if it
is/was ERANGE it's bad?

> Shouldn't this be gmtime_r?
> 
>  %s     The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000
> 	(UTC).  Leap seconds are not counted unless leap second  support
> 	is available.

The input is seconds since the epoch, but the interpretation in struct tm
depends on the locale, so we use localtime_r(3).
The timezone may be set in the environment or locale, and may be UTC.
If you want gmtime/UTC you set TZ=UTC0, TZ=Etc/UTC, which should override/change
locale LC_TIME, as would setting %z with value +0000 or %Z with values UTC or Z,
where that is supported by strptime_l(3) (i.e. not here).

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-25 16:47       ` Brian Inglis
@ 2017-07-25 17:38         ` Craig Howland
  2017-07-25 18:52         ` Corinna Vinschen
  1 sibling, 0 replies; 25+ messages in thread
From: Craig Howland @ 2017-07-25 17:38 UTC (permalink / raw)
  To: newlib

On 07/25/2017 12:47 PM, Brian Inglis wrote:
> Don't we need to save and zero errno to distinguish a new error, and restore if
> it stays zero, rather than just pick up the current value, and assume if it
> is/was ERANGE it's bad?
      Yes, it needs to be set to 0 before calling strtol_l.
      POSIX does not define any errors for strptime().  Therefore by general 
rule it is permitted for it to set errno to be non-0. However, it is just as 
easy to always restore it instead of checking for non-0 (why add the check?).  
Always restoring also indirectly conveys the intent that strptime() is not 
required to set errno, that no errors are defined for it.

On 07/25/2017 05:19 AM, Corinna Vinschen wrote:
>> Neither %F nor %s are defined for strptime() in POSIX, so they should not be
>> expected to be portable.  (See
>> http://pubs.opengroup.org/onlinepubs/9699919799/functions/strptime.html) For
>> that matter, %s is not defined for strftime(), either in POSIX or C99, even
>> though it is in Newlib.  If either of these are added, they should have
>> gates (or at the very least, comments) to show they are extensions.  (They
>> appear to be GLIBC extensions, based on comments in the man page from a
>> GLIBC-based system.)
> Right, in theory.  Just a bit late in the game I guess.  We already
> support %u, %V, %Z unconditionally.  I checked the FreeBSD code and
> they don't even bother to add comments ¯\_(ツ)_/¯
Not having done it right earlier is not a good reason to not do it better going 
forward.  That said, OK, no compile-time gate since the other things are 
hard-coded, but let's at least have comments that they are extensions:

+	    case 'F' :		/* %Y-%m-%d (GNU extension) */
+	    case 's' : {	/* (GNU extension) */


Craig

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-25 16:47       ` Brian Inglis
  2017-07-25 17:38         ` Craig Howland
@ 2017-07-25 18:52         ` Corinna Vinschen
  2017-07-25 20:13           ` Brian Inglis
  1 sibling, 1 reply; 25+ messages in thread
From: Corinna Vinschen @ 2017-07-25 18:52 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 3803 bytes --]

On Jul 25 10:47, Brian Inglis wrote:
> On 2017-07-25 03:16, Corinna Vinschen wrote:
> > Hi Brian,
> > 
> > On Jul 24 14:41, Brian Inglis wrote:
> >> On Mon, 24 Jul 2017 02:32:14 -0700, Corinna Vinschen wrote:> On Jul 23 22:07,
> >>> In this case I have a nit, but this should be discussed on the right
> >>> mailing list so all affected parties can chime in.  Hint: strtoimax is
> >>> not available on all platforms yet (patches still in limbo)...
> >>
> >> Figured there would need to be some tweaks for newlib platforms, compilers, and
> >> style, so made some changes, attached another diff for discussion, before
> >> submitting a patch.
> >> Let me know if you want conditionals or declarations changed, hoisted to
> >> function start, case braces removed, other issues?
> > [...]
> >> +	    case 's' : {
> >> +#if defined(INTMAX_MAX)
> >> +#  define BIG_T		intmax_t
> >> +#  define STRTOBIG	strtoimax
> >> +#elif defined(LLONG_MAX)
> >> +#  define BIG_T		long long
> >> +#  define STRTOBIG	strtoll
> >> +#else
> >> +#  define BIG_T		long
> >> +#  define STRTOBIG	strtol
> >> +#endif
> > 
> > I don't think we need to use intmax_t at all here.  Checking for
> > LLONG_MAX should be sufficient.  However, this is strptime_l.  so you
> > should use strtoll_l/strtol_l, just like the rest of the function.
> > 
> > On second thought, do we have to do this at all?  Our time_t is always
> > long anyway so using just strtol_l and checking for ERANGE should be
> > sufficient:
> > 
> >   int old_errno = _REENT->_errno;
> >   sec = strtol_l (buf, &s, 10);
> >   int new_errno = _REENT->_errno;
> >   _REENT->_errno = old_errno;
> >   if (s == buf || new_errno == ERANGE || etc...
> > 
> >> +		    BIG_T sec;
> >> +		    time_t t;
> >> +
> >> +		    sec = STRTOBIG (buf, &s, 10);
> >> +		    t = (time_t)sec;
> >> +		    if (s == buf
> >> +			|| (BIG_T)t != sec
> >> +			|| localtime_r (&t, timeptr) != timeptr)
> 
> Is time_t always long on all newlib platforms, or could it be long
> long in some environments/memory models e.g. Windows 64 VS/MinGW
> LLP64/IL32P64 vs Cygwin/Unix LP64/I32LP64?  Could/should we keep the
> strtol[l] options and use the ..._l variants?

Well... on *third* thought, targets may redefine time_t via redefining
_TIME_T_.  Targets not doing that will get long, so yeah, you're right.
Maybe it is safer to use always strtoll_l and just break this down to
time_t on the way.

> Can't we just use errno, as shouldn't that be mapped to _REENT->_errno
> in this context if required, or can it/does it need to be explicit?
> These are locale-dependent ..._l functions not reentrant ..._r
> functions, and there is no "#include <reent.h>"?

No, I was just trying to be thorough.  errno is fine, just include
errno.h.

> Don't we need to save and zero errno to distinguish a new error, and
> restore if it stays zero, rather than just pick up the current value,
> and assume if it is/was ERANGE it's bad?

Right, I forget that when I typed the above.

> > Shouldn't this be gmtime_r?
> > 
> >  %s     The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000
> > 	(UTC).  Leap seconds are not counted unless leap second  support
> > 	is available.
> 
> The input is seconds since the epoch, but the interpretation in struct
> tm depends on the locale, so we use localtime_r(3).  The timezone may
> be set in the environment or locale, and may be UTC.  If you want
> gmtime/UTC you set TZ=UTC0, TZ=Etc/UTC, which should override/change
> locale LC_TIME, as would setting %z with value +0000 or %Z with values
> UTC or Z, where that is supported by strptime_l(3) (i.e. not here).

Hmm, yes, ok, that makes sense.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-25 18:52         ` Corinna Vinschen
@ 2017-07-25 20:13           ` Brian Inglis
  2017-07-26 10:49             ` Corinna Vinschen
  0 siblings, 1 reply; 25+ messages in thread
From: Brian Inglis @ 2017-07-25 20:13 UTC (permalink / raw)
  To: newlib

On 2017-07-25 12:52, Corinna Vinschen wrote:
> On Jul 25 10:47, Brian Inglis wrote:
>> On 2017-07-25 03:16, Corinna Vinschen wrote:
>>> On Jul 24 14:41, Brian Inglis wrote:
>>>> On Mon, 24 Jul 2017 02:32:14 -0700, Corinna Vinschen wrote:> On Jul 23 22:07,
>>>>> In this case I have a nit, but this should be discussed on the right
>>>>> mailing list so all affected parties can chime in.  Hint: strtoimax is
>>>>> not available on all platforms yet (patches still in limbo)...
>>>>
>>>> Figured there would need to be some tweaks for newlib platforms, compilers, and
>>>> style, so made some changes, attached another diff for discussion, before
>>>> submitting a patch.
>>>> Let me know if you want conditionals or declarations changed, hoisted to
>>>> function start, case braces removed, other issues?
>>> [...]
>>>> +	    case 's' : {
>>>> +#if defined(INTMAX_MAX)
>>>> +#  define BIG_T		intmax_t
>>>> +#  define STRTOBIG	strtoimax
>>>> +#elif defined(LLONG_MAX)
>>>> +#  define BIG_T		long long
>>>> +#  define STRTOBIG	strtoll
>>>> +#else
>>>> +#  define BIG_T		long
>>>> +#  define STRTOBIG	strtol
>>>> +#endif
>>>
>>> I don't think we need to use intmax_t at all here.  Checking for
>>> LLONG_MAX should be sufficient.  However, this is strptime_l.  so you
>>> should use strtoll_l/strtol_l, just like the rest of the function.
>>>
>>> On second thought, do we have to do this at all?  Our time_t is always
>>> long anyway so using just strtol_l and checking for ERANGE should be
>>> sufficient:
>>>
>>>   int old_errno = _REENT->_errno;
>>>   sec = strtol_l (buf, &s, 10);
>>>   int new_errno = _REENT->_errno;
>>>   _REENT->_errno = old_errno;
>>>   if (s == buf || new_errno == ERANGE || etc...
>>>
>>>> +		    BIG_T sec;
>>>> +		    time_t t;
>>>> +
>>>> +		    sec = STRTOBIG (buf, &s, 10);
>>>> +		    t = (time_t)sec;
>>>> +		    if (s == buf
>>>> +			|| (BIG_T)t != sec
>>>> +			|| localtime_r (&t, timeptr) != timeptr)
>>
>> Is time_t always long on all newlib platforms, or could it be long
>> long in some environments/memory models e.g. Windows 64 VS/MinGW
>> LLP64/IL32P64 vs Cygwin/Unix LP64/I32LP64?  Could/should we keep the
>> strtol[l] options and use the ..._l variants?
> 
> Well... on *third* thought, targets may redefine time_t via redefining
> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
> Maybe it is safer to use always strtoll_l and just break this down to
> time_t on the way.

My concern has always been do all newlib RTEMS targets support long long, even
if same as long, and stroll_l?

>> Can't we just use errno, as shouldn't that be mapped to _REENT->_errno
>> in this context if required, or can it/does it need to be explicit?
>> These are locale-dependent ..._l functions not reentrant ..._r
>> functions, and there is no "#include <reent.h>"?
> 
> No, I was just trying to be thorough.  errno is fine, just include
> errno.h.
> 
>> Don't we need to save and zero errno to distinguish a new error, and
>> restore if it stays zero, rather than just pick up the current value,
>> and assume if it is/was ERANGE it's bad?
> 
> Right, I forget that when I typed the above.
> 
>>> Shouldn't this be gmtime_r?
>>>
>>>  %s     The number of seconds since the Epoch, 1970-01-01 00:00:00 +0000
>>> 	(UTC).  Leap seconds are not counted unless leap second  support
>>> 	is available.
>>
>> The input is seconds since the epoch, but the interpretation in struct
>> tm depends on the locale, so we use localtime_r(3).  The timezone may
>> be set in the environment or locale, and may be UTC.  If you want
>> gmtime/UTC you set TZ=UTC0, TZ=Etc/UTC, which should override/change
>> locale LC_TIME, as would setting %z with value +0000 or %Z with values
>> UTC or Z, where that is supported by strptime_l(3) (i.e. not here).
> 
> Hmm, yes, ok, that makes sense.

K will change and check and format-patch.

Trying to build standalone or combined STC for this with changed strptime.c
ld/collect2 fails to resolve ...global_locale.
Of course STC alone builds and fails properly with current release.
Is there anything I can include or add somewhere to get this to build - recent
dev snapshot maybe?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-25 20:13           ` Brian Inglis
@ 2017-07-26 10:49             ` Corinna Vinschen
  2017-07-26 17:27               ` Brian Inglis
  0 siblings, 1 reply; 25+ messages in thread
From: Corinna Vinschen @ 2017-07-26 10:49 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 2176 bytes --]

On Jul 25 14:13, Brian Inglis wrote:
> On 2017-07-25 12:52, Corinna Vinschen wrote:
> > On Jul 25 10:47, Brian Inglis wrote:
> >> On 2017-07-25 03:16, Corinna Vinschen wrote:
> >>> [...]
> >>> I don't think we need to use intmax_t at all here.  Checking for
> >>> LLONG_MAX should be sufficient.  However, this is strptime_l.  so you
> >>> should use strtoll_l/strtol_l, just like the rest of the function.
> >>>
> >>> On second thought, do we have to do this at all?  Our time_t is always
> >>> long anyway so using just strtol_l and checking for ERANGE should be
> >>> sufficient:
> >>>
> >>>   int old_errno = _REENT->_errno;
> >>>   sec = strtol_l (buf, &s, 10);
> >>>   int new_errno = _REENT->_errno;
> >>>   _REENT->_errno = old_errno;
> >>>   if (s == buf || new_errno == ERANGE || etc...
> >>>
> >>>> +		    BIG_T sec;
> >>>> +		    time_t t;
> >>>> +
> >>>> +		    sec = STRTOBIG (buf, &s, 10);
> >>>> +		    t = (time_t)sec;
> >>>> +		    if (s == buf
> >>>> +			|| (BIG_T)t != sec
> >>>> +			|| localtime_r (&t, timeptr) != timeptr)
> >>
> >> Is time_t always long on all newlib platforms, or could it be long
> >> long in some environments/memory models e.g. Windows 64 VS/MinGW
> >> LLP64/IL32P64 vs Cygwin/Unix LP64/I32LP64?  Could/should we keep the
> >> strtol[l] options and use the ..._l variants?
> > 
> > Well... on *third* thought, targets may redefine time_t via redefining
> > _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
> > Maybe it is safer to use always strtoll_l and just break this down to
> > time_t on the way.
> 
> My concern has always been do all newlib RTEMS targets support long
> long, even if same as long, and stroll_l?

Yes.  The long long functions are not excluded like we do with long
double stuff.

> Trying to build standalone or combined STC for this with changed strptime.c
> ld/collect2 fails to resolve ...global_locale.

Yeah, it's an internal function to newlib.  You need to include
libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
userspace will do.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-26 10:49             ` Corinna Vinschen
@ 2017-07-26 17:27               ` Brian Inglis
  2017-07-26 19:34                 ` Corinna Vinschen
  0 siblings, 1 reply; 25+ messages in thread
From: Brian Inglis @ 2017-07-26 17:27 UTC (permalink / raw)
  To: newlib

On 2017-07-26 04:49, Corinna Vinschen wrote:
> On Jul 25 14:13, Brian Inglis wrote:
>> On 2017-07-25 12:52, Corinna Vinschen wrote:
>>> On Jul 25 10:47, Brian Inglis wrote:
>>>> On 2017-07-25 03:16, Corinna Vinschen wrote:
>>>>> [...]
>>>>> I don't think we need to use intmax_t at all here.  Checking for
>>>>> LLONG_MAX should be sufficient.  However, this is strptime_l.  so you
>>>>> should use strtoll_l/strtol_l, just like the rest of the function.
>>>>>
>>>>> On second thought, do we have to do this at all?  Our time_t is always
>>>>> long anyway so using just strtol_l and checking for ERANGE should be
>>>>> sufficient:
>>>>>
>>>>>   int old_errno = _REENT->_errno;
>>>>>   sec = strtol_l (buf, &s, 10);
>>>>>   int new_errno = _REENT->_errno;
>>>>>   _REENT->_errno = old_errno;
>>>>>   if (s == buf || new_errno == ERANGE || etc...
>>>>>
>>>>>> +		    BIG_T sec;
>>>>>> +		    time_t t;
>>>>>> +
>>>>>> +		    sec = STRTOBIG (buf, &s, 10);
>>>>>> +		    t = (time_t)sec;
>>>>>> +		    if (s == buf
>>>>>> +			|| (BIG_T)t != sec
>>>>>> +			|| localtime_r (&t, timeptr) != timeptr)
>>>>
>>>> Is time_t always long on all newlib platforms, or could it be long
>>>> long in some environments/memory models e.g. Windows 64 VS/MinGW
>>>> LLP64/IL32P64 vs Cygwin/Unix LP64/I32LP64?  Could/should we keep the
>>>> strtol[l] options and use the ..._l variants?
>>>
>>> Well... on *third* thought, targets may redefine time_t via redefining
>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
>>> Maybe it is safer to use always strtoll_l and just break this down to
>>> time_t on the way.
>>
>> My concern has always been do all newlib RTEMS targets support long
>> long, even if same as long, and stroll_l?
> 
> Yes.  The long long functions are not excluded like we do with long
> double stuff.
> 
>> Trying to build standalone or combined STC for this with changed strptime.c
>> ld/collect2 fails to resolve ...global_locale.
> 
> Yeah, it's an internal function to newlib.  You need to include
> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
> userspace will do.

Not doing it for me: that's why I asked if there were undistributed locale
changes in the tree, and maybe in a dev snapshot?

$ gcc -Wall -Wextra -o strptime_test -I newlib-cygwin/newlib/libc/locale/
strptime_test.c newlib-cygwin/newlib/libc/time/strptime.c
/tmp/ccbcaAPQ.o:strptime.c:(.rdata$.refptr.__global_locale[.refptr.__global_locale]+0x0):
undefined reference to `__global_locale'
collect2: error: ld returned 1 exit status

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-26 17:27               ` Brian Inglis
@ 2017-07-26 19:34                 ` Corinna Vinschen
  2017-07-28 20:50                   ` Brian Inglis
  0 siblings, 1 reply; 25+ messages in thread
From: Corinna Vinschen @ 2017-07-26 19:34 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 2836 bytes --]

On Jul 26 11:27, Brian Inglis wrote:
> On 2017-07-26 04:49, Corinna Vinschen wrote:
> > On Jul 25 14:13, Brian Inglis wrote:
> >> On 2017-07-25 12:52, Corinna Vinschen wrote:
> >>> On Jul 25 10:47, Brian Inglis wrote:
> >>>> On 2017-07-25 03:16, Corinna Vinschen wrote:
> >>>>> [...]
> >>>>> I don't think we need to use intmax_t at all here.  Checking for
> >>>>> LLONG_MAX should be sufficient.  However, this is strptime_l.  so you
> >>>>> should use strtoll_l/strtol_l, just like the rest of the function.
> >>>>>
> >>>>> On second thought, do we have to do this at all?  Our time_t is always
> >>>>> long anyway so using just strtol_l and checking for ERANGE should be
> >>>>> sufficient:
> >>>>>
> >>>>>   int old_errno = _REENT->_errno;
> >>>>>   sec = strtol_l (buf, &s, 10);
> >>>>>   int new_errno = _REENT->_errno;
> >>>>>   _REENT->_errno = old_errno;
> >>>>>   if (s == buf || new_errno == ERANGE || etc...
> >>>>>
> >>>>>> +		    BIG_T sec;
> >>>>>> +		    time_t t;
> >>>>>> +
> >>>>>> +		    sec = STRTOBIG (buf, &s, 10);
> >>>>>> +		    t = (time_t)sec;
> >>>>>> +		    if (s == buf
> >>>>>> +			|| (BIG_T)t != sec
> >>>>>> +			|| localtime_r (&t, timeptr) != timeptr)
> >>>>
> >>>> Is time_t always long on all newlib platforms, or could it be long
> >>>> long in some environments/memory models e.g. Windows 64 VS/MinGW
> >>>> LLP64/IL32P64 vs Cygwin/Unix LP64/I32LP64?  Could/should we keep the
> >>>> strtol[l] options and use the ..._l variants?
> >>>
> >>> Well... on *third* thought, targets may redefine time_t via redefining
> >>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
> >>> Maybe it is safer to use always strtoll_l and just break this down to
> >>> time_t on the way.
> >>
> >> My concern has always been do all newlib RTEMS targets support long
> >> long, even if same as long, and stroll_l?
> > 
> > Yes.  The long long functions are not excluded like we do with long
> > double stuff.
> > 
> >> Trying to build standalone or combined STC for this with changed strptime.c
> >> ld/collect2 fails to resolve ...global_locale.
> > 
> > Yeah, it's an internal function to newlib.  You need to include
> > libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
> > userspace will do.
> 
> Not doing it for me: that's why I asked if there were undistributed locale
> changes in the tree, and maybe in a dev snapshot?

No, it's an *internal* function, it doesn't get exported.  There's no
(easy) way to build strptime.c outside the newlib tree as part of the
lib.  That's why I said a userspace STC is enough.  Don't try to build
strptime.c as standalone.  Just build it as part of newlib/Cygwin and
test it from userspace by calling it.


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-26 19:34                 ` Corinna Vinschen
@ 2017-07-28 20:50                   ` Brian Inglis
  2017-07-31  9:55                     ` Corinna Vinschen
  0 siblings, 1 reply; 25+ messages in thread
From: Brian Inglis @ 2017-07-28 20:50 UTC (permalink / raw)
  To: newlib

On 2017-07-26 13:34, Corinna Vinschen wrote:
> On Jul 26 11:27, Brian Inglis wrote:
>> On 2017-07-26 04:49, Corinna Vinschen wrote:
>>> On Jul 25 14:13, Brian Inglis wrote:
>>>> On 2017-07-25 12:52, Corinna Vinschen wrote:
>>>>> On Jul 25 10:47, Brian Inglis wrote:
>>>>>> On 2017-07-25 03:16, Corinna Vinschen wrote:
>>>>>>> [...]
>>>>>>> I don't think we need to use intmax_t at all here.  Checking for
>>>>>>> LLONG_MAX should be sufficient.  However, this is strptime_l.  so you
>>>>>>> should use strtoll_l/strtol_l, just like the rest of the function.
>>>>>>>
>>>>>>> On second thought, do we have to do this at all?  Our time_t is always
>>>>>>> long anyway so using just strtol_l and checking for ERANGE should be
>>>>>>> sufficient:
>>>>>>>
>>>>>>>   int old_errno = _REENT->_errno;
>>>>>>>   sec = strtol_l (buf, &s, 10);
>>>>>>>   int new_errno = _REENT->_errno;
>>>>>>>   _REENT->_errno = old_errno;
>>>>>>>   if (s == buf || new_errno == ERANGE || etc...
>>>>>>>
>>>>>>>> +		    BIG_T sec;
>>>>>>>> +		    time_t t;
>>>>>>>> +
>>>>>>>> +		    sec = STRTOBIG (buf, &s, 10);
>>>>>>>> +		    t = (time_t)sec;
>>>>>>>> +		    if (s == buf
>>>>>>>> +			|| (BIG_T)t != sec
>>>>>>>> +			|| localtime_r (&t, timeptr) != timeptr)
>>>>>>
>>>>>> Is time_t always long on all newlib platforms, or could it be long
>>>>>> long in some environments/memory models e.g. Windows 64 VS/MinGW
>>>>>> LLP64/IL32P64 vs Cygwin/Unix LP64/I32LP64?  Could/should we keep the
>>>>>> strtol[l] options and use the ..._l variants?
>>>>>
>>>>> Well... on *third* thought, targets may redefine time_t via redefining
>>>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
>>>>> Maybe it is safer to use always strtoll_l and just break this down to
>>>>> time_t on the way.
>>>>
>>>> My concern has always been do all newlib RTEMS targets support long
>>>> long, even if same as long, and stroll_l?
>>>
>>> Yes.  The long long functions are not excluded like we do with long
>>> double stuff.
>>>
>>>> Trying to build standalone or combined STC for this with changed strptime.c
>>>> ld/collect2 fails to resolve ...global_locale.
>>>
>>> Yeah, it's an internal function to newlib.  You need to include
>>> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
>>> userspace will do.
>>
>> Not doing it for me: that's why I asked if there were undistributed locale
>> changes in the tree, and maybe in a dev snapshot?
> 
> No, it's an *internal* function, it doesn't get exported.  There's no
> (easy) way to build strptime.c outside the newlib tree as part of the
> lib.  That's why I said a userspace STC is enough.  Don't try to build
> strptime.c as standalone.  Just build it as part of newlib/Cygwin and
> test it from userspace by calling it.

Finally got all the prereqs installed and a clean build.
My configure uses the default prefix /usr/local, which is at the head of my
personal path.
Is that enough for a test build, and how do I do that, or do I have to replace
the current release, with configure --prefix=/, make install into /bin/?

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-28 20:50                   ` Brian Inglis
@ 2017-07-31  9:55                     ` Corinna Vinschen
  2017-08-18 18:53                       ` Corinna Vinschen
                                         ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Corinna Vinschen @ 2017-07-31  9:55 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 2214 bytes --]

On Jul 28 14:50, Brian Inglis wrote:
> On 2017-07-26 13:34, Corinna Vinschen wrote:
> > On Jul 26 11:27, Brian Inglis wrote:
> >> On 2017-07-26 04:49, Corinna Vinschen wrote:
> >>> On Jul 25 14:13, Brian Inglis wrote:
> >>>> On 2017-07-25 12:52, Corinna Vinschen wrote:
> >>>>> Well... on *third* thought, targets may redefine time_t via redefining
> >>>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
> >>>>> Maybe it is safer to use always strtoll_l and just break this down to
> >>>>> time_t on the way.
> >>>>
> >>>> My concern has always been do all newlib RTEMS targets support long
> >>>> long, even if same as long, and stroll_l?
> >>>
> >>> Yes.  The long long functions are not excluded like we do with long
> >>> double stuff.
> >>>
> >>>> Trying to build standalone or combined STC for this with changed strptime.c
> >>>> ld/collect2 fails to resolve ...global_locale.
> >>>
> >>> Yeah, it's an internal function to newlib.  You need to include
> >>> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
> >>> userspace will do.
> >>
> >> Not doing it for me: that's why I asked if there were undistributed locale
> >> changes in the tree, and maybe in a dev snapshot?
> > 
> > No, it's an *internal* function, it doesn't get exported.  There's no
> > (easy) way to build strptime.c outside the newlib tree as part of the
> > lib.  That's why I said a userspace STC is enough.  Don't try to build
> > strptime.c as standalone.  Just build it as part of newlib/Cygwin and
> > test it from userspace by calling it.
> 
> Finally got all the prereqs installed and a clean build.
> My configure uses the default prefix /usr/local, which is at the head of my
> personal path.
> Is that enough for a test build, and how do I do that, or do I have to replace
> the current release, with configure --prefix=/, make install into /bin/?

The configured paths don't matter for the Cygwin DLL itself, and your
patch doesn't change any headers or entry points of the lib.  So just exit
from Cygwin, replace the DLL in Explorer, start a shell and go ahead.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-31  9:55                     ` Corinna Vinschen
@ 2017-08-18 18:53                       ` Corinna Vinschen
  2017-08-18 19:38                         ` Brian Inglis
  2017-08-18 19:38                       ` Brian Inglis
                                         ` (2 subsequent siblings)
  3 siblings, 1 reply; 25+ messages in thread
From: Corinna Vinschen @ 2017-08-18 18:53 UTC (permalink / raw)
  To: Brian Inglis; +Cc: newlib

[-- Attachment #1: Type: text/plain, Size: 2379 bytes --]

Hi Brian,

On Jul 31 11:55, Corinna Vinschen wrote:
> On Jul 28 14:50, Brian Inglis wrote:
> > On 2017-07-26 13:34, Corinna Vinschen wrote:
> > > On Jul 26 11:27, Brian Inglis wrote:
> > >> On 2017-07-26 04:49, Corinna Vinschen wrote:
> > >>> On Jul 25 14:13, Brian Inglis wrote:
> > >>>> On 2017-07-25 12:52, Corinna Vinschen wrote:
> > >>>>> Well... on *third* thought, targets may redefine time_t via redefining
> > >>>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
> > >>>>> Maybe it is safer to use always strtoll_l and just break this down to
> > >>>>> time_t on the way.
> > >>>>
> > >>>> My concern has always been do all newlib RTEMS targets support long
> > >>>> long, even if same as long, and stroll_l?
> > >>>
> > >>> Yes.  The long long functions are not excluded like we do with long
> > >>> double stuff.
> > >>>
> > >>>> Trying to build standalone or combined STC for this with changed strptime.c
> > >>>> ld/collect2 fails to resolve ...global_locale.
> > >>>
> > >>> Yeah, it's an internal function to newlib.  You need to include
> > >>> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
> > >>> userspace will do.
> > >>
> > >> Not doing it for me: that's why I asked if there were undistributed locale
> > >> changes in the tree, and maybe in a dev snapshot?
> > > 
> > > No, it's an *internal* function, it doesn't get exported.  There's no
> > > (easy) way to build strptime.c outside the newlib tree as part of the
> > > lib.  That's why I said a userspace STC is enough.  Don't try to build
> > > strptime.c as standalone.  Just build it as part of newlib/Cygwin and
> > > test it from userspace by calling it.
> > 
> > Finally got all the prereqs installed and a clean build.
> > My configure uses the default prefix /usr/local, which is at the head of my
> > personal path.
> > Is that enough for a test build, and how do I do that, or do I have to replace
> > the current release, with configure --prefix=/, make install into /bin/?
> 
> The configured paths don't matter for the Cygwin DLL itself, and your
> patch doesn't change any headers or entry points of the lib.  So just exit
> from Cygwin, replace the DLL in Explorer, start a shell and go ahead.

any news on the patch?


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-31  9:55                     ` Corinna Vinschen
  2017-08-18 18:53                       ` Corinna Vinschen
@ 2017-08-18 19:38                       ` Brian Inglis
  2017-08-18 20:01                       ` Brian Inglis
  2017-08-19 14:01                       ` Brian Inglis
  3 siblings, 0 replies; 25+ messages in thread
From: Brian Inglis @ 2017-08-18 19:38 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 2426 bytes --]

On 2017-07-31 03:55, Corinna Vinschen wrote:
> On Jul 28 14:50, Brian Inglis wrote:
>> On 2017-07-26 13:34, Corinna Vinschen wrote:
>>> On Jul 26 11:27, Brian Inglis wrote:
>>>> On 2017-07-26 04:49, Corinna Vinschen wrote:
>>>>> On Jul 25 14:13, Brian Inglis wrote:
>>>>>> On 2017-07-25 12:52, Corinna Vinschen wrote:
>>>>>>> Well... on *third* thought, targets may redefine time_t via redefining
>>>>>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
>>>>>>> Maybe it is safer to use always strtoll_l and just break this down to
>>>>>>> time_t on the way.
>>>>>>
>>>>>> My concern has always been do all newlib RTEMS targets support long
>>>>>> long, even if same as long, and stroll_l?
>>>>>
>>>>> Yes.  The long long functions are not excluded like we do with long
>>>>> double stuff.
>>>>>
>>>>>> Trying to build standalone or combined STC for this with changed strptime.c
>>>>>> ld/collect2 fails to resolve ...global_locale.
>>>>>
>>>>> Yeah, it's an internal function to newlib.  You need to include
>>>>> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
>>>>> userspace will do.
>>>>
>>>> Not doing it for me: that's why I asked if there were undistributed locale
>>>> changes in the tree, and maybe in a dev snapshot?
>>>
>>> No, it's an *internal* function, it doesn't get exported.  There's no
>>> (easy) way to build strptime.c outside the newlib tree as part of the
>>> lib.  That's why I said a userspace STC is enough.  Don't try to build
>>> strptime.c as standalone.  Just build it as part of newlib/Cygwin and
>>> test it from userspace by calling it.
>>
>> Finally got all the prereqs installed and a clean build.
>> My configure uses the default prefix /usr/local, which is at the head of my
>> personal path.
>> Is that enough for a test build, and how do I do that, or do I have to replace
>> the current release, with configure --prefix=/, make install into /bin/?
> 
> The configured paths don't matter for the Cygwin DLL itself, and your
> patch doesn't change any headers or entry points of the lib.  So just exit
> from Cygwin, replace the DLL in Explorer, start a shell and go ahead.

Test still won't run as expected after DLL replacement, nor coreutils strptime.
Aren't there lib import files or maps or anything I also have to move?
Attached slightly redacted build config and make logs.

This wasn't getting thru so trying one attachment at a time.

[-- Attachment #2: config.log --]
[-- Type: text/plain, Size: 28444 bytes --]

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  $ ./configure 

## --------- ##
## Platform. ##
## --------- ##

hostname = XXXxxxxxxX
uname -m = x86_64
uname -r = 2.8.2(0.312/5/3)
uname -s = CYGWIN_NT-10.0
uname -v = 2017-07-26 14:39

/usr/bin/uname -p = unknown
/bin/uname -X     = unknown

/bin/arch              = x86_64
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: .../bin
PATH: /usr/local/bin
PATH: /usr/local/sbin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /sbin
PATH: /usr/i686-w64-mingw32/bin
PATH: /usr/x86_64-pc-cygwin/bin
PATH: /usr/x86_64-w64-mingw32/bin
PATH: /usr/i686-pc-cygwin/sys-root/usr/bin
PATH: /usr/i686-w64-mingw32/sys-root/mingw/bin
PATH: /usr/x86_64-w64-mingw32/sys-root/mingw/bin
PATH: /cygdrive/c/bin
PATH: /cygdrive/c/sbin
PATH: /cygdrive/c/.../bin
PATH: /cygdrive/c/.../ast/bin
PATH: /cygdrive/c/.../cygwin32/bin
PATH: /cygdrive/c/.../cygwin32/sbin
PATH: /cygdrive/c/.../cygwin32/usr/local/bin
PATH: /cygdrive/c/.../cygwin32/usr/sbin
PATH: /cygdrive/c/.../ast/arch/cygwin.i386/bin
PATH: /cygdrive/c/Program Files (x86)/AMD APP/bin/x86_64
PATH: /cygdrive/c/Program Files (x86)/ATI/ATI.ACE/Core-Static
PATH: /cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0
PATH: /cygdrive/c/WINDOWS/System32/Wbem
PATH: /cygdrive/c/WINDOWS/system32
PATH: /cygdrive/c/WINDOWS
PATH: /cygdrive/c/Program Files (x86)/NTP/bin
PATH: /cygdrive/c/Program Files (x86)/Microsoft SDKs/TypeScript/1.0
PATH: /cygdrive/c/Program Files/Microsoft SQL Server/120/Tools/Binn
PATH: /cygdrive/c/Program Files/Microsoft SQL Server/110/Tools/Binn
PATH: /cygdrive/c/Program Files (x86)/BitKeeper
PATH: /cygdrive/c/Program Files (x86)/GNU/GnuPG/pub
PATH: /cygdrive/c/Program Files (x86)/gnuplot/bin
PATH: /cygdrive/c/Program Files (x86)/PuTTY
PATH: /cygdrive/c/Program Files/TortoiseGit/bin
PATH: /cygdrive/c/Program Files/TortoiseHg
PATH: /cygdrive/c/Program Files (x86)/Vim/vim80
PATH: .../AppData/Local/Microsoft/WindowsApps
PATH: /usr/lib/lapack
PATH: /proc/cygdrive/c/Program Files (x86)/Vim/vim80


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2297: checking build system type
configure:2311: result: x86_64-unknown-cygwin
configure:2358: checking host system type
configure:2371: result: x86_64-unknown-cygwin
configure:2391: checking target system type
configure:2404: result: x86_64-unknown-cygwin
configure:2458: checking for a BSD-compatible install
configure:2526: result: /usr/bin/install -c
configure:2537: checking whether ln works
configure:2559: result: yes
configure:2563: checking whether ln -s works
configure:2567: result: yes
configure:2574: checking for a sed that does not truncate output
configure:2638: result: /usr/bin/sed
configure:2647: checking for gawk
configure:2663: found /usr/bin/gawk
configure:2674: result: gawk
configure:3991: checking to see if cat works as expected
configure:3996: result: yes
configure:4117: checking for gcc
configure:4133: found /usr/bin/gcc
configure:4144: result: gcc
configure:4373: checking for C compiler version
configure:4382: gcc --version >&5
gcc (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4393: $? = 0
configure:4382: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 5.4.0 (GCC) 
configure:4393: $? = 0
configure:4382: gcc -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4393: $? = 1
configure:4382: gcc -qversion >&5
gcc: error: unrecognized command line option '-qversion'
gcc: fatal error: no input files
compilation terminated.
configure:4393: $? = 1
configure:4413: checking for C compiler default output file name
configure:4435: gcc    conftest.c  >&5
configure:4439: $? = 0
configure:4476: result: a.exe
configure:4492: checking whether the C compiler works
configure:4501: ./a.exe
configure:4505: $? = 0
configure:4520: result: yes
configure:4527: checking whether we are cross compiling
configure:4529: result: no
configure:4532: checking for suffix of executables
configure:4539: gcc -o conftest.exe    conftest.c  >&5
configure:4543: $? = 0
configure:4565: result: .exe
configure:4571: checking for suffix of object files
configure:4593: gcc -c   conftest.c >&5
configure:4597: $? = 0
configure:4618: result: o
configure:4622: checking whether we are using the GNU C compiler
configure:4641: gcc -c   conftest.c >&5
configure:4641: $? = 0
configure:4650: result: yes
configure:4659: checking whether gcc accepts -g
configure:4679: gcc -c -g  conftest.c >&5
configure:4679: $? = 0
configure:4720: result: yes
configure:4737: checking for gcc option to accept ISO C89
configure:4801: gcc  -c -g -O2  conftest.c >&5
configure:4801: $? = 0
configure:4814: result: none needed
configure:4892: checking for g++
configure:4908: found /usr/bin/g++
configure:4919: result: g++
configure:4946: checking for C++ compiler version
configure:4955: g++ --version >&5
g++ (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4966: $? = 0
configure:4955: g++ -v >&5
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0/configure --srcdir=/cygdrive/i/szsz/tmpp/gcc/gcc-5.4.0-1.x86_64/src/gcc-5.4.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libcilkrts --enable-libgomp --enable-libitm --enable-libquadmath --enable-libquadmath-support --enable-libssp --enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers --with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible
Thread model: posix
gcc version 5.4.0 (GCC) 
configure:4966: $? = 0
configure:4955: g++ -V >&5
g++: error: unrecognized command line option '-V'
g++: fatal error: no input files
compilation terminated.
configure:4966: $? = 1
configure:4955: g++ -qversion >&5
g++: error: unrecognized command line option '-qversion'
g++: fatal error: no input files
compilation terminated.
configure:4966: $? = 1
configure:4970: checking whether we are using the GNU C++ compiler
configure:4989: g++ -c   conftest.cpp >&5
configure:4989: $? = 0
configure:4998: result: yes
configure:5007: checking whether g++ accepts -g
configure:5027: g++ -c -g  conftest.cpp >&5
configure:5027: $? = 0
configure:5068: result: yes
configure:5117: checking whether g++ accepts -static-libstdc++ -static-libgcc
configure:5134: g++ -o conftest.exe -g -O2   -static-libstdc++ -static-libgcc conftest.cpp  >&5
configure:5134: $? = 0
configure:5135: result: yes
configure:5199: checking for gnatbind
configure:5229: result: no
configure:5291: checking for gnatmake
configure:5321: result: no
configure:5340: checking whether compiler driver understands Ada
configure:5363: result: no
configure:5372: checking how to compare bootstrapped objects
configure:5397: result: cmp --ignore-initial=16 $$f1 $$f2
configure:5457: checking for objdir
configure:5472: result: .libs
configure:6016: checking for isl 0.16, 0.15, or deprecated 0.14
configure:6029: gcc -o conftest.exe -g -O2      -lisl -lmpc -lmpfr -lgmp conftest.c  -lisl -lgmp >&5
/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmpc
/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmpfr
collect2: error: ld returned 1 exit status
configure:6029: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #include <isl/ctx.h>
| int
| main ()
| {
| isl_ctx_get_max_operations (isl_ctx_alloc ());
|   ;
|   return 0;
| }
configure:6036: result: no
configure:6040: result: recommended isl version is 0.16 or 0.15, the minimum required isl version 0.14 is deprecated
configure:6044: checking for isl 0.16 or 0.15
configure:6057: gcc -o conftest.exe -g -O2      -lisl -lmpc -lmpfr -lgmp conftest.c  -lisl -lgmp >&5
conftest.c: In function 'main':
conftest.c:14:1: warning: implicit declaration of function 'isl_options_set_schedule_serialize_sccs' [-Wimplicit-function-declaration]
 isl_options_set_schedule_serialize_sccs (NULL, 0);
 ^
/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmpc
/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmpfr
collect2: error: ld returned 1 exit status
configure:6057: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define LT_OBJDIR ".libs/"
| /* end confdefs.h.  */
| #include <isl/schedule.h>
| int
| main ()
| {
| isl_options_set_schedule_serialize_sccs (NULL, 0);
|   ;
|   return 0;
| }
configure:6064: result: no
configure:7068: checking for default BUILD_CONFIG
configure:7100: result: 
configure:7105: checking for --enable-vtable-verify
configure:7118: result: no
configure:7714: checking for bison
configure:7730: found /usr/bin/bison
configure:7741: result: bison -y
configure:7761: checking for bison
configure:7777: found /usr/bin/bison
configure:7788: result: bison
configure:7808: checking for gm4
configure:7838: result: no
configure:7808: checking for gnum4
configure:7838: result: no
configure:7808: checking for m4
configure:7824: found /usr/bin/m4
configure:7835: result: m4
configure:7855: checking for flex
configure:7885: result: no
configure:7855: checking for lex
configure:7885: result: no
configure:7903: checking for flex
configure:7933: result: no
configure:7950: checking for makeinfo
configure:7966: found /usr/bin/makeinfo
configure:7977: result: makeinfo
configure:8011: checking for expect
configure:8027: found /usr/bin/expect
configure:8038: result: expect
configure:8060: checking for runtest
configure:8076: found /usr/bin/runtest
configure:8087: result: runtest
configure:8205: checking for ar
configure:8221: found /usr/bin/ar
configure:8232: result: ar
configure:8346: checking for as
configure:8362: found /usr/bin/as
configure:8373: result: as
configure:8487: checking for dlltool
configure:8503: found /usr/bin/dlltool
configure:8514: result: dlltool
configure:8547: checking for ld
configure:8574: result: /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld.exe
configure:8769: checking for lipo
configure:8799: result: no
configure:8910: checking for nm
configure:8926: found /usr/bin/nm
configure:8937: result: nm
configure:9051: checking for ranlib
configure:9067: found /usr/bin/ranlib
configure:9078: result: ranlib
configure:9187: checking for strip
configure:9203: found /usr/bin/strip
configure:9214: result: strip
configure:9323: checking for windres
configure:9339: found /usr/bin/windres
configure:9350: result: windres
configure:9464: checking for windmc
configure:9480: found /usr/bin/windmc
configure:9491: result: windmc
configure:9605: checking for objcopy
configure:9621: found /usr/bin/objcopy
configure:9632: result: objcopy
configure:9746: checking for objdump
configure:9762: found /usr/bin/objdump
configure:9773: result: objdump
configure:9887: checking for readelf
configure:9903: found /usr/bin/readelf
configure:9914: result: readelf
configure:10067: checking for cc
configure:10083: found /usr/bin/cc
configure:10094: result: cc
configure:10228: checking for c++
configure:10244: found /usr/bin/c++
configure:10255: result: c++
configure:10389: checking for gcc
configure:10405: found /usr/bin/gcc
configure:10416: result: gcc
configure:10545: checking for gcj
configure:10575: result: no
configure:10706: checking for gfortran
configure:10736: result: no
configure:10867: checking for gccgo
configure:10897: result: no
configure:11108: checking for ar
configure:11124: found /usr/bin/ar
configure:11135: result: ar
configure:11338: checking for as
configure:11354: found /usr/bin/as
configure:11365: result: as
configure:11568: checking for dlltool
configure:11584: found /usr/bin/dlltool
configure:11595: result: dlltool
configure:11798: checking for ld
configure:11814: found /usr/bin/ld
configure:11825: result: ld
configure:12028: checking for lipo
configure:12058: result: no
configure:12258: checking for nm
configure:12274: found /usr/bin/nm
configure:12285: result: nm
configure:12488: checking for objcopy
configure:12504: found /usr/bin/objcopy
configure:12515: result: objcopy
configure:12718: checking for objdump
configure:12734: found /usr/bin/objdump
configure:12745: result: objdump
configure:12948: checking for ranlib
configure:12964: found /usr/bin/ranlib
configure:12975: result: ranlib
configure:13178: checking for readelf
configure:13194: found /usr/bin/readelf
configure:13205: result: readelf
configure:13408: checking for strip
configure:13424: found /usr/bin/strip
configure:13435: result: strip
configure:13638: checking for windres
configure:13654: found /usr/bin/windres
configure:13665: result: windres
configure:13868: checking for windmc
configure:13884: found /usr/bin/windmc
configure:13895: result: windmc
configure:13926: checking where to find the target ar
configure:13959: result: host tool
configure:13968: checking where to find the target as
configure:14001: result: host tool
configure:14010: checking where to find the target cc
configure:14043: result: host tool
configure:14052: checking where to find the target c++
configure:14088: result: host tool
configure:14097: checking where to find the target c++ for libstdc++
configure:14133: result: host tool
configure:14142: checking where to find the target dlltool
configure:14175: result: host tool
configure:14184: checking where to find the target gcc
configure:14217: result: host tool
configure:14226: checking where to find the target gcj
configure:14262: result: host tool
configure:14271: checking where to find the target gfortran
configure:14307: result: host tool
configure:14316: checking where to find the target gccgo
configure:14352: result: host tool
configure:14361: checking where to find the target ld
configure:14394: result: host tool
configure:14403: checking where to find the target lipo
configure:14425: result: host tool
configure:14434: checking where to find the target nm
configure:14467: result: host tool
configure:14476: checking where to find the target objcopy
configure:14509: result: host tool
configure:14518: checking where to find the target objdump
configure:14551: result: host tool
configure:14560: checking where to find the target ranlib
configure:14593: result: host tool
configure:14602: checking where to find the target readelf
configure:14635: result: host tool
configure:14644: checking where to find the target strip
configure:14677: result: host tool
configure:14686: checking where to find the target windres
configure:14719: result: host tool
configure:14728: checking where to find the target windmc
configure:14761: result: host tool
configure:14798: checking whether to enable maintainer-specific portions of Makefiles
configure:14807: result: no
configure:15065: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by config.status, which was
generated by GNU Autoconf 2.64.  Invocation command line was

  CONFIG_FILES    = 
  CONFIG_HEADERS  = 
  CONFIG_LINKS    = 
  CONFIG_COMMANDS = 
  $ ./config.status 

on XXXxxxxxxX

config.status:912: creating Makefile

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build='x86_64-unknown-cygwin'
ac_cv_c_compiler_gnu='yes'
ac_cv_cxx_compiler_gnu='yes'
ac_cv_env_AR_FOR_TARGET_set=''
ac_cv_env_AR_FOR_TARGET_value=''
ac_cv_env_AR_set=''
ac_cv_env_AR_value=''
ac_cv_env_AS_FOR_TARGET_set=''
ac_cv_env_AS_FOR_TARGET_value=''
ac_cv_env_AS_set=''
ac_cv_env_AS_value=''
ac_cv_env_CCC_set=''
ac_cv_env_CCC_value=''
ac_cv_env_CC_FOR_TARGET_set=''
ac_cv_env_CC_FOR_TARGET_value=''
ac_cv_env_CC_set=''
ac_cv_env_CC_value=''
ac_cv_env_CFLAGS_set=''
ac_cv_env_CFLAGS_value=''
ac_cv_env_CPPFLAGS_set=''
ac_cv_env_CPPFLAGS_value=''
ac_cv_env_CXXFLAGS_set=''
ac_cv_env_CXXFLAGS_value=''
ac_cv_env_CXX_FOR_TARGET_set=''
ac_cv_env_CXX_FOR_TARGET_value=''
ac_cv_env_CXX_set=''
ac_cv_env_CXX_value=''
ac_cv_env_DLLTOOL_FOR_TARGET_set=''
ac_cv_env_DLLTOOL_FOR_TARGET_value=''
ac_cv_env_DLLTOOL_set=''
ac_cv_env_DLLTOOL_value=''
ac_cv_env_GCC_FOR_TARGET_set=''
ac_cv_env_GCC_FOR_TARGET_value=''
ac_cv_env_GCJ_FOR_TARGET_set=''
ac_cv_env_GCJ_FOR_TARGET_value=''
ac_cv_env_GFORTRAN_FOR_TARGET_set=''
ac_cv_env_GFORTRAN_FOR_TARGET_value=''
ac_cv_env_GOC_FOR_TARGET_set=''
ac_cv_env_GOC_FOR_TARGET_value=''
ac_cv_env_LDFLAGS_set=''
ac_cv_env_LDFLAGS_value=''
ac_cv_env_LD_FOR_TARGET_set=''
ac_cv_env_LD_FOR_TARGET_value=''
ac_cv_env_LD_set=''
ac_cv_env_LD_value=''
ac_cv_env_LIBS_set=''
ac_cv_env_LIBS_value=''
ac_cv_env_LIPO_FOR_TARGET_set=''
ac_cv_env_LIPO_FOR_TARGET_value=''
ac_cv_env_LIPO_set=''
ac_cv_env_LIPO_value=''
ac_cv_env_NM_FOR_TARGET_set=''
ac_cv_env_NM_FOR_TARGET_value=''
ac_cv_env_NM_set=''
ac_cv_env_NM_value=''
ac_cv_env_OBJCOPY_FOR_TARGET_set=''
ac_cv_env_OBJCOPY_FOR_TARGET_value=''
ac_cv_env_OBJCOPY_set=''
ac_cv_env_OBJCOPY_value=''
ac_cv_env_OBJDUMP_FOR_TARGET_set=''
ac_cv_env_OBJDUMP_FOR_TARGET_value=''
ac_cv_env_OBJDUMP_set=''
ac_cv_env_OBJDUMP_value=''
ac_cv_env_RANLIB_FOR_TARGET_set=''
ac_cv_env_RANLIB_FOR_TARGET_value=''
ac_cv_env_RANLIB_set=''
ac_cv_env_RANLIB_value=''
ac_cv_env_READELF_FOR_TARGET_set=''
ac_cv_env_READELF_FOR_TARGET_value=''
ac_cv_env_READELF_set=''
ac_cv_env_READELF_value=''
ac_cv_env_STRIP_FOR_TARGET_set=''
ac_cv_env_STRIP_FOR_TARGET_value=''
ac_cv_env_STRIP_set=''
ac_cv_env_STRIP_value=''
ac_cv_env_WINDMC_FOR_TARGET_set=''
ac_cv_env_WINDMC_FOR_TARGET_value=''
ac_cv_env_WINDMC_set=''
ac_cv_env_WINDMC_value=''
ac_cv_env_WINDRES_FOR_TARGET_set=''
ac_cv_env_WINDRES_FOR_TARGET_value=''
ac_cv_env_WINDRES_set=''
ac_cv_env_WINDRES_value=''
ac_cv_env_build_alias_set=''
ac_cv_env_build_alias_value=''
ac_cv_env_build_configargs_set=''
ac_cv_env_build_configargs_value=''
ac_cv_env_host_alias_set=''
ac_cv_env_host_alias_value=''
ac_cv_env_host_configargs_set=''
ac_cv_env_host_configargs_value=''
ac_cv_env_target_alias_set=''
ac_cv_env_target_alias_value=''
ac_cv_env_target_configargs_set=''
ac_cv_env_target_configargs_value=''
ac_cv_exeext='.exe'
ac_cv_host='x86_64-unknown-cygwin'
ac_cv_objext='o'
ac_cv_path_SED='/usr/bin/sed'
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AR='ar'
ac_cv_prog_AR_FOR_TARGET='ar'
ac_cv_prog_AS='as'
ac_cv_prog_AS_FOR_TARGET='as'
ac_cv_prog_AWK='gawk'
ac_cv_prog_BISON='bison'
ac_cv_prog_CC_FOR_TARGET='cc'
ac_cv_prog_CXX_FOR_TARGET='c++'
ac_cv_prog_DLLTOOL='dlltool'
ac_cv_prog_DLLTOOL_FOR_TARGET='dlltool'
ac_cv_prog_EXPECT='expect'
ac_cv_prog_GCC_FOR_TARGET='gcc'
ac_cv_prog_LD='/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld.exe'
ac_cv_prog_LD_FOR_TARGET='ld'
ac_cv_prog_M4='m4'
ac_cv_prog_MAKEINFO='makeinfo'
ac_cv_prog_NM='nm'
ac_cv_prog_NM_FOR_TARGET='nm'
ac_cv_prog_OBJCOPY='objcopy'
ac_cv_prog_OBJCOPY_FOR_TARGET='objcopy'
ac_cv_prog_OBJDUMP='objdump'
ac_cv_prog_OBJDUMP_FOR_TARGET='objdump'
ac_cv_prog_RANLIB='ranlib'
ac_cv_prog_RANLIB_FOR_TARGET='ranlib'
ac_cv_prog_READELF='readelf'
ac_cv_prog_READELF_FOR_TARGET='readelf'
ac_cv_prog_RUNTEST='runtest'
ac_cv_prog_STRIP='strip'
ac_cv_prog_STRIP_FOR_TARGET='strip'
ac_cv_prog_WINDMC='windmc'
ac_cv_prog_WINDMC_FOR_TARGET='windmc'
ac_cv_prog_WINDRES='windres'
ac_cv_prog_WINDRES_FOR_TARGET='windres'
ac_cv_prog_YACC='bison -y'
ac_cv_prog_ac_ct_CC='gcc'
ac_cv_prog_ac_ct_CXX='g++'
ac_cv_prog_cc_c89=''
ac_cv_prog_cc_g='yes'
ac_cv_prog_cxx_g='yes'
ac_cv_target='x86_64-unknown-cygwin'
acx_cv_cc_gcc_supports_ada='no'
acx_cv_prog_LN='ln'
gcc_cv_isl='no'
gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
gcc_cv_tool_dirs=''
gcc_cv_tool_prefix='/usr/local'
lt_cv_objdir='.libs'

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='ar'
AR_FOR_BUILD='$(AR)'
AR_FOR_TARGET='$(AR)'
AS='as'
AS_FOR_BUILD='$(AS)'
AS_FOR_TARGET='$(AS)'
AWK='gawk'
BISON='bison'
BUILD_CONFIG=''
CC='gcc'
CC_FOR_BUILD='$(CC)'
CC_FOR_TARGET='$(CC)'
CFLAGS='-g -O2'
CFLAGS_FOR_BUILD='-g -O2'
CFLAGS_FOR_TARGET='-g -O2'
COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
CONFIGURE_GDB_TK=''
CPPFLAGS=''
CXX='g++'
CXXFLAGS='-g -O2'
CXXFLAGS_FOR_BUILD='-g -O2'
CXXFLAGS_FOR_TARGET='-g -O2'
CXX_FOR_BUILD='$(CXX)'
CXX_FOR_TARGET='$(CXX)'
DEBUG_PREFIX_CFLAGS_FOR_TARGET=''
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DLT_OBJDIR=\".libs/\"'
DLLTOOL='dlltool'
DLLTOOL_FOR_BUILD='$(DLLTOOL)'
DLLTOOL_FOR_TARGET='$(DLLTOOL)'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT='.exe'
EXPECT='expect'
EXTRA_CONFIGARGS_LIBJAVA='--disable-static'
FLAGS_FOR_TARGET=' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
FLEX='.../newlib-cygwin/missing flex'
GCC_FOR_TARGET='$()'
GCC_SHLIB_SUBDIR='/shlib'
GCJ_FOR_BUILD='$(GCJ)'
GCJ_FOR_TARGET='$(GCJ)'
GDB_TK=''
GFORTRAN_FOR_BUILD='$(GFORTRAN)'
GFORTRAN_FOR_TARGET='$(GFORTRAN)'
GNATBIND='no'
GNATMAKE='no'
GOC_FOR_BUILD='$(GOC)'
GOC_FOR_TARGET='$(GOC)'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_GDB_TK=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LD='/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld.exe'
LDFLAGS=''
LDFLAGS_FOR_BUILD=''
LDFLAGS_FOR_TARGET=''
LD_FOR_BUILD='$(LD)'
LD_FOR_TARGET='$(LD)'
LEX='.../newlib-cygwin/missing flex'
LIBOBJS=''
LIBS=''
LIPO='lipo'
LIPO_FOR_TARGET='$(LIPO)'
LN='ln'
LN_S='ln -s'
LTLIBOBJS=''
M4='m4'
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='makeinfo'
NM='nm'
NM_FOR_BUILD='$(NM)'
NM_FOR_TARGET='$(NM)'
OBJCOPY='objcopy'
OBJCOPY_FOR_TARGET='$(OBJCOPY)'
OBJDUMP='objdump'
OBJDUMP_FOR_TARGET='$(OBJDUMP)'
OBJEXT='o'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB='ranlib'
RANLIB_FOR_BUILD='$(RANLIB)'
RANLIB_FOR_TARGET='$(RANLIB)'
RAW_CXX_FOR_TARGET='$(CXX)'
READELF='readelf'
READELF_FOR_TARGET='$(READELF)'
RPATH_ENVVAR='PATH'
RUNTEST='runtest'
SED='/usr/bin/sed'
SHELL='/bin/sh'
STRIP='strip'
STRIP_FOR_TARGET='$(STRIP)'
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='./configure'
WINDMC='windmc'
WINDMC_FOR_BUILD='$(WINDMC)'
WINDMC_FOR_TARGET='$(WINDMC)'
WINDRES='windres'
WINDRES_FOR_BUILD='$(WINDRES)'
WINDRES_FOR_TARGET='$(WINDRES)'
YACC='bison -y'
ac_ct_CC='gcc'
ac_ct_CXX='g++'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-cygwin'
build_alias=''
build_configargs=' --cache-file=./config.cache  --program-transform-name='\''s,y,y,'\'' --disable-option-checking'
build_configdirs=''
build_cpu='x86_64'
build_libsubdir='build-x86_64-unknown-cygwin'
build_noncanonical='x86_64-unknown-cygwin'
build_os='cygwin'
build_subdir='build-x86_64-unknown-cygwin'
build_tooldir='${exec_prefix}/x86_64-unknown-cygwin'
build_vendor='unknown'
compare_exclusions='gcc/cc*-checksum$(objext) | gcc/ada/*tools/*'
configdirs=' etc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
do_compare='cmp --ignore-initial=16 $$f1 $$f2'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='${prefix}'
extra_host_libiberty_configure_flags=''
extra_host_zlib_configure_flags=''
extra_isl_gmp_configure_flags=''
extra_liboffloadmic_configure_flags=''
extra_linker_plugin_configure_flags=''
extra_linker_plugin_flags=''
extra_mpc_gmp_configure_flags=''
extra_mpc_mpfr_configure_flags=''
extra_mpfr_configure_flags=''
gmpinc=''
gmplibs='-lmpc -lmpfr -lgmp'
host='x86_64-unknown-cygwin'
host_alias=''
host_configargs=' --cache-file=./config.cache  --with-system-zlib --with-newlib  --program-transform-name='\''s,y,y,'\'' --disable-option-checking'
host_cpu='x86_64'
host_noncanonical='x86_64-unknown-cygwin'
host_os='cygwin'
host_shared='no'
host_subdir='.'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
islinc=''
isllibs=''
islver=''
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
poststage1_ldflags='-static-libstdc++ -static-libgcc'
poststage1_libs=''
prefix='/usr/local'
program_transform_name='s,y,y,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags='-g'
stage1_checking='--enable-checking=yes,types'
stage1_languages=',c,'
stage1_ldflags='-static-libstdc++ -static-libgcc'
stage1_libs=''
stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='x86_64-unknown-cygwin'
target_alias=''
target_configargs='--cache-file=./config.cache --with-newlib --enable-multilib   --program-transform-name='\''s,y,y,'\'' --disable-option-checking'
target_configdirs='newlib winsup'
target_cpu='x86_64'
target_noncanonical='x86_64-unknown-cygwin'
target_os='cygwin'
target_subdir='x86_64-unknown-cygwin'
target_vendor='unknown'
tooldir='${exec_prefix}/x86_64-unknown-cygwin'

## ------------------- ##
## File substitutions. ##
## ------------------- ##

alphaieee_frag='/dev/null'
host_makefile_frag='./config/mh-cygwin'
ospace_frag='/dev/null'
serialization_dependencies='serdep.tmp'
target_makefile_frag='/dev/null'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define LT_OBJDIR ".libs/"

configure: exit 0

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-08-18 18:53                       ` Corinna Vinschen
@ 2017-08-18 19:38                         ` Brian Inglis
  0 siblings, 0 replies; 25+ messages in thread
From: Brian Inglis @ 2017-08-18 19:38 UTC (permalink / raw)
  To: newlib

On 2017-08-18 09:23, Corinna Vinschen wrote:
> Hi Brian,
> 
> On Jul 31 11:55, Corinna Vinschen wrote:
>> On Jul 28 14:50, Brian Inglis wrote:
>>> On 2017-07-26 13:34, Corinna Vinschen wrote:
>>>> On Jul 26 11:27, Brian Inglis wrote:
>>>>> On 2017-07-26 04:49, Corinna Vinschen wrote:
>>>>>> On Jul 25 14:13, Brian Inglis wrote:
>>>>>>> On 2017-07-25 12:52, Corinna Vinschen wrote:
>>>>>>>> Well... on *third* thought, targets may redefine time_t via redefining
>>>>>>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
>>>>>>>> Maybe it is safer to use always strtoll_l and just break this down to
>>>>>>>> time_t on the way.
>>>>>>>
>>>>>>> My concern has always been do all newlib RTEMS targets support long
>>>>>>> long, even if same as long, and stroll_l?
>>>>>>
>>>>>> Yes.  The long long functions are not excluded like we do with long
>>>>>> double stuff.
>>>>>>
>>>>>>> Trying to build standalone or combined STC for this with changed strptime.c
>>>>>>> ld/collect2 fails to resolve ...global_locale.
>>>>>>
>>>>>> Yeah, it's an internal function to newlib.  You need to include
>>>>>> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
>>>>>> userspace will do.
>>>>>
>>>>> Not doing it for me: that's why I asked if there were undistributed locale
>>>>> changes in the tree, and maybe in a dev snapshot?
>>>>
>>>> No, it's an *internal* function, it doesn't get exported.  There's no
>>>> (easy) way to build strptime.c outside the newlib tree as part of the
>>>> lib.  That's why I said a userspace STC is enough.  Don't try to build
>>>> strptime.c as standalone.  Just build it as part of newlib/Cygwin and
>>>> test it from userspace by calling it.
>>>
>>> Finally got all the prereqs installed and a clean build.
>>> My configure uses the default prefix /usr/local, which is at the head of my
>>> personal path.
>>> Is that enough for a test build, and how do I do that, or do I have to replace
>>> the current release, with configure --prefix=/, make install into /bin/?
>>
>> The configured paths don't matter for the Cygwin DLL itself, and your
>> patch doesn't change any headers or entry points of the lib.  So just exit
>> from Cygwin, replace the DLL in Explorer, start a shell and go ahead.
> 
> any news on the patch?

Rebuilding and replacing cygwin1.dll did not link to the updated strptime.
I verified this by renaming then moving the installed dll to verify that Cygwin
would not run without it.
Test program still failing as if the code was unchanged.
Please see other more detailed message, which I resent as it did not appear to
make it to the list, although no failure response was received.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-31  9:55                     ` Corinna Vinschen
  2017-08-18 18:53                       ` Corinna Vinschen
  2017-08-18 19:38                       ` Brian Inglis
@ 2017-08-18 20:01                       ` Brian Inglis
  2017-08-19 14:01                       ` Brian Inglis
  3 siblings, 0 replies; 25+ messages in thread
From: Brian Inglis @ 2017-08-18 20:01 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 2426 bytes --]

On 2017-07-31 03:55, Corinna Vinschen wrote:
> On Jul 28 14:50, Brian Inglis wrote:
>> On 2017-07-26 13:34, Corinna Vinschen wrote:
>>> On Jul 26 11:27, Brian Inglis wrote:
>>>> On 2017-07-26 04:49, Corinna Vinschen wrote:
>>>>> On Jul 25 14:13, Brian Inglis wrote:
>>>>>> On 2017-07-25 12:52, Corinna Vinschen wrote:
>>>>>>> Well... on *third* thought, targets may redefine time_t via redefining
>>>>>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
>>>>>>> Maybe it is safer to use always strtoll_l and just break this down to
>>>>>>> time_t on the way.
>>>>>>
>>>>>> My concern has always been do all newlib RTEMS targets support long
>>>>>> long, even if same as long, and stroll_l?
>>>>>
>>>>> Yes.  The long long functions are not excluded like we do with long
>>>>> double stuff.
>>>>>
>>>>>> Trying to build standalone or combined STC for this with changed strptime.c
>>>>>> ld/collect2 fails to resolve ...global_locale.
>>>>>
>>>>> Yeah, it's an internal function to newlib.  You need to include
>>>>> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
>>>>> userspace will do.
>>>>
>>>> Not doing it for me: that's why I asked if there were undistributed locale
>>>> changes in the tree, and maybe in a dev snapshot?
>>>
>>> No, it's an *internal* function, it doesn't get exported.  There's no
>>> (easy) way to build strptime.c outside the newlib tree as part of the
>>> lib.  That's why I said a userspace STC is enough.  Don't try to build
>>> strptime.c as standalone.  Just build it as part of newlib/Cygwin and
>>> test it from userspace by calling it.
>>
>> Finally got all the prereqs installed and a clean build.
>> My configure uses the default prefix /usr/local, which is at the head of my
>> personal path.
>> Is that enough for a test build, and how do I do that, or do I have to replace
>> the current release, with configure --prefix=/, make install into /bin/?
> 
> The configured paths don't matter for the Cygwin DLL itself, and your
> patch doesn't change any headers or entry points of the lib.  So just exit
> from Cygwin, replace the DLL in Explorer, start a shell and go ahead.

Test still won't run as expected after DLL replacement, nor coreutils strptime.
Aren't there lib import files or maps or anything I also have to move?
Attached slightly redacted build config and make logs.

This wasn't getting thru so trying one attachment at a time.

[-- Attachment #2: make.log --]
[-- Type: text/plain, Size: 49179 bytes --]

make[1]: Entering directory '.../newlib-cygwin'
make[2]: Entering directory '.../newlib-cygwin/etc'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '.../newlib-cygwin/etc'
Checking multilib configuration for newlib...
make[2]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
make "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CCASFLAGS=-g -O2" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000 " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/local/lib" "prefix=/usr/local" "tooldir=/usr/local/x86_64-unknown-cygwin" "top_toollibdir=/usr/local/x86_64-unknown-cygwin/lib" "AR=ar" "AS=as" "CC=gcc -L.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin -isystem .../newlib-cygwin/winsup/cygwin/include -B.../newlib-cygwin/x86_64-unknown-cygwin/newlib/ -isystem .../newlib-cygwin/x86_64-unknown-cygwin/newlib/targ-include -isystem .../newlib-cygwin/newlib/libc/include    -I.../newlib-cygwin/winsup/cygwin/include" "LD=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld.exe" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" all-recursive
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
make "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CCASFLAGS=-g -O2" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000  " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/local/lib" "prefix=/usr/local" "tooldir=/usr/local/x86_64-unknown-cygwin" "top_toollibdir=/usr/local/x86_64-unknown-cygwin/lib" "AR=ar" "AS=as" "CC=gcc -L.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin -isystem .../newlib-cygwin/winsup/cygwin/include -B.../newlib-cygwin/x86_64-unknown-cygwin/newlib/ -isystem .../newlib-cygwin/x86_64-unknown-cygwin/newlib/targ-include -isystem .../newlib-cygwin/newlib/libc/include    -I.../newlib-cygwin/winsup/cygwin/include" "LD=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld.exe" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=all multi-do # make
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
if [ -z "" ]; then \
  true; \
else \
  rootpre=`${PWDCMD-pwd}`/; export rootpre; \
  srcrootpre=`cd ../.././newlib; ${PWDCMD-pwd}`/; export srcrootpre; \
  lib=`echo "${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$,\1,'`; \
  compiler="gcc -L.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin -isystem .../newlib-cygwin/winsup/cygwin/include -B.../newlib-cygwin/x86_64-unknown-cygwin/newlib/ -isystem .../newlib-cygwin/x86_64-unknown-cygwin/newlib/targ-include -isystem .../newlib-cygwin/newlib/libc/include    -I.../newlib-cygwin/winsup/cygwin/include"; \
  for i in `${compiler} --print-multi-lib 2>/dev/null`; do \
    dir=`echo $i | sed -e 's/;.*$//'`; \
    if [ "${dir}" = "." ]; then \
      true; \
    else \
      if [ -d ../${dir}/${lib} ]; then \
	flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
	if (cd ../${dir}/${lib}; make "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CCASFLAGS=-g -O2" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000   " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/local/lib" "prefix=/usr/local" "tooldir=/usr/local/x86_64-unknown-cygwin" "top_toollibdir=/usr/local/x86_64-unknown-cygwin/lib" "AR=ar" "AS=as" "CC=gcc -L.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin -isystem .../newlib-cygwin/winsup/cygwin/include -B.../newlib-cygwin/x86_64-unknown-cygwin/newlib/ -isystem .../newlib-cygwin/x86_64-unknown-cygwin/newlib/targ-include -isystem .../newlib-cygwin/newlib/libc/include    -I.../newlib-cygwin/winsup/cygwin/include" "LD=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld.exe" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" \
			CFLAGS="-g -O2 ${flags}" \
			CCASFLAGS="-g -O2 ${flags}" \
			FCFLAGS=" ${flags}" \
			FFLAGS=" ${flags}" \
			ADAFLAGS=" ${flags}" \
			prefix="/usr/local" \
			exec_prefix="/usr/local" \
			GCJFLAGS=" ${flags}" \
			GOCFLAGS="-O2 -g ${flags}" \
			CXXFLAGS="-g -O2 ${flags}" \
			LIBCFLAGS="-g -O2 ${flags}" \
			LIBCXXFLAGS="-g -O2 -fno-implicit-templates ${flags}" \
			LDFLAGS=" ${flags}" \
			MULTIFLAGS="${flags}" \
			DESTDIR="" \
			INSTALL="/usr/bin/install -c" \
			INSTALL_DATA="/usr/bin/install -c -m 644" \
			INSTALL_PROGRAM="/usr/bin/install -c" \
			INSTALL_SCRIPT="/usr/bin/install -c" \
			all); then \
	  true; \
	else \
	  exit 1; \
	fi; \
      else true; \
      fi; \
    fi; \
  done; \
fi
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
Making all in libc
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc'
Making all in argz
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/argz'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/argz'
Making all in stdlib
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdlib'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdlib'
Making all in ctype
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/ctype'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/ctype'
Making all in search
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/search'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/search'
Making all in stdio
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio'
Makefile:1959: warning: overriding recipe for target 'lib_a-vfwscanf.o'
Makefile:1645: warning: ignoring old recipe for target 'lib_a-vfwscanf.o'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio'
Making all in stdio64
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio64'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio64'
Making all in string
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/string'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/string'
Making all in signal
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/signal'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/signal'
Making all in time
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/time'
gcc -L.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin -isystem .../newlib-cygwin/winsup/cygwin/include -B.../newlib-cygwin/x86_64-unknown-cygwin/newlib/ -isystem .../newlib-cygwin/x86_64-unknown-cygwin/newlib/targ-include -isystem .../newlib-cygwin/newlib/libc/include    -I.../newlib-cygwin/winsup/cygwin/include -DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\" -DPACKAGE_VERSION=\"2.5.0\" -DPACKAGE_STRING=\"newlib\ 2.5.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I. -I../../../.././newlib/libc/time -DHAVE_OPENDIR -DHAVE_RENAME -DSIGNAL_PROVIDED -D_COMPILING_NEWLIB -DHAVE_BLKSIZE -DHAVE_FCNTL -DMALLOC_PROVIDED -fno-builtin      -g -O2 -c -o lib_a-strptime.o `test -f 'strptime.c' || echo '../../../.././newlib/libc/time/'`strptime.c
rm -f lib.a
ar cru lib.a lib_a-asctime.o lib_a-asctime_r.o lib_a-clock.o lib_a-ctime.o lib_a-ctime_r.o lib_a-difftime.o lib_a-gettzinfo.o lib_a-gmtime.o lib_a-gmtime_r.o lib_a-lcltime.o lib_a-lcltime_r.o lib_a-mktime.o lib_a-month_lengths.o lib_a-strftime.o lib_a-strptime.o lib_a-time.o lib_a-tzcalc_limits.o lib_a-tzlock.o lib_a-tzset.o lib_a-tzset_r.o lib_a-tzvars.o lib_a-wcsftime.o 
ranlib lib.a
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/time'
Making all in locale
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/locale'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/locale'
Making all in sys
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/sys'
Making all in .
make[6]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/sys'
make[6]: Nothing to be done for 'all-am'.
make[6]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/sys'
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/sys'
Making all in reent
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/reent'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/reent'
Making all in errno
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/errno'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/errno'
Making all in misc
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/misc'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/misc'
Making all in machine
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine'
Making all in x86_64
make[6]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine/x86_64'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine/x86_64'
Making all in .
make[6]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine'
make[6]: Nothing to be done for 'all-am'.
make[6]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine'
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine'
Making all in posix
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/posix'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/posix'
Making all in syscalls
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/syscalls'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/syscalls'
Making all in xdr
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/xdr'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/xdr'
Making all in .
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc'
rm -f libc.a
rm -rf tmp
mkdir tmp
cd tmp; \
 for i in argz/lib.a stdlib/lib.a ctype/lib.a search/lib.a stdio/lib.a stdio64/lib.a xdr/lib.a string/lib.a signal/lib.a time/lib.a locale/lib.a reent/lib.a  errno/lib.a misc/lib.a  posix/lib.a syscalls/lib.a  machine/lib.a ; do \
   ar x ../$i; \
 done; \
ar rc ../libc.a *.o
ranlib libc.a
rm -rf tmp
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc'
Making all in libm
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm'
Making all in math
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/math'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/math'
Making all in common
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/common'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/common'
Making all in complex
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/complex'
make[5]: Nothing to be done for 'all'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/complex'
Making all in machine
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/machine'
Making all in .
make[6]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/machine'
make[6]: Nothing to be done for 'all-am'.
make[6]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/machine'
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/machine'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm'
make[5]: Nothing to be done for 'all-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm'
Making all in doc
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/doc'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/doc'
Making all in .
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
rm -rf libc.a libg.a tmp
mkdir tmp
cd tmp; \
 ar x ../libm.a lib_a-s_fpclassify.o lib_a-sf_fpclassify.o lib_a-s_isinf.o lib_a-sf_isinf.o lib_a-s_isnan.o lib_a-sf_isnan.o lib_a-s_isinfd.o lib_a-sf_isinff.o lib_a-s_isnand.o lib_a-sf_isnanf.o lib_a-s_nan.o lib_a-sf_nan.o lib_a-s_ldexp.o lib_a-sf_ldexp.o lib_a-s_frexp.o lib_a-sf_frexp.o lib_a-s_modf.o lib_a-sf_modf.o lib_a-s_scalbn.o lib_a-sf_scalbn.o lib_a-s_finite.o lib_a-sf_finite.o lib_a-s_copysign.o lib_a-sf_copysign.o ; \
 ar x ../libc/libc.a ; \
 ar rc ../libc.a *.o
ranlib libc.a
ln libc.a libg.a >/dev/null 2>/dev/null || cp libc.a libg.a
rm -rf tmp
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
make[2]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
Checking multilib configuration for winsup...
make[2]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup'
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin'
make -C .../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver libcygserver.a
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[4]: 'libcygserver.a' is up to date.
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
g++ -B.../newlib-cygwin/x86_64-unknown-cygwin/libstdc++-v3/src/.libs -B.../newlib-cygwin/x86_64-unknown-cygwin/libstdc++-v3/libsupc++/.libs -L.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin -isystem .../newlib-cygwin/winsup/cygwin/include -B.../newlib-cygwin/x86_64-unknown-cygwin/newlib/ -isystem .../newlib-cygwin/x86_64-unknown-cygwin/newlib/targ-include -isystem .../newlib-cygwin/newlib/libc/include     -O2 -g \
-mno-use-libstdc-wrappers -L/usr/lib/w32api \
-Wl,--gc-sections -nostdlib -Wl,-Tcygwin.sc -static \
-Wl,--heap=0 -Wl,--out-implib,cygdll.a -shared -o cygwin0.dll \
-e dll_entry cygwin.def advapi32.o arc4random_stir.o assert.o autoload.o base64.o bsdlib.o ctype.o cxx.o cygheap.o cygthread.o cygtls.o cygwait.o cygxdr.o dcrt0.o debug.o devices.o dir.o dlfcn.o dll_init.o dtable.o environ.o errno.o exceptions.o exec.o external.o fcntl.o fenv.o fhandler.o fhandler_clipboard.o fhandler_console.o fhandler_dev.o fhandler_disk_file.o fhandler_dsp.o fhandler_fifo.o fhandler_floppy.o fhandler_mailslot.o fhandler_netdrive.o fhandler_nodevice.o fhandler_proc.o fhandler_process.o fhandler_procnet.o fhandler_procsys.o fhandler_procsysvipc.o fhandler_random.o fhandler_raw.o fhandler_registry.o fhandler_serial.o fhandler_socket.o fhandler_tape.o fhandler_termios.o fhandler_tty.o fhandler_virtual.o fhandler_windows.o fhandler_zero.o flock.o fnmatch.o fork.o fts.o ftw.o getentropy.o getopt.o glob.o glob_pattern_p.o globals.o grp.o heap.o hookapi.o inet_addr.o inet_network.o init.o ioctl.o ipc.o kernel32.o ldap.o libstdcxx_wrapper.o loadavg.o localtime.o lsearch.o malloc_wrapper.o minires-os-if.o minires.o miscfuncs.o mktemp.o mmap.o msg.o mount.o net.o netdb.o nfs.o nftw.o nlsfuncs.o ntea.o passwd.o path.o pinfo.o pipe.o poll.o posix_ipc.o pseudo-reloc.o pthread.o quotactl.o random.o regcomp.o regerror.o regexec.o regfree.o registry.o resource.o rexec.o rcmd.o scandir.o sched.o sec_acl.o sec_auth.o sec_helper.o sec_posixacl.o security.o select.o sem.o setlsapwd.o shared.o shm.o sigfe.o signal.o sigproc.o smallprint.o spawn.o strace.o strfmon.o strfuncs.o strptime.o strsep.o strsig.o sync.o syscalls.o sysconf.o syslog.o termios.o thread.o timer.o times.o tls_pbuf.o tty.o uinfo.o uname.o wait.o wincap.o window.o winf.o xsique.o  malloc.o acoshl.o acosl.o asinhl.o asinl.o atan2l.o atanhl.o atanl.o cabsl.o cacosl.o cargl.o casinl.o catanl.o cbrtl.o ccosl.o ceill.o cephes_emath.o cexpl.o cimagl.o clog10l.o clogl.o conjl.o copysignl.o coshl.o cosl.o cosl_internal.o cossin.o cpowl.o cprojl.o creall.o csinl.o csqrtl.o ctanl.o erfl.o exp10l.o exp2l.o expl.o expm1l.o fabsl.o fdiml.o finite.o floorl.o fmal.o fmaxl.o fminl.o fmodl.o frexpl.o ilogbl.o internal_logl.o isinf.o isnan.o ldexpl.o lgammal.o llrint.o llrintf.o llrintl.o llroundl.o log10l.o log1pl.o log2l.o logbl.o logl.o lrint.o lrintf.o lrintl.o lroundl.o modfl.o nanl.o nearbyint.o nearbyintf.o nearbyintl.o nextafterl.o nexttoward.o nexttowardf.o pow10l.o powil.o powl.o remainder.o remainderf.o remainderl.o remquol.o rint.o rintf.o rintl.o roundl.o scalbl.o scalbnl.o sinhl.o sinl.o sinl_internal.o sqrtl.o tanhl.o tanl.o tgammal.o truncl.o  version.o winver.o \
 .../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver/libcygserver.a .../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/libm.a .../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/libc.a \
-lgcc /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../lib/w32api/libkernel32.a /usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../lib/w32api/libntdll.a -Wl,-Map,cygwin.map
+ objcopy -R .gnu_debuglink_overlay --add-gnu-debuglink=/dev/null --only-keep-debug cygwin0.dll cygwin1.dbg
+ objcopy -g --add-gnu-debuglink=cygwin1.dbg cygwin0.dll
+ objcopy -R .gnu_debuglink_overlay --set-section-flag .gnu_debuglink=contents,readonly,debug,noload --change-section-address .gnu_debuglink=0x1802fb000 cygwin0.dll
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin'
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/doc'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/doc'
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/utils'
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin'
make -C .../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver libcygserver.a
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[5]: 'libcygserver.a' is up to date.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin'
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/utils'
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/lsaauth'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/lsaauth'
make[2]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup'
make[1]: Leaving directory '.../newlib-cygwin'
make[1]: Entering directory '.../newlib-cygwin'
/bin/sh ./mkinstalldirs /usr/local /usr/local
make[2]: Entering directory '.../newlib-cygwin/etc'
make[2]: Nothing to be done for 'install'.
make[2]: Leaving directory '.../newlib-cygwin/etc'
make[2]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
Making install in libc
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc'
Making install in argz
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/argz'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/argz'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/argz'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/argz'
Making install in stdlib
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdlib'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdlib'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdlib'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdlib'
Making install in ctype
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/ctype'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/ctype'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/ctype'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/ctype'
Making install in search
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/search'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/search'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/search'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/search'
Making install in stdio
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio'
Makefile:1959: warning: overriding recipe for target 'lib_a-vfwscanf.o'
Makefile:1645: warning: ignoring old recipe for target 'lib_a-vfwscanf.o'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio'
Makefile:1959: warning: overriding recipe for target 'lib_a-vfwscanf.o'
Makefile:1645: warning: ignoring old recipe for target 'lib_a-vfwscanf.o'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio'
Making install in stdio64
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio64'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio64'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio64'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/stdio64'
Making install in string
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/string'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/string'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/string'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/string'
Making install in signal
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/signal'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/signal'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/signal'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/signal'
Making install in time
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/time'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/time'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/time'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/time'
Making install in locale
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/locale'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/locale'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/locale'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/locale'
Making install in sys
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/sys'
Making install in .
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/sys'
make[6]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/sys'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/sys'
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/sys'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/sys'
Making install in reent
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/reent'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/reent'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/reent'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/reent'
Making install in errno
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/errno'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/errno'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/errno'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/errno'
Making install in misc
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/misc'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/misc'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/misc'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/misc'
Making install in machine
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine'
Making install in x86_64
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine/x86_64'
make[6]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine/x86_64'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine/x86_64'
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine/x86_64'
Making install in .
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine'
make[6]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine'
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/machine'
Making install in posix
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/posix'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/posix'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/posix'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/posix'
Making install in syscalls
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/syscalls'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/syscalls'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/syscalls'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/syscalls'
Making install in xdr
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/xdr'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/xdr'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/xdr'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc/xdr'
Making install in .
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc'
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libc'
Making install in libm
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm'
Making install in math
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/math'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/math'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/math'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/math'
Making install in common
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/common'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/common'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/common'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/common'
Making install in complex
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/complex'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/complex'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/complex'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/complex'
Making install in machine
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/machine'
Making install in .
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/machine'
make[6]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/machine'
make[6]: Nothing to be done for 'install-exec-am'.
make[6]: Nothing to be done for 'install-data-am'.
make[6]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/machine'
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/machine'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm/machine'
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm'
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm'
make[5]: Nothing to be done for 'install-exec-am'.
make[5]: Nothing to be done for 'install-data-am'.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm'
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/libm'
Making install in doc
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/doc'
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/doc'
make[4]: Nothing to be done for 'install-exec-am'.
make[4]: Nothing to be done for 'install-data-am'.
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/doc'
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib/doc'
Making install in .
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
make[4]: Nothing to be done for 'install-exec-am'.
 /usr/bin/mkdir -p '/usr/local/x86_64-unknown-cygwin/lib'
 /usr/bin/install -c -m 644  libm.a libc.a '/usr/local/x86_64-unknown-cygwin/lib'
 ( cd '/usr/local/x86_64-unknown-cygwin/lib' && ranlib libm.a )
 ( cd '/usr/local/x86_64-unknown-cygwin/lib' && ranlib libc.a )
rm -f /usr/local/x86_64-unknown-cygwin/lib/libg.a
ln /usr/local/x86_64-unknown-cygwin/lib/libc.a /usr/local/x86_64-unknown-cygwin/lib/libg.a >/dev/null 2>/dev/null || cp /usr/local/x86_64-unknown-cygwin/lib/libc.a /usr/local/x86_64-unknown-cygwin/lib/libg.a
make "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CCASFLAGS=-g -O2" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000   " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/local/lib" "prefix=/usr/local" "tooldir=/usr/local/x86_64-unknown-cygwin" "top_toollibdir=/usr/local/x86_64-unknown-cygwin/lib" "AR=ar" "AS=as" "CC=gcc -L.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin -isystem .../newlib-cygwin/winsup/cygwin/include -B.../newlib-cygwin/x86_64-unknown-cygwin/newlib/ -isystem .../newlib-cygwin/x86_64-unknown-cygwin/newlib/targ-include -isystem .../newlib-cygwin/newlib/libc/include    -I.../newlib-cygwin/winsup/cygwin/include" "LD=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld.exe" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" DO=install multi-do # make
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
if [ -z "" ]; then \
  true; \
else \
  rootpre=`${PWDCMD-pwd}`/; export rootpre; \
  srcrootpre=`cd ../.././newlib; ${PWDCMD-pwd}`/; export srcrootpre; \
  lib=`echo "${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$,\1,'`; \
  compiler="gcc -L.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin -isystem .../newlib-cygwin/winsup/cygwin/include -B.../newlib-cygwin/x86_64-unknown-cygwin/newlib/ -isystem .../newlib-cygwin/x86_64-unknown-cygwin/newlib/targ-include -isystem .../newlib-cygwin/newlib/libc/include    -I.../newlib-cygwin/winsup/cygwin/include"; \
  for i in `${compiler} --print-multi-lib 2>/dev/null`; do \
    dir=`echo $i | sed -e 's/;.*$//'`; \
    if [ "${dir}" = "." ]; then \
      true; \
    else \
      if [ -d ../${dir}/${lib} ]; then \
	flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
	if (cd ../${dir}/${lib}; make "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2" "CCASFLAGS=-g -O2" "CFLAGS_FOR_BUILD=-g -O2" "CFLAGS_FOR_TARGET=-g -O2" "INSTALL=/usr/bin/install -c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-g -O2" "MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 --split-size=5000000    " "PICFLAG=" "PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest" "RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/share/info" "libdir=/usr/local/lib" "prefix=/usr/local" "tooldir=/usr/local/x86_64-unknown-cygwin" "top_toollibdir=/usr/local/x86_64-unknown-cygwin/lib" "AR=ar" "AS=as" "CC=gcc -L.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin -isystem .../newlib-cygwin/winsup/cygwin/include -B.../newlib-cygwin/x86_64-unknown-cygwin/newlib/ -isystem .../newlib-cygwin/x86_64-unknown-cygwin/newlib/targ-include -isystem .../newlib-cygwin/newlib/libc/include    -I.../newlib-cygwin/winsup/cygwin/include" "LD=/usr/lib/gcc/x86_64-pc-cygwin/5.4.0/../../../../x86_64-pc-cygwin/bin/ld.exe" "LIBCFLAGS=-g -O2" "NM=nm" "PICFLAG=" "RANLIB=ranlib" "DESTDIR=" \
			CFLAGS="-g -O2 ${flags}" \
			CCASFLAGS="-g -O2 ${flags}" \
			FCFLAGS=" ${flags}" \
			FFLAGS=" ${flags}" \
			ADAFLAGS=" ${flags}" \
			prefix="/usr/local" \
			exec_prefix="/usr/local" \
			GCJFLAGS=" ${flags}" \
			GOCFLAGS="-O2 -g ${flags}" \
			CXXFLAGS="-g -O2 ${flags}" \
			LIBCFLAGS="-g -O2 ${flags}" \
			LIBCXXFLAGS="-g -O2 -fno-implicit-templates ${flags}" \
			LDFLAGS=" ${flags}" \
			MULTIFLAGS="${flags}" \
			DESTDIR="" \
			INSTALL="/usr/bin/install -c" \
			INSTALL_DATA="/usr/bin/install -c -m 644" \
			INSTALL_PROGRAM="/usr/bin/install -c" \
			INSTALL_SCRIPT="/usr/bin/install -c" \
			install); then \
	  true; \
	else \
	  exit 1; \
	fi; \
      else true; \
      fi; \
    fi; \
  done; \
fi
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
if [ -z "" ]; then \
  /bin/sh ../.././newlib/../mkinstalldirs /usr/local/x86_64-unknown-cygwin/include; \
  for i in ../.././newlib/libc/include/*.h; do \
   /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/`basename $i`; \
  done; \
  /usr/bin/install -c -m 644 newlib.h /usr/local/x86_64-unknown-cygwin/include/newlib.h; \
  /usr/bin/install -c -m 644 _newlib_version.h /usr/local/x86_64-unknown-cygwin/include/_newlib_version.h; \
  /bin/sh ../.././newlib/../mkinstalldirs /usr/local/x86_64-unknown-cygwin/include/machine; \
  for i in ../.././newlib/libc/include/machine/*.h; do \
   /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/machine/`basename $i`; \
  done; \
  for i in ../.././newlib/libc/machine/x86_64/machine/*.h; do \
    if [ -f $i ]; then \
     /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/machine/`basename $i`; \
    else true; fi ; \
  done; \
  /bin/sh ../.././newlib/../mkinstalldirs /usr/local/x86_64-unknown-cygwin/include/rpc; \
  for i in ../.././newlib/libc/include/rpc/*.h; do \
   /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/rpc/`basename $i`; \
  done; \
  /bin/sh ../.././newlib/../mkinstalldirs /usr/local/x86_64-unknown-cygwin/include/sys; \
  for i in ../.././newlib/libc/include/sys/*.h; do \
   /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/sys/`basename $i`; \
  done; \
  for i in ../.././newlib/libc/machine/x86_64/sys/*.h; do \
    if [ -f $i ]; then \
     /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/sys/`basename $i`; \
    else true; fi ; \
  done ; \
  for i in ../.././newlib/libc/machine/x86_64/include/*.h; do \
    if [ -f $i ]; then \
     /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/`basename $i`; \
    else true; fi ; \
  done ; \
  for i in ../.././newlib/libc/sys//sys/*.h; do \
    if [ -f $i ]; then \
     /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/sys/`basename $i`; \
    else true; fi ; \
  done ; \
  /bin/sh ../.././newlib/../mkinstalldirs /usr/local/x86_64-unknown-cygwin/include/bits; \
  for i in ../.././newlib/libc/sys//bits/*.h; do \
    if [ -f $i ]; then \
     /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/bits/`basename $i`; \
    else true; fi ; \
  done ; \
  for i in ../.././newlib/libc/sys//machine/*.h; do \
    if [ -f $i ]; then \
     /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/machine/`basename $i`; \
    else true; fi ; \
  done ; \
  for i in ../.././newlib/libc/sys//include/*.h; do \
    if [ -f $i ]; then \
     /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/`basename $i`; \
    else true; fi ; \
  done ; \
  for i in ../.././newlib/libc/sys//include/*; do \
    if [ -d $i ]; then \
	for j in $i/*.h; do \
            /usr/bin/install -c -m 644 $j /usr/local/x86_64-unknown-cygwin/include/`basename $i`/`basename $j`; \
	done ; \
    else true; fi ; \
  done ; \
  for i in ../.././newlib/libc/sys//machine/x86_64/include/*.h; do \
    if [ -f $i ]; then \
     /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/include/machine/`basename $i`; \
    else true; fi ; \
  done ; \
  for i in ; do \
    if [ -f /usr/local/x86_64-unknown-cygwin/include/$i ]; then \
	rm /usr/local/x86_64-unknown-cygwin/include/$i; \
    else true; fi ; \
  done ; \
else true; fi
 /usr/bin/mkdir -p '/usr/local/x86_64-unknown-cygwin/lib'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
make[2]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/newlib'
make[2]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup'
/usr/bin/install -c -d /usr/local/share/doc/Cygwin
for i in ../.././winsup/CYGWIN_LICENSE ../.././winsup/COPYING; do \
  /usr/bin/install -c $i /usr/local/share/doc/Cygwin ; \
done
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin'
make -C .../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver libcygserver.a
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[4]: 'libcygserver.a' is up to date.
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
/usr/bin/install -c cygwin0.dll /usr/local/bin/cygwin1.dll; \
for i in libcygwin.a crt0.o gcrt0.o libgmon.a libpthread.a libutil.a .../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin/libm.a .../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin/libc.a libdl.a libresolv.a librt.a libacl.a automode.o binmode.o textmode.o textreadmode.o libautomode.a libbinmode.a libtextmode.a libtextreadmode.a; do \
    /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/lib/`basename $i` ; \
done
cd /usr/local/x86_64-unknown-cygwin/lib && ln -sf libcygwin.a libg.a
cd ../../.././winsup/cygwin; \
for sub in `find include -name '[a-z]*' -type d -print | sort`; do \
    /usr/bin/install -c -m 755 -d /usr/local/x86_64-unknown-cygwin/$sub; \
    for i in $sub/*.h ; do \
      /usr/bin/install -c -m 644 $i /usr/local/x86_64-unknown-cygwin/$sub/`basename $i` ; \
    done ; \
done ; \

cd ../../.././winsup/cygwin; \
for i in `find . -type f ! -path './release/*' -name '*.2'`; do \
    /usr/bin/install -c -m 644 $i /usr/local/share/man/man2/`basename $i` ; \
done; \
for i in `find . -type f ! -path './release/*' -name '*.3'`; do \
    /usr/bin/install -c -m 644 $i /usr/local/share/man/man3/`basename $i` ; \
done; \
for i in `find . -type f ! -path './release/*' -name '*.5'`; do \
    /usr/bin/install -c -m 644 $i /usr/local/share/man/man5/`basename $i` ; \
done; \
for i in `find . -type f ! -path './release/*' -name '*.7'`; do \
    /usr/bin/install -c -m 644 $i /usr/local/share/man/man7/`basename $i` ; \
done
/usr/bin/install -c -m 644 ../../.././winsup/cygwin/cygwin.ldif /usr/local/share/cygwin
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin'
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin'
make -C .../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver libcygserver.a
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[4]: 'libcygserver.a' is up to date.
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin'
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
/bin/mkdir -p /usr/local/sbin /usr/local/bin /usr/local/etc/defaults/etc /usr/local/share/doc/Cygwin
/usr/bin/install -c cygserver.exe /usr/local/sbin/cygserver.exe
/usr/bin/install -c ../../.././winsup/cygserver/cygserver-config /usr/local/bin/cygserver-config
/usr/bin/install -c -m 644 ../../.././winsup/cygserver/cygserver.conf /usr/local/etc/defaults/etc/cygserver.conf
/usr/bin/install -c -m 644 ../../.././winsup/cygserver/README /usr/local/share/doc/Cygwin/cygserver.README
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/doc'
/usr/bin/install -c -m 644 cygwin-ug-net/cygwin-ug-net.pdf cygwin-api/cygwin-api.pdf /usr/local/share/doc/
/usr/bin/install -c -m 644 cygwin-ug-net/*.html /usr/local/share/doc//cygwin-ug-net
(cd /usr/local/share/doc//cygwin-ug-net && ln -f cygwin-ug-net.html index.html)
/usr/bin/install -c -m 644 ../../.././winsup/doc/docbook.css /usr/local/share/doc//cygwin-ug-net
/usr/bin/install -c -m 644 cygwin-api/*.html /usr/local/share/doc//cygwin-api
(cd /usr/local/share/doc//cygwin-api && ln -f cygwin-api.html index.html)
/usr/bin/install -c -m 644 ../../.././winsup/doc/docbook.css /usr/local/share/doc//cygwin-api
/usr/bin/install -c -m 644 *.1 /usr/local/share/man/man1
/usr/bin/install -c -m 644 *.3 /usr/local/share/man/man3
/usr/bin/install -c -m 755 -d /usr/local/share/info
/usr/bin/install -c -m 644 *.info* /usr/local/share/info
/usr/bin/install -c ../../.././winsup/doc/etc.postinstall.cygwin-doc.sh /usr/local/etc/postinstall/cygwin-doc.sh
/usr/bin/install -c ../../.././winsup/doc/etc.preremove.cygwin-doc.sh /usr/local/etc/preremove/cygwin-doc.sh
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/doc'
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/utils'
make[4]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin'
make -C .../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver libcygserver.a
make[5]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[5]: 'libcygserver.a' is up to date.
make[5]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygserver'
make[4]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/cygwin'
/bin/mkdir -p /usr/local/bin
for i in cygpath.exe getconf.exe getfacl.exe ldd.exe locale.exe kill.exe minidumper.exe mkgroup.exe mkpasswd.exe mount.exe passwd.exe pldd.exe ps.exe regtool.exe setfacl.exe setmetamode.exe ssp.exe tzset.exe umount.exe dumper.exe cygcheck.exe cygwin-console-helper.exe ldh.exe strace.exe ; do \
  n=`echo $i | sed 's,y,y,'`; \
  /usr/bin/install -c $i /usr/local/bin/$n; \
done
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/utils'
make[3]: Entering directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/lsaauth'
/bin/mkdir -p /usr/local/bin
/usr/bin/install -c cyglsa64.dll /usr/local/bin/cyglsa64.dll
/usr/bin/install -c ../../.././winsup/lsaauth/cyglsa-config /usr/local/bin/cyglsa-config
make[3]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup/lsaauth'
make[2]: Leaving directory '.../newlib-cygwin/x86_64-unknown-cygwin/winsup'
make[1]: Leaving directory '.../newlib-cygwin'

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-07-31  9:55                     ` Corinna Vinschen
                                         ` (2 preceding siblings ...)
  2017-08-18 20:01                       ` Brian Inglis
@ 2017-08-19 14:01                       ` Brian Inglis
  2017-08-21  3:09                         ` Brian Inglis
  3 siblings, 1 reply; 25+ messages in thread
From: Brian Inglis @ 2017-08-19 14:01 UTC (permalink / raw)
  To: newlib

On 2017-07-31 03:55, Corinna Vinschen wrote:
> On Jul 28 14:50, Brian Inglis wrote:
>> On 2017-07-26 13:34, Corinna Vinschen wrote:
>>> On Jul 26 11:27, Brian Inglis wrote:
>>>> On 2017-07-26 04:49, Corinna Vinschen wrote:
>>>>> On Jul 25 14:13, Brian Inglis wrote:
>>>>>> On 2017-07-25 12:52, Corinna Vinschen wrote:
>>>>>>> Well... on *third* thought, targets may redefine time_t via redefining
>>>>>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
>>>>>>> Maybe it is safer to use always strtoll_l and just break this down to
>>>>>>> time_t on the way.
>>>>>>
>>>>>> My concern has always been do all newlib RTEMS targets support long
>>>>>> long, even if same as long, and stroll_l?
>>>>>
>>>>> Yes.  The long long functions are not excluded like we do with long
>>>>> double stuff.
>>>>>
>>>>>> Trying to build standalone or combined STC for this with changed strptime.c
>>>>>> ld/collect2 fails to resolve ...global_locale.
>>>>>
>>>>> Yeah, it's an internal function to newlib.  You need to include
>>>>> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
>>>>> userspace will do.
>>>>
>>>> Not doing it for me: that's why I asked if there were undistributed locale
>>>> changes in the tree, and maybe in a dev snapshot?
>>>
>>> No, it's an *internal* function, it doesn't get exported.  There's no
>>> (easy) way to build strptime.c outside the newlib tree as part of the
>>> lib.  That's why I said a userspace STC is enough.  Don't try to build
>>> strptime.c as standalone.  Just build it as part of newlib/Cygwin and
>>> test it from userspace by calling it.
>>
>> Finally got all the prereqs installed and a clean build.
>> My configure uses the default prefix /usr/local, which is at the head of my
>> personal path.
>> Is that enough for a test build, and how do I do that, or do I have to replace
>> the current release, with configure --prefix=/, make install into /bin/?
> 
> The configured paths don't matter for the Cygwin DLL itself, and your
> patch doesn't change any headers or entry points of the lib.  So just exit
> from Cygwin, replace the DLL in Explorer, start a shell and go ahead.

Test still won't run as expected after DLL replacement, nor coreutils strptime.
Aren't there lib import files or maps or anything I also have to move?
Attached slightly redacted build config and make logs.

Resending without attachments to see if this makes it to the list.

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-08-19 14:01                       ` Brian Inglis
@ 2017-08-21  3:09                         ` Brian Inglis
  2017-08-21  9:10                           ` Corinna Vinschen
  0 siblings, 1 reply; 25+ messages in thread
From: Brian Inglis @ 2017-08-21  3:09 UTC (permalink / raw)
  To: newlib

On 2017-08-18 14:00, Brian Inglis wrote:
> On 2017-07-31 03:55, Corinna Vinschen wrote:
>> On Jul 28 14:50, Brian Inglis wrote:
>>> On 2017-07-26 13:34, Corinna Vinschen wrote:
>>>> On Jul 26 11:27, Brian Inglis wrote:
>>>>> On 2017-07-26 04:49, Corinna Vinschen wrote:
>>>>>> On Jul 25 14:13, Brian Inglis wrote:
>>>>>>> On 2017-07-25 12:52, Corinna Vinschen wrote:
>>>>>>>> Well... on *third* thought, targets may redefine time_t via redefining
>>>>>>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
>>>>>>>> Maybe it is safer to use always strtoll_l and just break this down to
>>>>>>>> time_t on the way.
>>>>>>>
>>>>>>> My concern has always been do all newlib RTEMS targets support long
>>>>>>> long, even if same as long, and stroll_l?
>>>>>>
>>>>>> Yes.  The long long functions are not excluded like we do with long
>>>>>> double stuff.
>>>>>>
>>>>>>> Trying to build standalone or combined STC for this with changed strptime.c
>>>>>>> ld/collect2 fails to resolve ...global_locale.
>>>>>>
>>>>>> Yeah, it's an internal function to newlib.  You need to include
>>>>>> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
>>>>>> userspace will do.
>>>>>
>>>>> Not doing it for me: that's why I asked if there were undistributed locale
>>>>> changes in the tree, and maybe in a dev snapshot?
>>>>
>>>> No, it's an *internal* function, it doesn't get exported.  There's no
>>>> (easy) way to build strptime.c outside the newlib tree as part of the
>>>> lib.  That's why I said a userspace STC is enough.  Don't try to build
>>>> strptime.c as standalone.  Just build it as part of newlib/Cygwin and
>>>> test it from userspace by calling it.
>>>
>>> Finally got all the prereqs installed and a clean build.
>>> My configure uses the default prefix /usr/local, which is at the head of my
>>> personal path.
>>> Is that enough for a test build, and how do I do that, or do I have to replace
>>> the current release, with configure --prefix=/, make install into /bin/?
>>
>> The configured paths don't matter for the Cygwin DLL itself, and your
>> patch doesn't change any headers or entry points of the lib.  So just exit
>> from Cygwin, replace the DLL in Explorer, start a shell and go ahead.
> 
> Test still won't run as expected after DLL replacement, nor coreutils strptime.
> Aren't there lib import files or maps or anything I also have to move?
> Attached slightly redacted build config and make logs.
> 
> Resending without attachments to see if this makes it to the list.

Doh! Cygwin has its own strptime.cc whereas it uses strftime.c from newlib.
Guess I should also patch Cygwin strptime.cc in a similar manner.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: Cygwin strptime() is missing "%s" which strftime() has
  2017-08-21  3:09                         ` Brian Inglis
@ 2017-08-21  9:10                           ` Corinna Vinschen
  2017-08-24  2:14                             ` [PATCH] newlib/libc/time/strptime.c(strptime_l) add strptime %F %s Brian Inglis
  0 siblings, 1 reply; 25+ messages in thread
From: Corinna Vinschen @ 2017-08-21  9:10 UTC (permalink / raw)
  To: Brian Inglis; +Cc: newlib

[-- Attachment #1: Type: text/plain, Size: 2975 bytes --]

On Aug 19 14:53, Brian Inglis wrote:
> On 2017-08-18 14:00, Brian Inglis wrote:
> > On 2017-07-31 03:55, Corinna Vinschen wrote:
> >> On Jul 28 14:50, Brian Inglis wrote:
> >>> On 2017-07-26 13:34, Corinna Vinschen wrote:
> >>>> On Jul 26 11:27, Brian Inglis wrote:
> >>>>> On 2017-07-26 04:49, Corinna Vinschen wrote:
> >>>>>> On Jul 25 14:13, Brian Inglis wrote:
> >>>>>>> On 2017-07-25 12:52, Corinna Vinschen wrote:
> >>>>>>>> Well... on *third* thought, targets may redefine time_t via redefining
> >>>>>>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
> >>>>>>>> Maybe it is safer to use always strtoll_l and just break this down to
> >>>>>>>> time_t on the way.
> >>>>>>>
> >>>>>>> My concern has always been do all newlib RTEMS targets support long
> >>>>>>> long, even if same as long, and stroll_l?
> >>>>>>
> >>>>>> Yes.  The long long functions are not excluded like we do with long
> >>>>>> double stuff.
> >>>>>>
> >>>>>>> Trying to build standalone or combined STC for this with changed strptime.c
> >>>>>>> ld/collect2 fails to resolve ...global_locale.
> >>>>>>
> >>>>>> Yeah, it's an internal function to newlib.  You need to include
> >>>>>> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
> >>>>>> userspace will do.
> >>>>>
> >>>>> Not doing it for me: that's why I asked if there were undistributed locale
> >>>>> changes in the tree, and maybe in a dev snapshot?
> >>>>
> >>>> No, it's an *internal* function, it doesn't get exported.  There's no
> >>>> (easy) way to build strptime.c outside the newlib tree as part of the
> >>>> lib.  That's why I said a userspace STC is enough.  Don't try to build
> >>>> strptime.c as standalone.  Just build it as part of newlib/Cygwin and
> >>>> test it from userspace by calling it.
> >>>
> >>> Finally got all the prereqs installed and a clean build.
> >>> My configure uses the default prefix /usr/local, which is at the head of my
> >>> personal path.
> >>> Is that enough for a test build, and how do I do that, or do I have to replace
> >>> the current release, with configure --prefix=/, make install into /bin/?
> >>
> >> The configured paths don't matter for the Cygwin DLL itself, and your
> >> patch doesn't change any headers or entry points of the lib.  So just exit
> >> from Cygwin, replace the DLL in Explorer, start a shell and go ahead.
> > 
> > Test still won't run as expected after DLL replacement, nor coreutils strptime.
> > Aren't there lib import files or maps or anything I also have to move?
> > Attached slightly redacted build config and make logs.
> > 
> > Resending without attachments to see if this makes it to the list.
> 
> Doh! Cygwin has its own strptime.cc whereas it uses strftime.c from newlib.
> Guess I should also patch Cygwin strptime.cc in a similar manner.

Oh, right!  I forget about it *blush*


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* [PATCH] newlib/libc/time/strptime.c(strptime_l) add strptime %F %s
  2017-08-21  9:10                           ` Corinna Vinschen
@ 2017-08-24  2:14                             ` Brian Inglis
  2017-08-24  8:50                               ` Corinna Vinschen
  0 siblings, 1 reply; 25+ messages in thread
From: Brian Inglis @ 2017-08-24  2:14 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 3375 bytes --]

On 2017-08-21 03:01, Corinna Vinschen wrote:
> On Aug 19 14:53, Brian Inglis wrote:
>> On 2017-08-18 14:00, Brian Inglis wrote:
>>> On 2017-07-31 03:55, Corinna Vinschen wrote:
>>>> On Jul 28 14:50, Brian Inglis wrote:
>>>>> On 2017-07-26 13:34, Corinna Vinschen wrote:
>>>>>> On Jul 26 11:27, Brian Inglis wrote:
>>>>>>> On 2017-07-26 04:49, Corinna Vinschen wrote:
>>>>>>>> On Jul 25 14:13, Brian Inglis wrote:
>>>>>>>>> On 2017-07-25 12:52, Corinna Vinschen wrote:
>>>>>>>>>> Well... on *third* thought, targets may redefine time_t via redefining
>>>>>>>>>> _TIME_T_.  Targets not doing that will get long, so yeah, you're right.
>>>>>>>>>> Maybe it is safer to use always strtoll_l and just break this down to
>>>>>>>>>> time_t on the way.
>>>>>>>>>
>>>>>>>>> My concern has always been do all newlib RTEMS targets support long
>>>>>>>>> long, even if same as long, and stroll_l?
>>>>>>>>
>>>>>>>> Yes.  The long long functions are not excluded like we do with long
>>>>>>>> double stuff.
>>>>>>>>
>>>>>>>>> Trying to build standalone or combined STC for this with changed strptime.c
>>>>>>>>> ld/collect2 fails to resolve ...global_locale.
>>>>>>>>
>>>>>>>> Yeah, it's an internal function to newlib.  You need to include
>>>>>>>> libc/locale/setlocale.h somehow to accomplish that.  STC from Cygwin
>>>>>>>> userspace will do.
>>>>>>>
>>>>>>> Not doing it for me: that's why I asked if there were undistributed locale
>>>>>>> changes in the tree, and maybe in a dev snapshot?
>>>>>>
>>>>>> No, it's an *internal* function, it doesn't get exported.  There's no
>>>>>> (easy) way to build strptime.c outside the newlib tree as part of the
>>>>>> lib.  That's why I said a userspace STC is enough.  Don't try to build
>>>>>> strptime.c as standalone.  Just build it as part of newlib/Cygwin and
>>>>>> test it from userspace by calling it.
>>>>>
>>>>> Finally got all the prereqs installed and a clean build.
>>>>> My configure uses the default prefix /usr/local, which is at the head of my
>>>>> personal path.
>>>>> Is that enough for a test build, and how do I do that, or do I have to replace
>>>>> the current release, with configure --prefix=/, make install into /bin/?
>>>>
>>>> The configured paths don't matter for the Cygwin DLL itself, and your
>>>> patch doesn't change any headers or entry points of the lib.  So just exit
>>>> from Cygwin, replace the DLL in Explorer, start a shell and go ahead.
>>>
>>> Test still won't run as expected after DLL replacement, nor coreutils strptime.
>>> Aren't there lib import files or maps or anything I also have to move?
>>> Attached slightly redacted build config and make logs.
>>>
>>> Resending without attachments to see if this makes it to the list.
>>
>> Doh! Cygwin has its own strptime.cc whereas it uses strftime.c from newlib.
>> Guess I should also patch Cygwin strptime.cc in a similar manner.
> 
> Oh, right!  I forget about it *blush*

Attached patch to support %F and %s in newlib libc time strptime.c strptime_l().

In case the issue comes up, if the user wants to support %s as in date(1) with a
preceding @ flag, they just have to include that verbatim before the format as
in "@%s".

Is there any way to test this newlib function on a Cygwin platform?
I don't have access to a supported platform.

Similar patch submitted for Cygwin %s.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

[-- Attachment #2: 0001-newlib-libc-time-strptime.c-strptime_l-add-strptime-.patch --]
[-- Type: text/plain, Size: 2343 bytes --]

From 8913eb99285915fef945767340b226002a4c9502 Mon Sep 17 00:00:00 2001
From: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Date: Tue, 22 Aug 2017 15:06:02 -0600
Subject: [PATCH] newlib/libc/time/strptime.c(strptime_l) add strptime %F %s

---
 newlib/libc/time/strptime.c | 35 +++++++++++++++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/time/strptime.c b/newlib/libc/time/strptime.c
index c0861eb87..233658406 100644
--- a/newlib/libc/time/strptime.c
+++ b/newlib/libc/time/strptime.c
@@ -38,6 +38,9 @@
 #include <strings.h>
 #include <ctype.h>
 #include <stdlib.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <limits.h>
 #include "../locale/setlocale.h"
 
 #define _ctloc(x) (_CurrentTimeLocale->x)
@@ -230,8 +233,17 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
 		buf = s;
 		ymd |= SET_MDAY;
 		break;
+	    case 'F' :		/* %Y-%m-%d - GNU extension */
+		fprintf( stderr, "fmt %s buf %s\n", format, buf);
+		s = strptime_l (buf, "%Y-%m-%d", timeptr, locale);
+		fprintf( stderr, "fmt %s buf %s s %s\n", format, buf, s);
+		if (s == NULL || s == buf)
+		    return NULL;
+		buf = s;
+		ymd |= SET_YMD;
+		break;
 	    case 'H' :
-	    case 'k' :
+	    case 'k' :		/* hour with leading space - GNU extension */
 		ret = strtol_l (buf, &s, 10, locale);
 		if (s == buf)
 		    return NULL;
@@ -239,7 +251,7 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
 		buf = s;
 		break;
 	    case 'I' :
-	    case 'l' :
+	    case 'l' :		/* hour with leading space - GNU extension */
 		ret = strtol_l (buf, &s, 10, locale);
 		if (s == buf)
 		    return NULL;
@@ -300,6 +312,25 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
 		    return NULL;
 		buf = s;
 		break;
+	    case 's' : {	/* seconds since Unix epoch - GNU extension */
+		    long long sec;
+		    time_t t;
+		    int errno_save;
+
+		    errno_save = errno;
+		    errno = 0;
+		    sec = strtoll_l (buf, &s, 10, locale);
+		    t = sec;
+		    if (s == buf
+			|| errno != 0
+			|| t != sec
+			|| localtime_r (&t, timeptr) != timeptr)
+			return NULL;
+		    errno = errno_save;
+		    buf = s;
+		    ymd |= SET_YDAY | SET_WDAY | SET_YMD;
+		    break;
+		}
 	    case 'S' :
 		ret = strtol_l (buf, &s, 10, locale);
 		if (s == buf)
-- 
2.14.0


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] newlib/libc/time/strptime.c(strptime_l) add strptime %F %s
  2017-08-24  2:14                             ` [PATCH] newlib/libc/time/strptime.c(strptime_l) add strptime %F %s Brian Inglis
@ 2017-08-24  8:50                               ` Corinna Vinschen
  2017-08-25  5:30                                 ` Brian Inglis
  0 siblings, 1 reply; 25+ messages in thread
From: Corinna Vinschen @ 2017-08-24  8:50 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 3444 bytes --]

Hi Brian,

On Aug 23 12:59, Brian Inglis wrote:
> On 2017-08-21 03:01, Corinna Vinschen wrote:
> > Oh, right!  I forget about it *blush*
> 
> Attached patch to support %F and %s in newlib libc time strptime.c strptime_l().
> 
> In case the issue comes up, if the user wants to support %s as in date(1) with a
> preceding @ flag, they just have to include that verbatim before the format as
> in "@%s".
> 
> Is there any way to test this newlib function on a Cygwin platform?
> I don't have access to a supported platform.
> 
> Similar patch submitted for Cygwin %s.
> 
> -- 
> Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

> From 8913eb99285915fef945767340b226002a4c9502 Mon Sep 17 00:00:00 2001
> From: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
> Date: Tue, 22 Aug 2017 15:06:02 -0600
> Subject: [PATCH] newlib/libc/time/strptime.c(strptime_l) add strptime %F %s
> 
> ---
>  newlib/libc/time/strptime.c | 35 +++++++++++++++++++++++++++++++++--
>  1 file changed, 33 insertions(+), 2 deletions(-)
> 
> diff --git a/newlib/libc/time/strptime.c b/newlib/libc/time/strptime.c
> index c0861eb87..233658406 100644
> --- a/newlib/libc/time/strptime.c
> +++ b/newlib/libc/time/strptime.c
> @@ -38,6 +38,9 @@
>  #include <strings.h>
>  #include <ctype.h>
>  #include <stdlib.h>
> +#include <errno.h>
> +#include <inttypes.h>
> +#include <limits.h>
>  #include "../locale/setlocale.h"
>  
>  #define _ctloc(x) (_CurrentTimeLocale->x)
> @@ -230,8 +233,17 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
>  		buf = s;
>  		ymd |= SET_MDAY;
>  		break;
> +	    case 'F' :		/* %Y-%m-%d - GNU extension */
> +		fprintf( stderr, "fmt %s buf %s\n", format, buf);
> +		s = strptime_l (buf, "%Y-%m-%d", timeptr, locale);
> +		fprintf( stderr, "fmt %s buf %s s %s\n", format, buf, s);

Debugging residue?

> +		if (s == NULL || s == buf)
> +		    return NULL;
> +		buf = s;
> +		ymd |= SET_YMD;
> +		break;
>  	    case 'H' :
> -	    case 'k' :
> +	    case 'k' :		/* hour with leading space - GNU extension */
>  		ret = strtol_l (buf, &s, 10, locale);
>  		if (s == buf)
>  		    return NULL;
> @@ -239,7 +251,7 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
>  		buf = s;
>  		break;
>  	    case 'I' :
> -	    case 'l' :
> +	    case 'l' :		/* hour with leading space - GNU extension */
>  		ret = strtol_l (buf, &s, 10, locale);
>  		if (s == buf)
>  		    return NULL;
> @@ -300,6 +312,25 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
>  		    return NULL;
>  		buf = s;
>  		break;
> +	    case 's' : {	/* seconds since Unix epoch - GNU extension */

Opening brace on next line, please, indented as the closing brace.

> +		    long long sec;
> +		    time_t t;
> +		    int errno_save;
> +
> +		    errno_save = errno;
> +		    errno = 0;
> +		    sec = strtoll_l (buf, &s, 10, locale);
> +		    t = sec;
> +		    if (s == buf
> +			|| errno != 0
> +			|| t != sec
> +			|| localtime_r (&t, timeptr) != timeptr)
> +			return NULL;
> +		    errno = errno_save;
> +		    buf = s;
> +		    ymd |= SET_YDAY | SET_WDAY | SET_YMD;
> +		    break;
> +		}
>  	    case 'S' :
>  		ret = strtol_l (buf, &s, 10, locale);
>  		if (s == buf)
> -- 
> 2.14.0
 
Other than the above, looks good.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] newlib/libc/time/strptime.c(strptime_l) add strptime %F %s
  2017-08-24  8:50                               ` Corinna Vinschen
@ 2017-08-25  5:30                                 ` Brian Inglis
  2017-08-25 12:06                                   ` Corinna Vinschen
  0 siblings, 1 reply; 25+ messages in thread
From: Brian Inglis @ 2017-08-25  5:30 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

On 2017-08-24 02:44, Corinna Vinschen wrote:
> Hi Brian,
> On Aug 23 12:59, Brian Inglis wrote:
>> On 2017-08-21 03:01, Corinna Vinschen wrote:
>>> Oh, right!  I forget about it *blush*
>> Attached patch to support %F and %s in newlib libc time strptime.c strptime_l().
>> In case the issue comes up, if the user wants to support %s as in date(1) with a
>> preceding @ flag, they just have to include that verbatim before the format as
>> in "@%s".
>> Is there any way to test this newlib function on a Cygwin platform?
>> I don't have access to a supported platform.
>> Similar patch submitted for Cygwin %s.
> Debugging residue?
> Opening brace on next line, please, indented as the closing brace.
> Other than the above, looks good.

Sorry about that - totally missed it - both fixed in attached patch.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

[-- Attachment #2: 0001-newlib-libc-time-strptime.c-strptime_l-add-F-s-suppo.patch --]
[-- Type: text/plain, Size: 2245 bytes --]

From 3ee59712cd04a6fbaa074b83c92c17bfb5f2e7f1 Mon Sep 17 00:00:00 2001
From: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
Date: Thu, 24 Aug 2017 13:12:17 -0600
Subject: [PATCH] newlib/libc/time/strptime.c(strptime_l) add %F %s support for
 strptime

---
 newlib/libc/time/strptime.c | 34 ++++++++++++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/time/strptime.c b/newlib/libc/time/strptime.c
index c0861eb87..2ec001a1e 100644
--- a/newlib/libc/time/strptime.c
+++ b/newlib/libc/time/strptime.c
@@ -38,6 +38,9 @@
 #include <strings.h>
 #include <ctype.h>
 #include <stdlib.h>
+#include <errno.h>
+#include <inttypes.h>
+#include <limits.h>
 #include "../locale/setlocale.h"
 
 #define _ctloc(x) (_CurrentTimeLocale->x)
@@ -230,8 +233,15 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
 		buf = s;
 		ymd |= SET_MDAY;
 		break;
+	    case 'F' :		/* %Y-%m-%d - GNU extension */
+		s = strptime_l (buf, "%Y-%m-%d", timeptr, locale);
+		if (s == NULL || s == buf)
+		    return NULL;
+		buf = s;
+		ymd |= SET_YMD;
+		break;
 	    case 'H' :
-	    case 'k' :
+	    case 'k' :		/* hour with leading space - GNU extension */
 		ret = strtol_l (buf, &s, 10, locale);
 		if (s == buf)
 		    return NULL;
@@ -239,7 +249,7 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
 		buf = s;
 		break;
 	    case 'I' :
-	    case 'l' :
+	    case 'l' :		/* hour with leading space - GNU extension */
 		ret = strtol_l (buf, &s, 10, locale);
 		if (s == buf)
 		    return NULL;
@@ -300,6 +310,26 @@ strptime_l (const char *buf, const char *format, struct tm *timeptr,
 		    return NULL;
 		buf = s;
 		break;
+	    case 's' :		/* seconds since Unix epoch - GNU extension */
+		{
+		    long long sec;
+		    time_t t;
+		    int save_errno;
+
+		    save_errno = errno;
+		    errno = 0;
+		    sec = strtoll_l (buf, &s, 10, locale);
+		    t = sec;
+		    if (s == buf
+			|| errno != 0
+			|| t != sec
+			|| localtime_r (&t, timeptr) != timeptr)
+			return NULL;
+		    errno = save_errno;
+		    buf = s;
+		    ymd |= SET_YDAY | SET_WDAY | SET_YMD;
+		    break;
+		}
 	    case 'S' :
 		ret = strtol_l (buf, &s, 10, locale);
 		if (s == buf)
-- 
2.14.1


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [PATCH] newlib/libc/time/strptime.c(strptime_l) add strptime %F %s
  2017-08-25  5:30                                 ` Brian Inglis
@ 2017-08-25 12:06                                   ` Corinna Vinschen
  0 siblings, 0 replies; 25+ messages in thread
From: Corinna Vinschen @ 2017-08-25 12:06 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 1459 bytes --]

On Aug 24 13:18, Brian Inglis wrote:
> On 2017-08-24 02:44, Corinna Vinschen wrote:
> > Hi Brian,
> > On Aug 23 12:59, Brian Inglis wrote:
> >> On 2017-08-21 03:01, Corinna Vinschen wrote:
> >>> Oh, right!  I forget about it *blush*
> >> Attached patch to support %F and %s in newlib libc time strptime.c strptime_l().
> >> In case the issue comes up, if the user wants to support %s as in date(1) with a
> >> preceding @ flag, they just have to include that verbatim before the format as
> >> in "@%s".
> >> Is there any way to test this newlib function on a Cygwin platform?
> >> I don't have access to a supported platform.
> >> Similar patch submitted for Cygwin %s.
> > Debugging residue?
> > Opening brace on next line, please, indented as the closing brace.
> > Other than the above, looks good.
> 
> Sorry about that - totally missed it - both fixed in attached patch.
> 
> -- 
> Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

> From 3ee59712cd04a6fbaa074b83c92c17bfb5f2e7f1 Mon Sep 17 00:00:00 2001
> From: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
> Date: Thu, 24 Aug 2017 13:12:17 -0600
> Subject: [PATCH] newlib/libc/time/strptime.c(strptime_l) add %F %s support for
>  strptime
> 
> ---
>  newlib/libc/time/strptime.c | 34 ++++++++++++++++++++++++++++++++--
>  1 file changed, 32 insertions(+), 2 deletions(-)

Pushed.


Thanks,
Corinna


-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2017-08-25 12:05 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <BY1PR09MB0343663DE41D927E67CF0CCEA5BB0@BY1PR09MB0343.namprd09.prod.outlook.com>
     [not found] ` <acc19ec5-055b-1bd4-997d-a247755163bf@SystematicSw.ab.ca>
2017-07-24 20:42   ` Cygwin strptime() is missing "%s" which strftime() has Brian Inglis
2017-07-24 21:36     ` Craig Howland
2017-07-24 23:04       ` Brian Inglis
2017-07-25  9:19       ` Corinna Vinschen
2017-07-25  9:16     ` Corinna Vinschen
2017-07-25 16:47       ` Brian Inglis
2017-07-25 17:38         ` Craig Howland
2017-07-25 18:52         ` Corinna Vinschen
2017-07-25 20:13           ` Brian Inglis
2017-07-26 10:49             ` Corinna Vinschen
2017-07-26 17:27               ` Brian Inglis
2017-07-26 19:34                 ` Corinna Vinschen
2017-07-28 20:50                   ` Brian Inglis
2017-07-31  9:55                     ` Corinna Vinschen
2017-08-18 18:53                       ` Corinna Vinschen
2017-08-18 19:38                         ` Brian Inglis
2017-08-18 19:38                       ` Brian Inglis
2017-08-18 20:01                       ` Brian Inglis
2017-08-19 14:01                       ` Brian Inglis
2017-08-21  3:09                         ` Brian Inglis
2017-08-21  9:10                           ` Corinna Vinschen
2017-08-24  2:14                             ` [PATCH] newlib/libc/time/strptime.c(strptime_l) add strptime %F %s Brian Inglis
2017-08-24  8:50                               ` Corinna Vinschen
2017-08-25  5:30                                 ` Brian Inglis
2017-08-25 12:06                                   ` Corinna Vinschen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).