diff --git a/cde/configure.ac b/cde/configure.ac index fe3975eba..a5d2b9d9f 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -454,7 +454,7 @@ dnl Used to check if program 'tic' is available to install terminfo files AC_CHECK_PROGS(TIC, tic, :) dnl headers -AC_CHECK_HEADERS([locale.h security/pam_appl.h utempter.h]) +AC_CHECK_HEADERS([locale.h poll.h sys/poll.h security/pam_appl.h utempter.h]) dnl Xrender header AC_CHECK_HEADERS([X11/extensions/Xrender.h], [], diff --git a/cde/lib/csa/agent.c b/cde/lib/csa/agent.c index 4b110bae5..2146e6c76 100644 --- a/cde/lib/csa/agent.c +++ b/cde/lib/csa/agent.c @@ -28,14 +28,19 @@ * (c) Copyright 1993, 1994 Sun Microsystems, Inc. */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include #include #include #include -#if !defined(__linux__) && !defined(CSRG_BASED) +#if HAVE_POLL_H # include +#elif HAVE_SYS_POLL_H +# include #endif #if defined(SunOS) #include diff --git a/cde/lib/tt/bin/tttrace/tttrace.C b/cde/lib/tt/bin/tttrace/tttrace.C index 8012996ad..243d45521 100644 --- a/cde/lib/tt/bin/tttrace/tttrace.C +++ b/cde/lib/tt/bin/tttrace/tttrace.C @@ -31,6 +31,9 @@ * Copyright (c) 1993 by Sun Microsystems, Inc. */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include @@ -38,9 +41,9 @@ #include #include #include -#if defined(__linux__) +#if HAVE_SYS_POLL_H # include -#else +#elif HAVE_POLL_H # include #endif #include diff --git a/cde/lib/tt/lib/mp/mp_stream_socket.C b/cde/lib/tt/lib/mp/mp_stream_socket.C index 5009a99ef..3e034fbfe 100644 --- a/cde/lib/tt/lib/mp/mp_stream_socket.C +++ b/cde/lib/tt/lib/mp/mp_stream_socket.C @@ -31,12 +31,15 @@ * * Copyright (c) 1990 by Sun Microsystems, Inc. */ +#if HAVE_CONFIG_H +#include +#endif #include "tt_options.h" #include #include "mp/mp_stream_socket.h" -#if defined(__linux__) +#if HAVE_SYS_POLL_H #include -#else +#elif HAVE_POLL_H #include #endif #include diff --git a/cde/lib/tt/lib/tttk/tttk.C b/cde/lib/tt/lib/tttk/tttk.C index 826ec8b9e..e351d6a57 100644 --- a/cde/lib/tt/lib/tttk/tttk.C +++ b/cde/lib/tt/lib/tttk/tttk.C @@ -25,9 +25,12 @@ //%% (c) Copyright 1993, 1994 Sun Microsystems, Inc. //%% (c) Copyright 1993, 1994 Novell, Inc. //%% $TOG: tttk.C /main/5 1999/09/14 13:00:44 mgreess $ -#if defined(__linux__) +#if HAVE_CONFIG_H +#include +#endif +#if HAVE_SYS_POLL_H # include -#else +#elif HAVE_POLL_H # include #endif #include diff --git a/cde/lib/tt/lib/util/tt_file_system.C b/cde/lib/tt/lib/util/tt_file_system.C index 7973315cb..4cab26ed4 100644 --- a/cde/lib/tt/lib/util/tt_file_system.C +++ b/cde/lib/tt/lib/util/tt_file_system.C @@ -43,13 +43,15 @@ * Defines a class for browsing the file system mount table. * */ - +#if HAVE_CONFIG_H +#include +#endif #include #include #include -#if defined(__linux__) +#if HAVE_SYS_POLL_H # include -#else +#elif HAVE_POLL_H # include #endif #include diff --git a/cde/programs/dtmail/libDtMail/Common/Process.C b/cde/programs/dtmail/libDtMail/Common/Process.C index 56611bb7a..4524c23e0 100644 --- a/cde/programs/dtmail/libDtMail/Common/Process.C +++ b/cde/programs/dtmail/libDtMail/Common/Process.C @@ -41,12 +41,19 @@ *+ENOTICE */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include #include #include +#if HAVE_POLL_H #include +#elif HAVE_SYS_POLL_H +#include +#endif /* ** file included for INFTIM diff --git a/cde/programs/dtmail/libDtMail/RFC/SunV3.C b/cde/programs/dtmail/libDtMail/RFC/SunV3.C index 8b50059e8..c5ae3a700 100644 --- a/cde/programs/dtmail/libDtMail/RFC/SunV3.C +++ b/cde/programs/dtmail/libDtMail/RFC/SunV3.C @@ -40,13 +40,20 @@ *+ENOTICE */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include #include #include #include +#if HAVE_POLL_H #include +#elif HAVE_SYS_POLL_H +#include +#endif #include #include #include diff --git a/cde/programs/dtscreen/dtscreen.h b/cde/programs/dtscreen/dtscreen.h index 4c7b4cce9..7f80759d9 100644 --- a/cde/programs/dtscreen/dtscreen.h +++ b/cde/programs/dtscreen/dtscreen.h @@ -87,15 +87,24 @@ extern void unhide_hft_ring(); /* System V Release 4 redefinitions of BSD functions and structures */ +#if HAVE_CONFIG_H +#include +#endif + #if defined (SYSV) || defined (SVR4) +#if HAVE_SYS_POLL_H +#include +#elif HAVE_POLL_H +#include +#endif + #include #define passwd spwd #define pw_passwd sp_pwdp #if defined(AIXV3) #undef NULL #define NULL 0 -#include struct passwd { char *pw_name; @@ -107,7 +116,6 @@ struct passwd { char *pw_shell; }; #else -#include #include #define getpwnam getspnam #endif