Bugzilla – Attachment 2278 Details for
Bug 2085
fd_mask and howmany are not defined in Android
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
tests for NFDBITS, howmany and fd_mask take 2
openssh-select-bits-take2.patch (text/plain), 2.81 KB, created by
Tim Rice
on 2013-05-30 14:55:57 AEST
(
hide
)
Description:
tests for NFDBITS, howmany and fd_mask take 2
Filename:
MIME Type:
Creator:
Tim Rice
Created:
2013-05-30 14:55:57 AEST
Size:
2.81 KB
patch
obsolete
>--- configure.ac.old 2013-05-29 19:21:18.514235003 -0700 >+++ configure.ac 2013-05-29 21:05:08.090795082 -0700 >@@ -979,9 +979,6 @@ > *-*-nto-qnx*) > AC_DEFINE([USE_PIPES]) > AC_DEFINE([NO_X11_UNIX_SOCKETS]) >- AC_DEFINE([MISSING_NFDBITS], [1], [Define on *nto-qnx systems]) >- AC_DEFINE([MISSING_HOWMANY], [1], [Define on *nto-qnx systems]) >- AC_DEFINE([MISSING_FD_MASK], [1], [Define on *nto-qnx systems]) > AC_DEFINE([DISABLE_LASTLOG]) > AC_DEFINE([SSHD_ACQUIRES_CTTY]) > AC_DEFINE([BROKEN_SHADOW_EXPIRE], [1], [QNX shadow support is broken]) >@@ -1002,7 +999,6 @@ > > *-*-lynxos) > CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__" >- AC_DEFINE([MISSING_HOWMANY]) > AC_DEFINE([BROKEN_SETVBUF], [1], [LynxOS has broken setvbuf() implementation]) > ;; > esac >@@ -1703,6 +1699,38 @@ > #include <stddef.h> > ]) > >+# extra bits for select(2) >+AC_CHECK_DECLS([howmany, NFDBITS], [], [], [[ >+#include <sys/param.h> >+#include <sys/types.h> >+#ifdef HAVE_SYS_SYSMACROS_H >+#include <sys/sysmacros.h> >+#endif >+#ifdef HAVE_SYS_SELECT_H >+#include <sys/select.h> >+#endif >+#ifdef HAVE_SYS_TIME_H >+#include <sys/time.h> >+#endif >+#ifdef HAVE_UNISTD_H >+#include <unistd.h> >+#endif >+ ]]) >+AC_CHECK_TYPE([fd_mask], >+ [AC_DEFINE([HAVE_FD_MASK], [1], [define if you have fd_mask type])], [], [[ >+#include <sys/param.h> >+#include <sys/types.h> >+#ifdef HAVE_SYS_SELECT_H >+#include <sys/select.h> >+#endif >+#ifdef HAVE_SYS_TIME_H >+#include <sys/time.h> >+#endif >+#ifdef HAVE_UNISTD_H >+#include <unistd.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]) >--- defines.h.old 2013-03-07 07:31:19.613544004 -0800 >+++ defines.h 2013-05-29 21:11:47.370795005 -0700 >@@ -171,11 +171,6 @@ > # 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 @@ > }; > #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 @@ > # 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
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 2085
:
2230
|
2231
|
2235
|
2236
|
2276
|
2278
|
2279
|
2282