[61385] trunk/base/src/pextlib1.0/tty.c

toby at macports.org toby at macports.org
Thu Dec 10 00:02:50 PST 2009


Revision: 61385
          http://trac.macports.org/changeset/61385
Author:   toby at macports.org
Date:     2009-12-10 00:02:45 -0800 (Thu, 10 Dec 2009)
Log Message:
-----------
64-bitterness

Modified Paths:
--------------
    trunk/base/src/pextlib1.0/tty.c

Modified: trunk/base/src/pextlib1.0/tty.c
===================================================================
--- trunk/base/src/pextlib1.0/tty.c	2009-12-10 01:54:23 UTC (rev 61384)
+++ trunk/base/src/pextlib1.0/tty.c	2009-12-10 08:02:45 UTC (rev 61385)
@@ -53,7 +53,7 @@
     Tcl_Obj *tcl_result;
     Tcl_Channel chan;
     int dir;
-    int fd;
+    ClientData fd;
     int rval;
 
     if (objc != 2) {
@@ -69,11 +69,11 @@
 
     if (Tcl_GetChannelHandle(chan,
             dir & TCL_READABLE ? TCL_READABLE : TCL_WRITABLE,
-            (ClientData*) &fd) == TCL_ERROR) {
+            &fd) == TCL_ERROR) {
         return TCL_ERROR;
     }
 
-    rval = isatty(fd);
+    rval = isatty((int)(intptr_t)fd);
 
     tcl_result = Tcl_NewIntObj(rval);
     Tcl_SetObjResult(interp, tcl_result);
@@ -87,7 +87,7 @@
     Tcl_Obj *tcl_result;
     Tcl_Channel chan;
     int dir;
-    int fd;
+    ClientData fd;
     Tcl_Obj *robjv[2];
     struct winsize ws = {0, 0, 0, 0};
 
@@ -104,16 +104,16 @@
 
     if (Tcl_GetChannelHandle(chan,
             dir & TCL_READABLE ? TCL_READABLE : TCL_WRITABLE,
-            (ClientData*) &fd) == TCL_ERROR) {
+            &fd) == TCL_ERROR) {
         return TCL_ERROR;
     }
 
-    if (!isatty(fd)) {
+    if (!isatty((int)(intptr_t)fd)) {
         Tcl_SetResult(interp, "channel is not connected to a tty", TCL_STATIC);
         return TCL_ERROR;
     }
 
-    if (ioctl(fd, TIOCGWINSZ, &ws) == -1) {
+    if (ioctl((int)(intptr_t)fd, TIOCGWINSZ, &ws) == -1) {
         Tcl_SetResult(interp, "ioctl failed", TCL_STATIC);
         return TCL_ERROR;
     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091210/2d858188/attachment.html>


More information about the macports-changes mailing list