diff -pur gmp-6.3.0/configure.ac gmp-6.3.0-new/configure.ac
--- gmp-6.3.0/configure.ac	2023-07-29 15:42:16
+++ gmp-6.3.0-new/configure.ac	2023-07-30 18:57:17
@@ -2830,12 +2830,6 @@ AM_CONDITIONAL(ENABLE_STATIC, test "$enable_static" = 
 AM_CONDITIONAL(ENABLE_STATIC, test "$enable_static" = yes)
 
 
-# Many of these library and header checks are for the benefit of
-# supplementary programs.  libgmp doesn't use anything too weird.
-
-AC_HEADER_STDC
-AC_HEADER_TIME
-
 # Reasons for testing:
 #   float.h - not in SunOS bundled cc
 #   invent.h - IRIX specific
@@ -2865,15 +2859,9 @@ AC_CHECK_HEADERS(sys/resource.h,,,
 
 # On SunOS, sys/resource.h needs sys/time.h (for struct timeval)
 AC_CHECK_HEADERS(sys/resource.h,,,
-[#if TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
+[#include <time.h>
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>  /* for struct timeval */
 #endif])
 
 # On NetBSD and OpenBSD, sys/sysctl.h needs sys/param.h for various constants
diff -pur gmp-6.3.0/tests/misc.c gmp-6.3.0-new/tests/misc.c
--- gmp-6.3.0/tests/misc.c	2023-07-29 15:42:17
+++ gmp-6.3.0-new/tests/misc.c	2023-07-30 18:55:10
@@ -29,15 +29,9 @@ the GNU MP Library test suite.  If not, see https://ww
 #include <float.h>      /* for DBL_MANT_DIG */
 #endif
 
-#if TIME_WITH_SYS_TIME
+#include <time.h>
+#if HAVE_SYS_TIME_H
 # include <sys/time.h>  /* for struct timeval */
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
 
 #include "gmp-impl.h"
diff -pur gmp-6.3.0/tune/freq.c gmp-6.3.0-new/tune/freq.c
--- gmp-6.3.0/tune/freq.c	2023-07-29 15:42:17
+++ gmp-6.3.0-new/tune/freq.c	2023-07-30 18:54:25
@@ -96,15 +96,9 @@ see https://www.gnu.org/licenses/.  */
 #include <sys/sysctl.h>  /* for sysctlbyname() */
 #endif
 
-#if TIME_WITH_SYS_TIME
+#include <time.h>
+#if HAVE_SYS_TIME_H
 # include <sys/time.h>  /* for struct timeval */
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
 
 #if HAVE_SYS_RESOURCE_H
diff -pur gmp-6.3.0/tune/speed.c gmp-6.3.0-new/tune/speed.c
--- gmp-6.3.0/tune/speed.c	2023-07-29 15:42:17
+++ gmp-6.3.0-new/tune/speed.c	2023-07-30 18:54:55
@@ -51,15 +51,9 @@ see https://www.gnu.org/licenses/.  */
 #include <unistd.h>  /* for getpid, R_OK */
 #endif
 
-#if TIME_WITH_SYS_TIME
+#include <time.h>
+#if HAVE_SYS_TIME_H
 # include <sys/time.h>  /* for struct timeval */
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
 
 #if HAVE_SYS_RESOURCE_H
diff -pur gmp-6.3.0/tune/time.c gmp-6.3.0-new/tune/time.c
--- gmp-6.3.0/tune/time.c	2023-07-29 15:42:17
+++ gmp-6.3.0-new/tune/time.c	2023-07-30 18:54:43
@@ -176,15 +176,9 @@ see https://www.gnu.org/licenses/.  */
 
 #include <sys/types.h>
 
-#if TIME_WITH_SYS_TIME
+#include <time.h>
+#if HAVE_SYS_TIME_H
 # include <sys/time.h>  /* for struct timeval */
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-#  include <sys/time.h>
-# else
-#  include <time.h>
-# endif
 #endif
 
 #if HAVE_SYS_MMAN_H
