delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/10/28/13:21:29

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; q=dns; s=
default; b=MK30+noXoeirs8cMH8SgaSMxtjAtZsEBGiEvllchPSPL0puVFCeIV
iLYxv32gNcsN/t5vgZdhqXOIR+2doYfpqYNpZ8cp9t7Y/XpMUdp1SSOkiEu3/6p0
1+NT7iLRmbYlwQA+B+0jPOlh5nnxyMNirz9MT/1yJ593PX5JVxWLLY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:references
:mime-version:content-type:content-transfer-encoding; s=default;
bh=y1x1Ua6u4AMClkp0/Cyngz02svI=; b=xG/eyr2aftjWAYtyeFI4O6PrxsfN
1JkDCcWVmrGgDspVqJaV0+H5IxRP3cBdke1Milqsn3+L+V7z3xUVUMaZNn3X0HD6
9BcJP3e/vA1rj5BCtA/cPvRlpy1t7yOPQ4/T2YgO4GCLeXQ5ZtyHGQKLC+CSXdaW
59RfiowyyI7shXY=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Subject: Re: Bash unable to print epoch timestamp
Date: Wed, 28 Oct 2015 17:20:56 +0000 (UTC)
Lines: 55
Message-ID: <loom.20151028T180008-140@post.gmane.org>
References: <562A996C DOT 9070904 AT SystematicSw DOT ab DOT ca> <562E643C DOT 3090004 AT SystematicSw DOT ab DOT ca> <562ED064 DOT 6050100 AT SystematicSw DOT ab DOT ca> <20151027084642 DOT GM5319 AT calimero DOT vinschen DOT de>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes

Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes:

> 
> On Oct 26 19:16, Brian Inglis wrote:
> > On 2015-10-26 11:34, Brian Inglis wrote:
> > >Third time lucky - pasting inline into email and resending to all
previous lists.
> > >
> > >Please note that conversion into too-small buffer size in regression
test may not have expected result!
> > >
> > >Tried to build with below and variants:
> > >gcc -D_REGRESSION_TEST -D_COMPILING_NEWLIB -Dsniprintf=snprintf
> -I/usr/src/cygwin-2.2.1-1.src/newlib-cygwin/winsup/cygwin/include -o
strftime-s-test strftime.c
> > >gives undef refs for __cygwin_gettzname, __cygwin_gettzoffset,
__get_current_time_locale,
> __tz_lock, __tz_unlock,
> > >_tzset_unlocked
> > >
> > >Build stc with std cmdline and current strftime works and does demo issue.
> > 
> > Sorry - redo with the file existing!
> 
> No worries, I applied your other patch since it also cleaned up some
> whitespaces and, for some reason, the below patch didn't apply cleanly.

Email paste may have converted tabs to spaces - need to work out how to
email inline text attachments without tab expansion in tbird - paste on
gmane (below) seems to retain tabs - may try that in future. 

> There was just one problem:
> 
> > +	  {
> > +	    long offset;	/* offset < 0 => W of GMT, > 0 => E of GMT:
> > +	    offset = 0;	   subtract to get UTC */
> 
> This setting the offset to 0 is necessary, but commented out.  Typo?
> I fixed this before committing the patch.

Thanks - total brain fart - Doh! Interesting that gcc -Wall -Wextra did not
catch this - used to be reliable warning about conditionally uninitialized
variables! 

Please check that the second set of tests in Vec1 includes the following, as
it was not in my very first patch email, which you may not have received: 
@@ -1502,6 +1575,7 @@ const struct test  Vec1[] = {
 	{ CQ("%p"), 2+1, EXP(CQ("PM")) },
 	{ CQ("%r"), 11+1, EXP(CQ("11:01:13 PM")) },
 	{ CQ("%R"), 5+1, EXP(CQ("23:01")) },
+	{ CQ("%s"), 2+1, EXP(CQ("1215054073")) },
 	{ CQ("%S"), 2+1, EXP(CQ("13")) },
 	{ CQ("%t"), 1+1, EXP(CQ("\t")) },
 	{ CQ("%T"), 8+1, EXP(CQ("23:01:13")) },



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019