Use the real glibc openpty if present.
This commit is contained in:
parent
fe08849938
commit
2d7be870cc
|
@ -100,6 +100,12 @@ dnl Check for -lxpg4 for FreeBSD
|
||||||
AC_CHECK_LIB(xpg4,setrunelocale)
|
AC_CHECK_LIB(xpg4,setrunelocale)
|
||||||
dnl Check for -lmmap for OS/2
|
dnl Check for -lmmap for OS/2
|
||||||
AC_CHECK_LIB(mmap,mmap)
|
AC_CHECK_LIB(mmap,mmap)
|
||||||
|
dnl Check for openpty
|
||||||
|
AC_CHECK_FUNCS(openpty,,
|
||||||
|
AC_CHECK_LIB(util,openpty,
|
||||||
|
AC_DEFINE(HAVE_OPENPTY)
|
||||||
|
LIBS="$LIBS -lutil"
|
||||||
|
))
|
||||||
|
|
||||||
AC_CHECK_HEADERS(dlfcn.h,
|
AC_CHECK_HEADERS(dlfcn.h,
|
||||||
AC_CHECK_FUNCS(dlopen,
|
AC_CHECK_FUNCS(dlopen,
|
||||||
|
@ -562,6 +568,7 @@ AC_CHECK_HEADERS(\
|
||||||
net/if.h \
|
net/if.h \
|
||||||
netinet/in.h \
|
netinet/in.h \
|
||||||
netinet/tcp.h \
|
netinet/tcp.h \
|
||||||
|
pty.h \
|
||||||
resolv.h \
|
resolv.h \
|
||||||
sched.h \
|
sched.h \
|
||||||
socket.h \
|
socket.h \
|
||||||
|
|
|
@ -182,6 +182,9 @@
|
||||||
/* Define if you have the memmove function. */
|
/* Define if you have the memmove function. */
|
||||||
#undef HAVE_MEMMOVE
|
#undef HAVE_MEMMOVE
|
||||||
|
|
||||||
|
/* Define if you have the openpty function. */
|
||||||
|
#undef HAVE_OPENPTY
|
||||||
|
|
||||||
/* Define if you have the rfork function. */
|
/* Define if you have the rfork function. */
|
||||||
#undef HAVE_RFORK
|
#undef HAVE_RFORK
|
||||||
|
|
||||||
|
@ -305,6 +308,9 @@
|
||||||
/* Define if you have the <netinet/tcp.h> header file. */
|
/* Define if you have the <netinet/tcp.h> header file. */
|
||||||
#undef HAVE_NETINET_TCP_H
|
#undef HAVE_NETINET_TCP_H
|
||||||
|
|
||||||
|
/* Define if you have the <pty.h> header file. */
|
||||||
|
#undef HAVE_PTY_H
|
||||||
|
|
||||||
/* Define if you have the <resolv.h> header file. */
|
/* Define if you have the <resolv.h> header file. */
|
||||||
#undef HAVE_RESOLV_H
|
#undef HAVE_RESOLV_H
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,9 @@
|
||||||
#ifdef HAVE_SYSCALL_H
|
#ifdef HAVE_SYSCALL_H
|
||||||
# include <syscall.h>
|
# include <syscall.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_PTY_H
|
||||||
|
# include <pty.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* usleep
|
* usleep
|
||||||
|
@ -166,6 +169,9 @@ int strncasecmp( const char *str1, const char *str2, size_t n )
|
||||||
int wine_openpty(int *master, int *slave, char *name,
|
int wine_openpty(int *master, int *slave, char *name,
|
||||||
struct termios *term, struct winsize *winsize)
|
struct termios *term, struct winsize *winsize)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_OPENPTY
|
||||||
|
return openpty(master,slave,name,term,winsize);
|
||||||
|
#else
|
||||||
char *ptr1, *ptr2;
|
char *ptr1, *ptr2;
|
||||||
char pts_name[512];
|
char pts_name[512];
|
||||||
|
|
||||||
|
@ -198,6 +204,7 @@ int wine_openpty(int *master, int *slave, char *name,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue