June 12, 2017
1:37 p.m.
#if FILENAME_MAX < 260 #define TZ_FILENAME_MAX 260 #else #define TZ_FILENAME_MAX FILENAME_MAX #endif
Better approach: #if !defined(FILENAME_MAX) || FILENAME_MAX < 260 // e.g. Solaris uses a too small value to hold a path #define TZ_FILENAME_MAX 260 #else #define TZ_FILENAME_MAX FILENAME_MAX #endif /* Local storage needed for 'tzloadbody'. */ union local_storage { /* The file name to be opened. */ char fullname[TZ_FILENAME_MAX + 1]; /* The results of analyzing the file's contents after it is opened. */ struct { /* The input buffer. */ union input_buffer u; /* A temporary state used for parsing a TZ string in the file. */ struct state st; } u; };