Use the real glibc openpty if present.

This commit is contained in:
Marcus Meissner 1999-12-05 23:06:40 +00:00 committed by Alexandre Julliard
parent fe08849938
commit 2d7be870cc
4 changed files with 345 additions and 224 deletions

549
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -100,6 +100,12 @@ dnl Check for -lxpg4 for FreeBSD
AC_CHECK_LIB(xpg4,setrunelocale)
dnl Check for -lmmap for OS/2
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_FUNCS(dlopen,
@ -562,6 +568,7 @@ AC_CHECK_HEADERS(\
net/if.h \
netinet/in.h \
netinet/tcp.h \
pty.h \
resolv.h \
sched.h \
socket.h \

View File

@ -182,6 +182,9 @@
/* Define if you have the memmove function. */
#undef HAVE_MEMMOVE
/* Define if you have the openpty function. */
#undef HAVE_OPENPTY
/* Define if you have the rfork function. */
#undef HAVE_RFORK
@ -305,6 +308,9 @@
/* Define if you have the <netinet/tcp.h> header file. */
#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. */
#undef HAVE_RESOLV_H

View File

@ -29,6 +29,9 @@
#ifdef HAVE_SYSCALL_H
# include <syscall.h>
#endif
#ifdef HAVE_PTY_H
# include <pty.h>
#endif
/***********************************************************************
* 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,
struct termios *term, struct winsize *winsize)
{
#ifdef HAVE_OPENPTY
return openpty(master,slave,name,term,winsize);
#else
char *ptr1, *ptr2;
char pts_name[512];
@ -198,6 +204,7 @@ int wine_openpty(int *master, int *slave, char *name,
}
}
return -1;
#endif
}
/***********************************************************************