iraf-community / x11iraf

X11/GUI utilities and applications for IRAF (xgterm, ximtool, xtapemon)
https://iraf-community.github.io/x11iraf
21 stars 8 forks source link

Use time_t instead of long for time #70

Closed olebole closed 2 weeks ago

olebole commented 3 weeks ago

There are few places where time is used in x11iraf; this patch makes sure that time_t is used here instead of long. This makes x11iraf compilable with newer Linux distributions (which made the time_t transition to ensure working after 2038).

Also, we always use time(NULL);, not time(0); (argument is a pointer, not a number) or time((long *)NULL); (NULL pointers are valid for all pointer types without cast).