Branch: Tag:

2020-02-07

2020-02-07 15:32:10 by Henrik Grubbström (Grubba) <grubba@grubba.org>

I/O: Added fd_*-wrapper for openpty().

Preparation for supporting ptys on NT.

2564:   #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;
2599: Inside #if !defined(HAVE_OPENPTY) && defined(HAVE_PTSNAME) && defined(HAVE_POSIX_OPENPT)
   return -1;   }   #define HAVE_OPENPTY - #define openpty(M, S, N, T, W) my_openpty(M, S, N, T, W) +    #endif      /*! @decl string grantpt()
4606: Inside #if defined(HAVE_OPENPTY)
  #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;