summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2012-06-08 13:14:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2012-06-08 13:14:19 (GMT)
commit7e302d3ca75cd9eb6998e895cf344665b1d08e5e (patch)
treea5906f025d3dabfe0ae754285014064899728fc1
parent58d31239da28572a5de112c0792a6e071066fddc (diff)
parent9ea2ab76f4646c44e090b45ba151a94d38b085f1 (diff)
downloadtcl-7e302d3ca75cd9eb6998e895cf344665b1d08e5e.zip
tcl-7e302d3ca75cd9eb6998e895cf344665b1d08e5e.tar.gz
tcl-7e302d3ca75cd9eb6998e895cf344665b1d08e5e.tar.bz2
Update autogoo for gettimeofday(). Thanks Joe English.
-rw-r--r--ChangeLog4
-rwxr-xr-xunix/configure107
-rw-r--r--unix/configure.in9
-rw-r--r--unix/tclUnixPort.h4
4 files changed, 10 insertions, 114 deletions
diff --git a/ChangeLog b/ChangeLog
index fc826e2..41699a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2012-06-08 Don Porter <dgp@users.sourceforge.net>
+ * unix/configure.in: Update autogoo for gettimeofday().
+ * unix/tclUnixPort.h: Thanks Joe English.
+ * unix/configure: autoconf 2.13
+
* unix/tclUnixPort.h: [Bug 3530533] Centralize #include <pthread.h>
* unix/tclUnixThrd.c: in the tclUnixPort.h header so that old unix
systems that need inclusion in all compilation units are supported.
diff --git a/unix/configure b/unix/configure
index 4b141b6..d30c2c3 100755
--- a/unix/configure
+++ b/unix/configure
@@ -16173,112 +16173,12 @@ fi
# 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.
#--------------------------------------------------------------------
-echo "$as_me:$LINENO: checking for BSDgettimeofday" >&5
-echo $ECHO_N "checking for BSDgettimeofday... $ECHO_C" >&6
-if test "${ac_cv_func_BSDgettimeofday+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Define BSDgettimeofday to an innocuous variant, in case <limits.h> declares BSDgettimeofday.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define BSDgettimeofday innocuous_BSDgettimeofday
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char BSDgettimeofday (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef BSDgettimeofday
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char BSDgettimeofday ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined (__stub_BSDgettimeofday) || defined (__stub___BSDgettimeofday)
-choke me
-#else
-char (*f) () = BSDgettimeofday;
-#endif
-#ifdef __cplusplus
-}
-#endif
-
-int
-main ()
-{
-return f != BSDgettimeofday;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_BSDgettimeofday=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_func_BSDgettimeofday=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_BSDgettimeofday" >&5
-echo "${ECHO_T}$ac_cv_func_BSDgettimeofday" >&6
-if test $ac_cv_func_BSDgettimeofday = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_BSDGETTIMEOFDAY 1
-_ACEOF
-
-else
-
- echo "$as_me:$LINENO: checking for gettimeofday" >&5
+echo "$as_me:$LINENO: checking for gettimeofday" >&5
echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
if test "${ac_cv_func_gettimeofday+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -16372,12 +16272,11 @@ if test $ac_cv_func_gettimeofday = yes; then
:
else
+
cat >>confdefs.h <<\_ACEOF
#define NO_GETTOD 1
_ACEOF
-fi
-
fi
diff --git a/unix/configure.in b/unix/configure.in
index 441c98f..5f0fe0b 100644
--- a/unix/configure.in
+++ b/unix/configure.in
@@ -415,16 +415,13 @@ fi
# 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,
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index 6ff13eb..28015ae 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -276,10 +276,6 @@ MODULE_SCOPE int TclUnixSetBlockingMode(int fd, int mode);
#ifdef NO_GETTOD
# include <sys/times.h>
-#else
-# ifdef HAVE_BSDGETTIMEOFDAY
-# define gettimeofday BSDgettimeofday
-# endif
#endif
#ifdef GETTOD_NOT_DECLARED