git issue #838 - old time manipulation for BSD
Issue #838 from clausecker, relayed by copperwater: old workarounds for lack of type 'time_t' from pre-standard days aren't suitable any more. One of the instances was incorrect (diagnosed by entrez) and no one had noticed for years (or possibly just ignored a compiler warning). Remove most of the old cruft from hacklib.c and some from system.h but put in commented workarounds in unixconf.h in case someone needs to resurrect it. It would have been better to do things this way back in the old days. Resurrecting some non-Unix port might need to clone the unixconf.h bits in its own *conf.h, but that probably won't be necessary for a standard C compliant system. Closes #838
This commit is contained in:
@@ -534,22 +534,13 @@ E genericptr_t realloc(genericptr_t, size_t);
|
||||
|
||||
/* time functions */
|
||||
|
||||
#ifndef LATTICE
|
||||
#if !(defined(ULTRIX_PROTO) && defined(__GNUC__))
|
||||
#ifdef NEED_TIME_DECL
|
||||
E time_t time(time_t *);
|
||||
#endif
|
||||
#ifdef NEED_LOCALTIME_DECL
|
||||
E struct tm *localtime(const time_t *);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(ULTRIX) || (defined(BSD) && defined(POSIX_TYPES)) \
|
||||
|| defined(SYSV) || defined(MICRO) || defined(VMS) || defined(MAC) \
|
||||
|| (defined(HPUX) && defined(_POSIX_SOURCE))
|
||||
E time_t time(time_t *);
|
||||
#else
|
||||
E long time(time_t *);
|
||||
#endif /* ULTRIX */
|
||||
|
||||
#ifdef VMS
|
||||
/* used in makedefs.c, but missing from gcc-vms's <time.h> */
|
||||
#ifdef NEED_CTIME_DECL
|
||||
E char *ctime(const time_t *);
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user