incorrect use of gettimeofday() in unix/tclUnixTime.c
Closed / Fixed1942197fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 15 years ago
Descriptionplain2008-04-14 15:38:02
The Open Group defines gettimeofday() with the following prototype : int gettimeofday(struct timeval *restrict tp, void *restrict tzp); However, TCL uses a struct timezone as the second argument, where it is described that anything else than a NULL tzp argument is undefined. Solution : pass NULL.
karllimplain2008-04-14 22:38:03
File Added - 274484: tcl_timezone_20080414.diff
karllim Ticket [1942197fff]: 1 change
[History diff]2008-04-14 23:17:05
karllim Ticket [1942197fff]: 1 change
[History diff]2008-04-14 23:17:33
kennykbplain2008-04-15 00:17:29
Logged In: YES user_id=99768 Originator: NO Agreed that second arg to gettimeofday should be NULL on modern Unixes. There's an open question regarding whether we support any environments where a non-NULL second arg is still required. (It seems unlikely, since Posix says that the second arg SHOULD be NULL.) Change is trivial, and I'll make it when I've done a bit more research.
kennykbplain2008-04-15 00:26:57
Logged In: YES user_id=99768 Originator: NO Passing a NULL 'tzp' argument to gettimeofday is verified as harmless (indeed, preferred) on Solaris, HP-UX, glibc, the various BSD's (and hence MacOSX), and AIX. Doesn't seem to be any reason not to commit.
kennykb Closed ticket [1942197fff].
[History diff]2008-04-15 00:54:27
dgpplain2012-06-01 23:02:47
See Bug 3530533 for problems this change causes on an IRIX64 6.5 system.
Log in (anonymous is fine) to add a comment.
Attachments:
- tcl_timezone_20080414.diff [download] added by karllim on 2008-04-14 22:38:03. [details]