Attachment "ac_cleanup1_tcl.patch" to
ticket [2892871fff]
added by
stwo
2009-11-06 04:38:34.
Index: unix/configure.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/configure.in,v
retrieving revision 1.207
diff -u -p -r1.207 configure.in
--- unix/configure.in 10 Apr 2009 18:01:31 -0000 1.207
+++ unix/configure.in 5 Nov 2009 20:21:32 -0000
@@ -282,7 +282,7 @@ SC_TIME_HANDLER
# stat. But we might be able to use fstatfs instead.
#--------------------------------------------------------------------
-AC_STRUCT_ST_BLKSIZE
+AC_CHECK_MEMBERS([struct stat.st_blksize])
AC_CHECK_FUNC(fstatfs, , [AC_DEFINE(NO_FSTATFS, 1, [Do we have fstatfs()?])])
#--------------------------------------------------------------------
Index: unix/tcl.m4
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tcl.m4,v
retrieving revision 1.210
diff -u -p -r1.210 tcl.m4
--- unix/tcl.m4 23 Jul 2009 23:02:00 -0000 1.210
+++ unix/tcl.m4 5 Nov 2009 20:21:34 -0000
@@ -2475,7 +2475,6 @@ AC_DEFUN([SC_BLOCKING_STYLE], [
AC_DEFUN([SC_TIME_HANDLER], [
AC_CHECK_HEADERS(sys/time.h)
AC_HEADER_TIME
- AC_STRUCT_TIMEZONE
AC_CHECK_FUNCS(gmtime_r localtime_r mktime)
Index: unix/tclConfig.h.in
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclConfig.h.in,v
retrieving revision 1.39
diff -u -p -r1.39 tclConfig.h.in
--- unix/tclConfig.h.in 10 Apr 2009 18:01:32 -0000 1.39
+++ unix/tclConfig.h.in 5 Nov 2009 20:21:34 -0000
@@ -184,13 +184,6 @@
/* Define to 1 if `st_blksize' is member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
-/* Define to 1 if `tm_zone' is member of `struct tm'. */
-#undef HAVE_STRUCT_TM_TM_ZONE
-
-/* Define to 1 if your `struct stat' has `st_blksize'. Deprecated, use
- `HAVE_STRUCT_STAT_ST_BLKSIZE' instead. */
-#undef HAVE_ST_BLKSIZE
-
/* Define to 1 if you have the <sys/filio.h> header file. */
#undef HAVE_SYS_FILIO_H
@@ -224,17 +217,9 @@
/* Should we use the tm_tzadj field of struct tm? */
#undef HAVE_TM_TZADJ
-/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use
- `HAVE_STRUCT_TM_TM_ZONE' instead. */
-#undef HAVE_TM_ZONE
-
/* Is off64_t in <sys/types.h>? */
#undef HAVE_TYPE_OFF64_T
-/* Define to 1 if you don't have `tm_zone' but do have the external array
- `tzname'. */
-#undef HAVE_TZNAME
-
/* Do we have the uintptr_t type? */
#undef HAVE_UINTPTR_T
Index: unix/tclUnixFCmd.c
===================================================================
RCS file: /cvsroot/tcl/tcl/unix/tclUnixFCmd.c,v
retrieving revision 1.73
diff -u -p -r1.73 tclUnixFCmd.c
--- unix/tclUnixFCmd.c 2 Aug 2009 12:08:17 -0000 1.73
+++ unix/tclUnixFCmd.c 5 Nov 2009 20:21:35 -0000
@@ -49,7 +49,7 @@
#include "tclInt.h"
#include <utime.h>
#include <grp.h>
-#ifndef HAVE_ST_BLKSIZE
+#ifndef HAVE_STRUCT_STAT_ST_BLKSIZE
#ifndef NO_FSTATFS
#include <sys/statfs.h>
#endif
@@ -547,7 +547,7 @@ TclUnixCopyFile(
* that's likely to be fairly efficient anyway.
*/
-#ifdef HAVE_ST_BLKSIZE
+#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE
blockSize = statBufPtr->st_blksize;
#elif !defined(NO_FSTATFS)
{
@@ -561,13 +561,14 @@ TclUnixCopyFile(
}
#else
blockSize = DEFAULT_COPY_BLOCK_SIZE;
-#endif /* HAVE_ST_BLKSIZE */
+#endif /* HAVE_STRUCT_STAT_ST_BLKSIZE */
/*
- * [SF Tcl Bug 1586470] Even if we HAVE_ST_BLKSIZE, there are filesystems
- * which report a bogus value for the blocksize. An example is the Andrew
- * Filesystem (afs), reporting a blocksize of 0. When detecting such a
- * situation we now simply fall back to a hardwired default size.
+ * [SF Tcl Bug 1586470] Even if we HAVE_STRUCT_STAT_ST_BLKSIZE, there are
+ * filesystems which report a bogus value for the blocksize. An example
+ * is the Andrew Filesystem (afs), reporting a blocksize of 0. When
+ * detecting such a situation we now simply fall back to a hardwired
+ * default size.
*/
if (blockSize <= 0) {