Why does libtz.a contain asctime.o but not strftime.o ?
I am planning to use the NetBSD inspired functions localtime_rz and mktime_z in a user-space program. I notice that I can avoid clashes with symbols in the system libraries by defining RESERVE_STD_EXT_IDS, and have tried building as follows: make TOPDIR=$MY_TZ CFLAGS="-DRESERVE_STD_EXT_IDS -DTHREAD_SAFE -pthread" install I notice that the resulting libtz.a contains an unresolved external reference to tz_strftime. This appears to be because the Makefile includes asctime.o in LIBOBJS but does not include strftime.o on which it should depend (and does depend when the external symbols are prefixed with 'tz_') This will not affect my use case - our program will not use tz_asctime or tz_asctime_r - and I suspect that very few users of the tz code will be tripped up by it, given that the tz executables will be built correctly and anyone with a use case like mine has got to make their own header file to use libtz.a, but nonetheless... Should this be corrected, or is there a rationale which I have missed and which could be noted in a Makefile comment? --- Roland Young ITRS Group Ltd, London
On 10/10/19 9:32 AM, Roland Young wrote:
I notice that the resulting libtz.a contains an unresolved external reference to tz_strftime.
Thanks for reporting what appears to date back to commit 75bd16ca08716e83d9e71af72ad80d51fe61a16e dated 1989-03-07 22:22:17 -0500 with commit message "last minute stuff before seismo ship". My guess is that omitting strftime was an oversight during the 1989 rush, so I installed the attached patch.
participants (2)
-
Paul Eggert -
Roland Young