octave-maintainers
[Top][All Lists]
Advanced

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

Re: octave 2.9.13 on cygwin


From: John W. Eaton
Subject: Re: octave 2.9.13 on cygwin
Date: Thu, 06 Sep 2007 01:11:43 -0400

On  5-Sep-2007, Marco Atzeri wrote:

| 
| --- Marco Atzeri ha scritto:
| > --- "John W. Eaton" ha scritto:
| > 
| > > On 30-Aug-2007, Marco Atzeri wrote:
|  
| > I suspect there is a problem in the cygwin 
| > implementation of strptime.
| 
| 
| John,
| if I correctly understood how weekday() is 
| implemented in octave,  
| assert(weekday('19-Dec-1994'),2) 
| is failing in cygwin because
| 
| weekday calls strptime, implemented in oct_strptime
| as wrapper of system strptime, expecting
| to receive a valid tm_wday.
| 
| As newlib strptime, used in cygwin, does not set
| tm_wday when format does not include %a or %A
| weekday is failing and for every day the output is 0.
| 
| I have the feeling that strptime is potentially
| implemented locally, but it is unclear to me
| how to use it instead of the system version,
| at least on cygwin.

How about the following patch?

jwe


ChangeLog:

2007-09-06  John W. Eaton  <address@hidden>

        * configure.in: Avoid broken strptime function on Cygwin systems.


Index: configure.in
===================================================================
RCS file: /cvs/octave/configure.in,v
retrieving revision 1.573
diff -u -u -r1.573 configure.in
--- configure.in        1 Sep 2007 00:08:16 -0000       1.573
+++ configure.in        6 Sep 2007 05:11:04 -0000
@@ -1453,7 +1453,7 @@
 esac
 
 case "$canonical_host_type" in
-  *-apple-darwin*)
+  *-apple-darwin* | *-*-cygwin*)
     ## The weekday function, which uses strptime, is broken because
     ## strptime is apparently not setting wday correctly for formats
     ## like "%d-%m-%Y", so use our version.  We could use an actual

reply via email to

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