]> andersk Git - openssh.git/commitdiff
- (dtucker) [configure.ac defines.h] Only define SHUT_RD (and friends) and O_NONBLOCK
authordtucker <dtucker>
Wed, 12 Jul 2006 04:14:31 +0000 (04:14 +0000)
committerdtucker <dtucker>
Wed, 12 Jul 2006 04:14:31 +0000 (04:14 +0000)
   if they're really needed.  Fixes build errors on HP-UX, old Linuxes and probably
   more.

ChangeLog
configure.ac
defines.h

index d94fb044b11bffcb1a91db27c3b5ab71d778a523..1f51779faabe570f88b3004c894ad4e41fd3b9e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+20060712
+ - (dtucker) [configure.ac defines.h] Only define SHUT_RD (and friends) and O_NONBLOCK
+   if they're really needed.  Fixes build errors on HP-UX, old Linuxes and probably
+   more.
+
 20060711
  - (dtucker) [configure.ac ssh-keygen.c openbsd-compat/bsd-openpty.c
    openbsd-compat/daemon.c] Add includes needed by open(2).  Conditionally
index 9477c6b5201a24c16cff8965b28c4a5ec812ccd7..a9725d47792518c4c6056d9a318a2880f7c65c2e 100644 (file)
@@ -1285,6 +1285,19 @@ AC_CHECK_DECL(tcsendbreak,
 
 AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>])
 
+AC_CHECK_DECLS(SHUT_RD, , ,[#include <sys/socket.h>])
+
+AC_CHECK_DECLS(O_NONBLOCK, , ,
+       [
+#include <sys/types.h>
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+       ])
+
 AC_CHECK_FUNCS(setresuid, [
        dnl Some platorms have setresuid that isn't implemented, test for this
        AC_MSG_CHECKING(if setresuid seems to work)
index cc8becd269525781df28f688892ce61bd6b6e636..cf1e1a2a5b1e29245efb47aef8eeddf1cb6dd3af 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -30,7 +30,7 @@
 
 /* Constants */
 
-#ifndef SHUT_RDWR
+#if defined(HAVE_DECL_SHUT_RD) && HAVE_DECL_SHUT_RD == 0
 enum
 {
   SHUT_RD = 0,         /* No more receptions.  */
@@ -90,8 +90,8 @@ enum
 #endif
 #endif
 
-#ifndef O_NONBLOCK     /* Non Blocking Open */
-# define O_NONBLOCK      00004
+#if defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK == 0
+# define O_NONBLOCK      00004 /* Non Blocking Open */
 #endif
 
 #ifndef S_ISDIR
This page took 1.6892 seconds and 5 git commands to generate.