K&R calma: remove system header time() K&R style prototype

time.h has existed since C89 so is a standard header expected
to always be available.

sys/time.h was an optional header that historically only some
platforms provided.

If there is a conflict on specific platforms it is better to
'#if !defined()' that specific niche platform with the problem
if both headers are included in the same compile unit.  But I
don't think this is a problem in modern times.

So this results in a resolution that removes #ifdef around
time.h and the detection by configure for the availabiltiy
of sys/time.h.

K&R obsolete syntax removal for C23 compatibility series
This commit is contained in:
Darryl L. Miles
2024-12-26 12:44:50 -05:00
committed by Tim Edwards
parent 3f4eb4120e
commit cd63fa3c14
2 changed files with 5 additions and 6 deletions
+3
View File
@@ -150,6 +150,9 @@ AC_CHECK_HEADERS(param.h)
dnl Check for <paths.h>
AC_CHECK_HEADERS(paths.h)
dnl Check for <sys/time.h>
AC_CHECK_HEADERS(sys/time.h)
dnl Check for va_copy
AC_CACHE_CHECK([for va_copy], ac_cv_c_va_copy,
AC_TRY_LINK(