Mercurial > flash_v2
changeset 1461:244c4e8297c2
* src/select.cxx: No need to make pselect() dependent on
CYGPKG_POSIX - that would depend on the arguments. Assert instead,
and more correctly make it contingent on CYGPKG_POSIX_SIGNALS.
* src/fio.h: Separate out signal functionality into its own separate
test.
| author | jlarmour |
|---|---|
| date | Wed, 07 Jan 2004 06:45:28 +0000 |
| parents | 3203d2eca45d |
| children | be755fe5817e |
| files | packages/io/fileio/current/ChangeLog packages/io/fileio/current/src/fio.h packages/io/fileio/current/src/select.cxx |
| diffstat | 3 files changed, 27 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/io/fileio/current/ChangeLog +++ b/packages/io/fileio/current/ChangeLog @@ -1,3 +1,12 @@ +2004-01-07 Jonathan Larmour <jifl@eCosCentric.com> + + * src/select.cxx: No need to make pselect() dependent on + CYGPKG_POSIX - that would depend on the arguments. Assert instead, + and more correctly make it contingent on CYGPKG_POSIX_SIGNALS. + + * src/fio.h: Separate out signal functionality into its own separate + test. + 2003-12-21 Sandeep Kumar <sandeep@codito.com> * src/dir.cxx (readdir_r): Handle NULL dirp argument and return
--- a/packages/io/fileio/current/src/fio.h +++ b/packages/io/fileio/current/src/fio.h @@ -92,13 +92,23 @@ // POSIX API support #ifdef CYGPKG_POSIX - +#include <pkgconf/posix.h> #include <cyg/posix/export.h> #define CYG_FILEIO_FUNCTION_START() CYG_POSIX_FUNCTION_START() #define CYG_FILEIO_FUNCTION_FINISH() CYG_POSIX_FUNCTION_FINISH() +#else + +#define CYG_FILEIO_FUNCTION_START() CYG_EMPTY_STATEMENT + +#define CYG_FILEIO_FUNCTION_FINISH() CYG_EMPTY_STATEMENT + +#endif + +#ifdef CYGPKG_POSIX_SIGNALS + #define CYG_FILEIO_SIGMASK_SET( __set, __oset ) \ CYG_PTHREAD_SIGMASK_SET( __set, __oset ) @@ -109,12 +119,7 @@ #else -#define CYG_FILEIO_FUNCTION_START() CYG_EMPTY_STATEMENT - -#define CYG_FILEIO_FUNCTION_FINISH() CYG_EMPTY_STATEMENT - -#define CYG_FILEIO_SIGMASK_SET( __set, __oset ) \ - CYG_UNUSED_PARAM(sigset_t *, __oset) +#define CYG_FILEIO_SIGMASK_SET( __set, __oset ) CYG_EMPTY_STATEMENT #define CYG_FILEIO_SIGPENDING() (0)
--- a/packages/io/fileio/current/src/select.cxx +++ b/packages/io/fileio/current/src/select.cxx @@ -317,14 +317,18 @@ select(int nfd, fd_set *in, fd_set *out, // // This is derived from the POSIX-200X specification. -#ifdef CYGPKG_POSIX - __externC int pselect(int nfd, fd_set *in, fd_set *out, fd_set *ex, const struct timespec *ts, const sigset_t *sigmask) { struct timeval tv; +#ifndef CYGPKG_POSIX_SIGNALS + CYG_ASSERT( sigmask == NULL, + "pselect called with non-null sigmask without POSIX signal support" + ); +#endif + if (ts != NULL) { tv.tv_sec = ts->tv_sec; @@ -334,8 +338,6 @@ pselect(int nfd, fd_set *in, fd_set *out return cyg_pselect(nfd, in, out, ex, ts ? &tv : NULL, sigmask); } -#endif - //========================================================================== // Select support functions.
