pike.git / src / modules / _Stdio / file.c

version» Context lines:

pike.git/src/modules/_Stdio/file.c:2714:   #define HAVE_GRANTPT   #define grantpt(M) my_grantpt(M)   #endif   #endif      #ifndef HAVE_UNLOCKPT   #define HAVE_UNLOCKPT   #define unlockpt(m) 0   #endif    - #if !defined(HAVE_OPENPTY) && defined(HAVE_PTSNAME) && defined(HAVE_POSIX_OPENPT) - static int my_openpty(int *master, int *slave, void *ignored_name, + #ifdef fd_openpty + #ifndef HAVE_OPENPTY + #define HAVE_OPENPTY + #endif + #elif defined(HAVE_POSIX_OPENPT) + static int fd_openpty(int *master, int *slave, void *ignored_name,    void *ignored_termp, void *ignored_winp)   {    int m;    int s;    char *sname;    if (!master || !slave) {    errno = EINVAL;    return -1;    }    m = posix_openpt(O_RDWR | O_NOCTTY);
pike.git/src/modules/_Stdio/file.c:2749: Inside #if !defined(HAVE_OPENPTY) && defined(HAVE_PTSNAME) && defined(HAVE_POSIX_OPENPT) and #if defined(I_PUSH)
   ioctl(s, I_PUSH, "ldterm"); /* Terminal line discipline */    ioctl(s, I_PUSH, "ttcompat"); /* BSD terminal compatibility */   #endif    return 0;    }    }    close(m);    return -1;   }   #define HAVE_OPENPTY - #define openpty(M, S, N, T, W) my_openpty(M, S, N, T, W) +    #endif      /*! @decl string grantpt()    *!    *! If this file has been created by calling @[openpt()], return the    *! filename of the associated pts-file. This function should only be    *! called once.    *!    *! @returns    *! Returns the filename of the corresponding pts.
pike.git/src/modules/_Stdio/file.c:4615: Inside #if undefined(UNIX_SOCKETS_WORKS_WITH_SHUTDOWN)
   if (i >= 0) {    type=SOCKET_CAPABILITIES;    break;    }    }   #endif      #ifdef HAVE_OPENPTY    if (!(type & ~(TTY_CAPABILITIES)))    { -  i = openpty(inout, inout + 1, NULL, NULL, NULL); +  i = fd_openpty(inout, inout + 1, NULL, NULL, NULL);    if (i >= 0) {    type = TTY_CAPABILITIES;    break;    }    }   #endif       if (!i) {    Pike_error("Cannot create a pipe matching those parameters.\n");    }