Re: [Exim] compile date format issue

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: John Jetmore
CC: exim-users
Subject: Re: [Exim] compile date format issue
On Wed, 19 Mar 2003, John Jetmore wrote:

> Exim version 4.14 #1 built 9/-03/-3 21:51:36
>
> It looks like my system uses a different format for __DATE__ than my
> machines at work (and every other machine on the face of the earth,
> apparently).


Sigh.

> My system info (MacOSX 10.2.4, dec 2002 developer tools):

                  ^^^^^^^^^^^^^
                  ^^^^^^^^^^^^^
Aha! That's not the only way it's different...


> Output of printf("date = %s\n", __DATE__) is '03/19/03'


Confusing, incomplete, and ambiguous! The '19' gives some of it away,
but consider '03/11/03': is that y/m/d, y/d/m, m/d/y, or d/m/y? In this
international age, that is a really stupid way to write a date, IMHO.

I imagine that most people reading this list are aware that the
European habit is to write d/m/y, while the US habit is m/d/y. I believe
that that should rule out the use of this kind of format for anything
that is likely to be seen outside the immediate locality.

My personal preference for writing dates these days is '20 Mar 2003'.

On my Solaris workstation, gcc gives 'Mar 20 2003'. That's with gcc
version 3.2.2. Sun's compiler (WorkShop Compilers 5.0 98/12/15 C 5.0)
gives exactly the same output.

AHA! You have a bug in your compiler. I have consulted my ancient copy
of the original ANSI C standard. It clearly says that the value of
__DATE__ is a string of the form "Mmm dd yyyy".

> I was going to write a patch, but knowing the true nature of the problem I
> was reluctant to do so.


Given the content of the C standard, I don't think I'm inclined to
accept a patch...

Philip

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.