Tcl Source Code

Artifact [0b611a671a]
Login

Artifact 0b611a671a91fed07d65d443b0304e34f361d2e1:

Attachment "tcl-cruft-removal.patch" to ticket [1901828fff] added by jenglish 2008-02-26 10:59:31.
Date: Mon Feb 25 19:58:43 PST 2008
Files: generic/tclIOUtil.c unix/tclUnixPort.h
Bugid: 1901828

--- generic/tclIOUtil.c.cruft-removal.old	2008-02-25 19:58:06.000000000 -0800
+++ generic/tclIOUtil.c	2008-02-25 19:58:28.456015128 -0800
@@ -1670,13 +1670,8 @@
 #endif
 
 	} else if ((c == 'N') && (strcmp(flag, "NONBLOCK") == 0)) {
-#if defined(O_NDELAY) || defined(O_NONBLOCK)
-#   ifdef O_NONBLOCK
+#ifdef O_NONBLOCK
 	    mode |= O_NONBLOCK;
-#   else
-	    mode |= O_NDELAY;
-#   endif
-
 #else
 	    if (interp != NULL) {
 		Tcl_AppendResult(interp, "access mode \"", flag,
--- unix/tclUnixPort.h.cruft-removal.old	2008-02-25 19:58:06.000000000 -0800
+++ unix/tclUnixPort.h	2008-02-25 19:58:28.474012392 -0800
@@ -174,18 +174,6 @@
 #endif
 
 /*
- * HPUX needs the flag O_NONBLOCK to get the right non-blocking I/O
- * semantics, while most other systems need O_NDELAY.  Define the
- * constant NBIO_FLAG to be one of these
- */
-
-#ifdef HPUX
-#  define NBIO_FLAG O_NONBLOCK
-#else
-#  define NBIO_FLAG O_NDELAY
-#endif
-
-/*
  * The type of the status returned by wait varies from UNIX system
  * to UNIX system.  The macro below defines it:
  */
@@ -258,21 +246,11 @@
 
 /*
  * The stuff below is needed by the "time" command.  If this system has no
- * gettimeofday call, then must use times and the CLK_TCK #define (from
- * sys/param.h) to compute elapsed time.  Unfortunately, some systems only
- * have HZ and no CLK_TCK, and some might not even have HZ.
+ * gettimeofday call, then must use times() instead.
  */
 
 #ifdef NO_GETTOD
 #   include <sys/times.h>
-#   include <sys/param.h>
-#   ifndef CLK_TCK
-#       ifdef HZ
-#           define CLK_TCK HZ
-#       else
-#           define CLK_TCK 60
-#       endif
-#   endif
 #else
 #   ifdef HAVE_BSDGETTIMEOFDAY
 #	define gettimeofday BSDgettimeofday