summaryrefslogtreecommitdiff
path: root/sys.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2009-04-09 14:55:03 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2009-04-09 14:57:09 -0700
commit4823838f77ab03cccd07860fdf8002bc577e0f04 (patch)
treef14e71c38d43ee82d245d4240b61bca02c183e42 /sys.c
parent638f4ac8e233973dc3c89d87cd9f6ac05489fef4 (diff)
luit: Convert platform #ifdefs to configure tests for functions & headers
Also check for __SVR4 in remaining SVR4 check to match Solaris compiler default definition. Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'sys.c')
-rw-r--r--sys.c35
1 files changed, 11 insertions, 24 deletions
diff --git a/sys.c b/sys.c
index da97028..ba60fbf 100644
--- a/sys.c
+++ b/sys.c
@@ -34,14 +34,8 @@ THE SOFTWARE.
#include <signal.h>
#include <errno.h>
-#ifdef SVR4
-#define HAVE_POLL
-#endif
-
-#ifndef HAVE_POLL
-#ifndef _MINIX
-#define HAVE_SELECT
-#endif
+#ifdef HAVE_CONFIG_H
+# include "config.h"
#endif
#ifdef HAVE_POLL
@@ -49,27 +43,20 @@ THE SOFTWARE.
#undef HAVE_SELECT
#endif
-#ifdef __QNX__
-#include <sys/select.h>
-#endif
-
-
-#if (defined(__GLIBC__) && \
- (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))) || \
- defined(SVR4) || defined(__APPLE__)
-#define HAVE_GRANTPT
+#ifdef HAVE_SYS_SELECT_H
+# include <sys/select.h>
#endif
-#ifdef __GLIBC__
-#include <pty.h>
+#ifdef HAVE_PTY_H
+# include <pty.h>
#endif
-#ifdef SVR4
-#include <stropts.h>
+#ifdef HAVE_STROPTS_H
+# include <stropts.h>
#endif
-#if (defined(__unix__) || defined(unix)) && !defined(USG)
-#include <sys/param.h>
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
#endif
#include "sys.h"
@@ -433,7 +420,7 @@ openTty(char *line)
}
#endif
-#ifdef SVR4
+#if defined(SVR4) || defined(__SVR4)
rc = ioctl(tty, I_PUSH, "ptem");
if(rc < 0)
goto bail;