diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | configure.ac | 39 | ||||
-rw-r--r-- | defines.h | 24 |
3 files changed, 47 insertions, 19 deletions
@@ -2,6 +2,9 @@ | |||
2 | - (dtucker) [configure.ac openbsd-compat/xcrypt.c] bz#2112: fall back to | 2 | - (dtucker) [configure.ac openbsd-compat/xcrypt.c] bz#2112: fall back to |
3 | using openssl's DES_crpyt function on platorms that don't have a native | 3 | using openssl's DES_crpyt function on platorms that don't have a native |
4 | one, eg Android. Based on a patch from Nathan Osman. | 4 | one, eg Android. Based on a patch from Nathan Osman. |
5 | - (dtucker) [configure.ac defines.h] Test for fd_mask, howmany and NFDBITS | ||
6 | rather than trying to enumerate the plaforms that don't have them. | ||
7 | Based on a patch from Nathan Osman, with help from tim@. | ||
5 | 8 | ||
6 | 20130529 | 9 | 20130529 |
7 | - (dtucker) [configure.ac openbsd-compat/bsd-misc.h] bz#2087: Add a null | 10 | - (dtucker) [configure.ac openbsd-compat/bsd-misc.h] bz#2087: Add a null |
diff --git a/configure.ac b/configure.ac index c70c504f9..d35a19bcc 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.526 2013/06/01 20:28:04 dtucker Exp $ | 1 | # $Id: configure.ac,v 1.527 2013/06/01 21:18:48 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 | ||
17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) | 17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) |
18 | AC_REVISION($Revision: 1.526 $) | 18 | AC_REVISION($Revision: 1.527 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | AC_LANG([C]) | 20 | AC_LANG([C]) |
21 | 21 | ||
@@ -979,9 +979,6 @@ mips-sony-bsd|mips-sony-newsos4) | |||
979 | *-*-nto-qnx*) | 979 | *-*-nto-qnx*) |
980 | AC_DEFINE([USE_PIPES]) | 980 | AC_DEFINE([USE_PIPES]) |
981 | AC_DEFINE([NO_X11_UNIX_SOCKETS]) | 981 | AC_DEFINE([NO_X11_UNIX_SOCKETS]) |
982 | AC_DEFINE([MISSING_NFDBITS], [1], [Define on *nto-qnx systems]) | ||
983 | AC_DEFINE([MISSING_HOWMANY], [1], [Define on *nto-qnx systems]) | ||
984 | AC_DEFINE([MISSING_FD_MASK], [1], [Define on *nto-qnx systems]) | ||
985 | AC_DEFINE([DISABLE_LASTLOG]) | 982 | AC_DEFINE([DISABLE_LASTLOG]) |
986 | AC_DEFINE([SSHD_ACQUIRES_CTTY]) | 983 | AC_DEFINE([SSHD_ACQUIRES_CTTY]) |
987 | AC_DEFINE([BROKEN_SHADOW_EXPIRE], [1], [QNX shadow support is broken]) | 984 | AC_DEFINE([BROKEN_SHADOW_EXPIRE], [1], [QNX shadow support is broken]) |
@@ -1002,7 +999,6 @@ mips-sony-bsd|mips-sony-newsos4) | |||
1002 | 999 | ||
1003 | *-*-lynxos) | 1000 | *-*-lynxos) |
1004 | CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__" | 1001 | CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__" |
1005 | AC_DEFINE([MISSING_HOWMANY]) | ||
1006 | AC_DEFINE([BROKEN_SETVBUF], [1], [LynxOS has broken setvbuf() implementation]) | 1002 | AC_DEFINE([BROKEN_SETVBUF], [1], [LynxOS has broken setvbuf() implementation]) |
1007 | ;; | 1003 | ;; |
1008 | esac | 1004 | esac |
@@ -1703,6 +1699,37 @@ AC_CHECK_DECLS([offsetof], , , [ | |||
1703 | #include <stddef.h> | 1699 | #include <stddef.h> |
1704 | ]) | 1700 | ]) |
1705 | 1701 | ||
1702 | # extra bits for select(2) | ||
1703 | AC_CHECK_DECLS([howmany, NFDBITS], [], [], [[ | ||
1704 | #include <sys/param.h> | ||
1705 | #include <sys/types.h> | ||
1706 | #ifdef HAVE_SYS_SYSMACROS_H | ||
1707 | #include <sys/sysmacros.h> | ||
1708 | #endif | ||
1709 | #ifdef HAVE_SYS_SELECT_H | ||
1710 | #include <sys/select.h> | ||
1711 | #endif | ||
1712 | #ifdef HAVE_SYS_TIME_H | ||
1713 | #include <sys/time.h> | ||
1714 | #endif | ||
1715 | #ifdef HAVE_UNISTD_H | ||
1716 | #include <unistd.h> | ||
1717 | #endif | ||
1718 | ]]) | ||
1719 | AC_CHECK_TYPES([fd_mask], [], [], [[ | ||
1720 | #include <sys/param.h> | ||
1721 | #include <sys/types.h> | ||
1722 | #ifdef HAVE_SYS_SELECT_H | ||
1723 | #include <sys/select.h> | ||
1724 | #endif | ||
1725 | #ifdef HAVE_SYS_TIME_H | ||
1726 | #include <sys/time.h> | ||
1727 | #endif | ||
1728 | #ifdef HAVE_UNISTD_H | ||
1729 | #include <unistd.h> | ||
1730 | #endif | ||
1731 | ]]) | ||
1732 | |||
1706 | AC_CHECK_FUNCS([setresuid], [ | 1733 | AC_CHECK_FUNCS([setresuid], [ |
1707 | dnl Some platorms have setresuid that isn't implemented, test for this | 1734 | dnl Some platorms have setresuid that isn't implemented, test for this |
1708 | AC_MSG_CHECKING([if setresuid seems to work]) | 1735 | AC_MSG_CHECKING([if setresuid seems to work]) |
@@ -25,7 +25,7 @@ | |||
25 | #ifndef _DEFINES_H | 25 | #ifndef _DEFINES_H |
26 | #define _DEFINES_H | 26 | #define _DEFINES_H |
27 | 27 | ||
28 | /* $Id: defines.h,v 1.171 2013/03/07 09:06:13 dtucker Exp $ */ | 28 | /* $Id: defines.h,v 1.172 2013/06/01 21:18:48 dtucker Exp $ */ |
29 | 29 | ||
30 | 30 | ||
31 | /* Constants */ | 31 | /* Constants */ |
@@ -171,11 +171,6 @@ enum | |||
171 | # define MAP_FAILED ((void *)-1) | 171 | # define MAP_FAILED ((void *)-1) |
172 | #endif | 172 | #endif |
173 | 173 | ||
174 | /* *-*-nto-qnx doesn't define this constant in the system headers */ | ||
175 | #ifdef MISSING_NFDBITS | ||
176 | # define NFDBITS (8 * sizeof(unsigned long)) | ||
177 | #endif | ||
178 | |||
179 | /* | 174 | /* |
180 | SCO Open Server 3 has INADDR_LOOPBACK defined in rpc/rpc.h but | 175 | SCO Open Server 3 has INADDR_LOOPBACK defined in rpc/rpc.h but |
181 | including rpc/rpc.h breaks Solaris 6 | 176 | including rpc/rpc.h breaks Solaris 6 |
@@ -355,11 +350,19 @@ struct winsize { | |||
355 | }; | 350 | }; |
356 | #endif | 351 | #endif |
357 | 352 | ||
358 | /* *-*-nto-qnx does not define this type in the system headers */ | 353 | /* bits needed for select that may not be in the system headers */ |
359 | #ifdef MISSING_FD_MASK | 354 | #ifndef HAVE_FD_MASK |
360 | typedef unsigned long int fd_mask; | 355 | typedef unsigned long int fd_mask; |
361 | #endif | 356 | #endif |
362 | 357 | ||
358 | #if defined(HAVE_DECL_NFDBITS) && HAVE_DECL_NFDBITS == 0 | ||
359 | # define NFDBITS (8 * sizeof(unsigned long)) | ||
360 | #endif | ||
361 | |||
362 | #if defined(HAVE_DECL_HOWMANY) && HAVE_DECL_HOWMANY == 0 | ||
363 | # define howmany(x,y) (((x)+((y)-1))/(y)) | ||
364 | #endif | ||
365 | |||
363 | /* Paths */ | 366 | /* Paths */ |
364 | 367 | ||
365 | #ifndef _PATH_BSHELL | 368 | #ifndef _PATH_BSHELL |
@@ -484,11 +487,6 @@ struct winsize { | |||
484 | # define __nonnull__(x) | 487 | # define __nonnull__(x) |
485 | #endif | 488 | #endif |
486 | 489 | ||
487 | /* *-*-nto-qnx doesn't define this macro in the system headers */ | ||
488 | #ifdef MISSING_HOWMANY | ||
489 | # define howmany(x,y) (((x)+((y)-1))/(y)) | ||
490 | #endif | ||
491 | |||
492 | #ifndef OSSH_ALIGNBYTES | 490 | #ifndef OSSH_ALIGNBYTES |
493 | #define OSSH_ALIGNBYTES (sizeof(int) - 1) | 491 | #define OSSH_ALIGNBYTES (sizeof(int) - 1) |
494 | #endif | 492 | #endif |