Some fixes to the Unixlib time handling

Peter Teichmann teich-p at Rcs1.urz.tu-dresden.de
Sun Jun 10 12:08:33 PDT 2001


> - 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.

> - It is "RISC OS", not "RiscOS" (tzset.c patch).

Ah. Very important! Though I like my version better...

> - _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?

Peter



More information about the gcc mailing list