Some fixes to the Unixlib time handling

John Tytgat John.Tytgat at aaug.net
Sun Jun 10 16:51:14 PDT 2001


In message <01061021083301.01216 at Laptop>
          Peter Teichmann <teich-p at Rcs1.urz.tu-dresden.de> wrote:

> > - Maybe we should get rid of function parameter names beginning with an
> >   underscore (see _kernel_osbyte()).  Remove the underscores ?
> 
> Probably not a good idea, because it is also _kernel_osbyte in Acorns C 
> library. It has probably this name for compatibility reasons.

There is a misunderstanding : I'm not talking about the underscore of
the function name _kernel_osbyte() but of the underscores of its
parameters : __operation, __x and __y (which I would change into e.g.
operation, x and y).

> > - It is "RISC OS", not "RiscOS" (tzset.c patch).
> 
> Ah. Very important! Though I like my version better...

Well, a name is a name ;-).  I hate people mispelling *my* name so
I respect others' as they are.

> > - _POSIX_TZNAME_MAX is increased from 3 to 7.  But where is this
> >   dependancy in the UnixLib code ? Or in the currently loaded Territory
> >   module ?
> 
> It is in tzset.c:
> 
> > static char __tzname[2][8] = { "GMT", "BST" };
> > char *tzname[2] = { __tzname[0], __tzname[1] };
> 
> ...
>  
> >   strncpy(__tzname[0], (char *)regs[0], 8);
> >   __tzname[0][7]='\0';
> >   tzname[0]=__tzname[0];
> >   strncpy(__tzname[1], (char *)regs[1], 8);
> >   __tzname[1][7]='\0';
> >   tzname[1]=__tzname[1];
> 
> Isn't it?

Ah, apologies, I was a little bit sleepy :-(.  Suggestion : maybe the '8'
could be replaced by '_POSIX_TZNAME_MAX+1' and the '7' by
'_POSIX_TZNAME_MAX' so people could see the dependancy easier.

John.
-- 
John Tytgat, in his comfy chair at home                                 BASS
John.Tytgat at aaug.net                             ARM powered, RISC OS driven



More information about the gcc mailing list