summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-06-02 07:18:47 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-06-02 07:18:47 +1000
commitc7aad0058c957afeb26a3f703e8cb0eddeb62365 (patch)
treec593bf46bc9c6dcb2ae2a98b05a98e476b752eca /defines.h
parentc0c3373216801797053e123b5f62d35bf41b3611 (diff)
downloadopenssh-git-c7aad0058c957afeb26a3f703e8cb0eddeb62365.tar.gz
- (dtucker) [configure.ac defines.h] Test for fd_mask, howmany and NFDBITS
rather than trying to enumerate the plaforms that don't have them. Based on a patch from Nathan Osman, with help from tim@.
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/defines.h b/defines.h
index 64515c2f..d5ce52f3 100644
--- a/defines.h
+++ b/defines.h
@@ -25,7 +25,7 @@
#ifndef _DEFINES_H
#define _DEFINES_H
-/* $Id: defines.h,v 1.171 2013/03/07 09:06:13 dtucker Exp $ */
+/* $Id: defines.h,v 1.172 2013/06/01 21:18:48 dtucker Exp $ */
/* Constants */
@@ -171,11 +171,6 @@ enum
# define MAP_FAILED ((void *)-1)
#endif
-/* *-*-nto-qnx doesn't define this constant in the system headers */
-#ifdef MISSING_NFDBITS
-# define NFDBITS (8 * sizeof(unsigned long))
-#endif
-
/*
SCO Open Server 3 has INADDR_LOOPBACK defined in rpc/rpc.h but
including rpc/rpc.h breaks Solaris 6
@@ -355,11 +350,19 @@ struct winsize {
};
#endif
-/* *-*-nto-qnx does not define this type in the system headers */
-#ifdef MISSING_FD_MASK
+/* bits needed for select that may not be in the system headers */
+#ifndef HAVE_FD_MASK
typedef unsigned long int fd_mask;
#endif
+#if defined(HAVE_DECL_NFDBITS) && HAVE_DECL_NFDBITS == 0
+# define NFDBITS (8 * sizeof(unsigned long))
+#endif
+
+#if defined(HAVE_DECL_HOWMANY) && HAVE_DECL_HOWMANY == 0
+# define howmany(x,y) (((x)+((y)-1))/(y))
+#endif
+
/* Paths */
#ifndef _PATH_BSHELL
@@ -484,11 +487,6 @@ struct winsize {
# define __nonnull__(x)
#endif
-/* *-*-nto-qnx doesn't define this macro in the system headers */
-#ifdef MISSING_HOWMANY
-# define howmany(x,y) (((x)+((y)-1))/(y))
-#endif
-
#ifndef OSSH_ALIGNBYTES
#define OSSH_ALIGNBYTES (sizeof(int) - 1)
#endif