Changeset 61385


Ignore:
Timestamp:
Dec 10, 2009, 8:02:45 AM (10 years ago)
Author:
toby@…
Message:

pextlib1.0: 64-bitterness

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/pextlib1.0/tty.c

    r51445 r61385  
    5454    Tcl_Channel chan;
    5555    int dir;
    56     int fd;
     56    ClientData fd;
    5757    int rval;
    5858
     
    7070    if (Tcl_GetChannelHandle(chan,
    7171            dir & TCL_READABLE ? TCL_READABLE : TCL_WRITABLE,
    72             (ClientData*) &fd) == TCL_ERROR) {
     72            &fd) == TCL_ERROR) {
    7373        return TCL_ERROR;
    7474    }
    7575
    76     rval = isatty(fd);
     76    rval = isatty((int)(intptr_t)fd);
    7777
    7878    tcl_result = Tcl_NewIntObj(rval);
     
    8888    Tcl_Channel chan;
    8989    int dir;
    90     int fd;
     90    ClientData fd;
    9191    Tcl_Obj *robjv[2];
    9292    struct winsize ws = {0, 0, 0, 0};
     
    105105    if (Tcl_GetChannelHandle(chan,
    106106            dir & TCL_READABLE ? TCL_READABLE : TCL_WRITABLE,
    107             (ClientData*) &fd) == TCL_ERROR) {
     107            &fd) == TCL_ERROR) {
    108108        return TCL_ERROR;
    109109    }
    110110
    111     if (!isatty(fd)) {
     111    if (!isatty((int)(intptr_t)fd)) {
    112112        Tcl_SetResult(interp, "channel is not connected to a tty", TCL_STATIC);
    113113        return TCL_ERROR;
    114114    }
    115115
    116     if (ioctl(fd, TIOCGWINSZ, &ws) == -1) {
     116    if (ioctl((int)(intptr_t)fd, TIOCGWINSZ, &ws) == -1) {
    117117        Tcl_SetResult(interp, "ioctl failed", TCL_STATIC);
    118118        return TCL_ERROR;
Note: See TracChangeset for help on using the changeset viewer.