From: dumser AT lesol1 DOT dseg DOT ti DOT com (James Dumser) Subject: strftime ambiguity: %-codes differ from Unix 20 Dec 1996 20:59:20 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <199612202154.PAA29632.cygnus.gnu-win32@lesol1.dseg.ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Original-To: gnu-win32 AT cygnus DOT com X-Mailer: ELM [version 2.4 PL23] Content-Length: 1672 Original-Sender: owner-gnu-win32 AT cygnus DOT com I recently ported nenscript-1.13++ to cygwin32 and noticed that the strftime strings needed to be in the "DOS" style rather than the normal "Unix" style (the hunk below is from the Unix section of machdep.h): diff -ur nenscript-1.13++/machdep.h nenscript.local/machdep.h --- nenscript-1.13++/machdep.h Wed Dec 31 17:58:34 1969 +++ nenscript.local/machdep.h Thu Dec 19 09:16:32 1996 @@ -56,12 +56,24 @@ # define USERNAME ((getpwuid (getuid()))->pw_name) -# define GETTIME(tm,str) strftime(str,15,"%T",tm) +# ifdef __CYGWIN32__ +# define GETTIME(tm,str) strftime(str,15,"%X",tm) +# else +# define GETTIME(tm,str) strftime(str,15,"%T",tm) +# endif -# ifdef US_VERSION -# define GETDATE(tm,str) strftime(str,15,"%h %d %y",tm) +# ifdef __CYGWIN32__ +# ifdef US_VERSION +# define GETDATE(tm,str) strftime(str,15,"%b %d %y",tm) +# else +# define GETDATE(tm,str) strftime(str,15,"%d %b %y",tm) +# endif # else -# define GETDATE(tm,str) strftime(str,15,"%d %h %y",tm) +# ifdef US_VERSION +# define GETDATE(tm,str) strftime(str,15,"%h %d %y",tm) +# else +# define GETDATE(tm,str) strftime(str,15,"%d %h %y",tm) +# endif # endif #endif While I know we can't have it both ways and have it transparent for both camps, I was wondering if this was an explicit choice to implement the DOS codes when the main goal of the project is to compile GNU-type software under 95/NT. I did not see this discrepancy mentioned in any of the online documentation (tho I could have missed it -- would be nice to be able to search all the documentation...) -- James Dumser 972-462-5335 dumser AT ti DOT com - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".