summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2006-07-12 14:14:31 +1000
committerDarren Tucker <dtucker@zip.com.au>2006-07-12 14:14:31 +1000
commit248469bc8d6c001596fdd3a83c1ffc63ae466e5b (patch)
tree9bb895755ccbdd68742c3f96950ce07efbb7850c
parente0e4aad1fdd8770283798eede1297f363b43498d (diff)
- (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.
-rw-r--r--ChangeLog7
-rw-r--r--configure.ac17
-rw-r--r--defines.h8
3 files changed, 25 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 78a23fe4f..b2c8cda3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
120060712
2 - (dtucker) [configure.ac defines.h] Only define SHUT_RD (and friends) and O_NONBLOCK
3 if they're really needed. Fixes build errors on HP-UX, old Linuxes and probably
4 more.
5
120060711 620060711
2 - (dtucker) [configure.ac ssh-keygen.c openbsd-compat/bsd-openpty.c 7 - (dtucker) [configure.ac ssh-keygen.c openbsd-compat/bsd-openpty.c
3 openbsd-compat/daemon.c] Add includes needed by open(2). Conditionally 8 openbsd-compat/daemon.c] Add includes needed by open(2). Conditionally
@@ -4846,4 +4851,4 @@
4846 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 4851 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
4847 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 4852 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
4848 4853
4849$Id: ChangeLog,v 1.4387 2006/07/11 09:01:51 dtucker Exp $ 4854$Id: ChangeLog,v 1.4388 2006/07/12 04:14:31 dtucker Exp $
diff --git a/configure.ac b/configure.ac
index c6d56bf4a..19446b3bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.345 2006/07/11 08:00:06 dtucker Exp $ 1# $Id: configure.ac,v 1.346 2006/07/12 04:14:31 dtucker Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -15,7 +15,7 @@
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org)
18AC_REVISION($Revision: 1.345 $) 18AC_REVISION($Revision: 1.346 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20 20
21AC_CONFIG_HEADER(config.h) 21AC_CONFIG_HEADER(config.h)
@@ -1285,6 +1285,19 @@ AC_CHECK_DECL(tcsendbreak,
1285 1285
1286AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>]) 1286AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>])
1287 1287
1288AC_CHECK_DECLS(SHUT_RD, , ,[#include <sys/socket.h>])
1289
1290AC_CHECK_DECLS(O_NONBLOCK, , ,
1291 [
1292#include <sys/types.h>
1293#ifdef HAVE_SYS_STAT_H
1294# include <sys/stat.h>
1295#endif
1296#ifdef HAVE_FCNTL_H
1297# include <fcntl.h>
1298#endif
1299 ])
1300
1288AC_CHECK_FUNCS(setresuid, [ 1301AC_CHECK_FUNCS(setresuid, [
1289 dnl Some platorms have setresuid that isn't implemented, test for this 1302 dnl Some platorms have setresuid that isn't implemented, test for this
1290 AC_MSG_CHECKING(if setresuid seems to work) 1303 AC_MSG_CHECKING(if setresuid seems to work)
diff --git a/defines.h b/defines.h
index f2fdd3cad..4dccc9172 100644
--- a/defines.h
+++ b/defines.h
@@ -25,12 +25,12 @@
25#ifndef _DEFINES_H 25#ifndef _DEFINES_H
26#define _DEFINES_H 26#define _DEFINES_H
27 27
28/* $Id: defines.h,v 1.132 2006/05/15 07:17:30 dtucker Exp $ */ 28/* $Id: defines.h,v 1.133 2006/07/12 04:14:31 dtucker Exp $ */
29 29
30 30
31/* Constants */ 31/* Constants */
32 32
33#ifndef SHUT_RDWR 33#if defined(HAVE_DECL_SHUT_RD) && HAVE_DECL_SHUT_RD == 0
34enum 34enum
35{ 35{
36 SHUT_RD = 0, /* No more receptions. */ 36 SHUT_RD = 0, /* No more receptions. */
@@ -90,8 +90,8 @@ enum
90#endif 90#endif
91#endif 91#endif
92 92
93#ifndef O_NONBLOCK /* Non Blocking Open */ 93#if defined(HAVE_DECL_O_NONBLOCK) && HAVE_DECL_O_NONBLOCK == 0
94# define O_NONBLOCK 00004 94# define O_NONBLOCK 00004 /* Non Blocking Open */
95#endif 95#endif
96 96
97#ifndef S_ISDIR 97#ifndef S_ISDIR