Changeset 6131ae87f1f4d61b94dfd16f280384290a3e65f8
- Timestamp:
- 04/14/11 03:17:25
(2 years ago)
- Author:
- Piotr Sikora <piotr.sikora@frickle.com>
- git-committer:
- Piotr Sikora <piotr.sikora@frickle.com> 1302751045 +0000
- git-parent:
[b8cf70c088e4f042cd71503f15c6503a3266c11a]
- git-author:
- Piotr Sikora <piotr.sikora@frickle.com> 1302751045 +0000
- Message:
Correctly detect availability of openpty().
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r950cb58 |
r6131ae8 |
|
| 391 | 391 | ]]) |
|---|
| 392 | 392 | |
|---|
| | 393 | AC_CHECK_DECLS([openpty], [], [], |
|---|
| | 394 | [#if defined(HAVE_SYS_TYPES_H) |
|---|
| | 395 | # include <sys/types.h> |
|---|
| | 396 | #endif |
|---|
| | 397 | #if defined(HAVE_SYS_IOCTL_H) |
|---|
| | 398 | # include <sys/ioctl.h> |
|---|
| | 399 | #endif |
|---|
| | 400 | #if defined(HAVE_TERMIOS_H) |
|---|
| | 401 | # include <termios.h> |
|---|
| | 402 | #endif |
|---|
| | 403 | #if defined(HAVE_LIBUTIL_H) |
|---|
| | 404 | # include <libutil.h> |
|---|
| | 405 | #endif |
|---|
| | 406 | #if defined(HAVE_UTIL_H) |
|---|
| | 407 | # include <util.h> |
|---|
| | 408 | #endif |
|---|
| | 409 | #if defined(HAVE_PTY_H) |
|---|
| | 410 | # include <pty.h> |
|---|
| | 411 | #endif |
|---|
| | 412 | ]) |
|---|
| | 413 | |
|---|
| 393 | 414 | AC_CHECK_FUNCS(getpwnam_r) |
|---|
| 394 | 415 | GETPWNAM_R_POSIX |
|---|
| r1afc481 |
r6131ae8 |
|
| 119 | 119 | #undef HAVE_STRNSTRN |
|---|
| 120 | 120 | #undef HAVE_OPENPTY |
|---|
| | 121 | #undef HAVE_DECL_OPENPTY |
|---|
| 121 | 122 | #undef HAVE_INET_PTON |
|---|
| 122 | 123 | #undef HAVE_INET_NTOP |
|---|
| r1afc481 |
r6131ae8 |
|
| 311 | 311 | int |
|---|
| 312 | 312 | allocate_pty(int *master, int *slave) { |
|---|
| 313 | | #ifdef HAVE_OPENPTY |
|---|
| | 313 | #if defined(HAVE_OPENPTY) || defined(HAVE_DECL_OPENPTY) |
|---|
| 314 | 314 | if(openpty(master, slave, NULL, NULL, NULL)) return -1; |
|---|
| 315 | 315 | #else |
|---|