[tz] defensive value for define on Solaris causes load of timerule to fail

Kees Dekker Kees.Dekker at infor.com
Mon Jun 12 13:34:50 UTC 2017

Retry, now to the mailing list as well.

>> So, FILENAME_MAX is probably the better choice, but may be, a
>> #if FILENAME_MAX < 260
>> #undef FILENAME_MAX
>> #define FILENAME_MAX 260
>> #endif
>> code part is needed? Then FILENAME_MAX is at a defined minimum value
>> (of course, the limit of 260 is also quite an arbitrary choice).

>I don't like the idea of redefining `FILENAME_MAX`.  Just use some 
>reasonably large value of our choosing for the length of `fullname`. 
>Even with a modern GNU/Linux `FILENAME_MAX` value of 4096 (on my system 
>at least), the `fullname` member of `union local_storage` is smaller 
>than the `u` member.

Anything else is also ok, but the union now does not have 'take largest value of somethong' for the fullname member.
It is also ok for me to say:

#if FILENAME_MAX < 260
#define TZ_FILENAME_MAX 260

And use TZ_FILENAME_MAX in the union.

My message is just to say 'please take care for platforms where FILENAME_MAX is arbitrary (too) short'. And the value of 14, as used on Solaris, is too short, as some time rules already exceed this length.
It makes no sense (i.e. it does not help for the other platforms) in this case that Linux has a much bigger value for this define.
As I have checked now, on most platforms, except Solaris, it is 260. Linux uses (as one of the few) a larger value. I've checked HPUX, AIX, Windows, Solaris and several Linux flavors.


More information about the tz mailing list