Tcl Source Code

Artifact [809bd8d280]
Login

Artifact 809bd8d2802313f1bcd09c9e3dda3d046ba959f1:

Attachment "no-bsdgettimeofday.patch" to ticket [3530533fff] added by jenglish 2012-06-06 04:25:00.
Index: unix/configure.in
===================================================================
--- unix/configure.in
+++ unix/configure.in
@@ -469,21 +469,19 @@
 
 #--------------------------------------------------------------------
 #	The code below deals with several issues related to gettimeofday:
 #	1. Some systems don't provide a gettimeofday function at all
 #	   (set NO_GETTOD if this is the case).
-#	2. SGI systems don't use the BSD form of the gettimeofday function,
-#	   but they have a BSDgettimeofday function that can be used instead.
-#	3. See if gettimeofday is declared in the <sys/time.h> header file.
+#	2. See if gettimeofday is declared in the <sys/time.h> header file.
 #	   if not, set the GETTOD_NOT_DECLARED flag so that tclPort.h can
 #	   declare it.
 #--------------------------------------------------------------------
 
-AC_CHECK_FUNC(BSDgettimeofday,
-    [AC_DEFINE(HAVE_BSDGETTIMEOFDAY, 1, [Do we have BSDgettimeofday()?])], [
-    AC_CHECK_FUNC(gettimeofday, , [AC_DEFINE(NO_GETTOD, 1, [Do we have gettimeofday()?])])
+AC_CHECK_FUNC(gettimeofday,[],[
+    AC_DEFINE(NO_GETTOD, 1, [Do we have gettimeofday()?])
 ])
+
 AC_CACHE_CHECK([for gettimeofday declaration], tcl_cv_grep_gettimeofday, [
     AC_EGREP_HEADER(gettimeofday, sys/time.h,
 	tcl_cv_grep_gettimeofday=present, tcl_cv_grep_gettimeofday=missing)])
 if test $tcl_cv_grep_gettimeofday = missing ; then
     AC_DEFINE(GETTOD_NOT_DECLARED, 1, [Is gettimeofday() actually declared in <sys/time.h>?])

Index: unix/tclConfig.h.in
===================================================================
--- unix/tclConfig.h.in
+++ unix/tclConfig.h.in
@@ -10,13 +10,10 @@
 /* Define to 1 if you have the <AvailabilityMacros.h> header file. */
 #undef HAVE_AVAILABILITYMACROS_H
 
 /* Define to 1 if the system has the type `blkcnt_t'. */
 #undef HAVE_BLKCNT_T
-
-/* Do we have BSDgettimeofday()? */
-#undef HAVE_BSDGETTIMEOFDAY
 
 /* Define to 1 if you have the `chflags' function. */
 #undef HAVE_CHFLAGS
 
 /* Define to 1 if you have the `copyfile' function. */

Index: unix/tclUnixPort.h
===================================================================
--- unix/tclUnixPort.h
+++ unix/tclUnixPort.h
@@ -312,14 +312,10 @@
  *---------------------------------------------------------------------------
  */
 
 #ifdef NO_GETTOD
 #   include <sys/times.h>
-#else
-#   ifdef HAVE_BSDGETTIMEOFDAY
-#	define gettimeofday BSDgettimeofday
-#   endif
 #endif
 
 #ifdef GETTOD_NOT_DECLARED
 MODULE_SCOPE int	gettimeofday(struct timeval *tp,
 			    struct timezone *tzp);