comparison packages/io/fileio/current/src/select.cxx @ 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 786e2e6e3c3d
children 4a515225541b
comparison
equal deleted inserted replaced
1460:3203d2eca45d 1461:244c4e8297c2
315 // ------------------------------------------------------------------------- 315 // -------------------------------------------------------------------------
316 // Pselect API function 316 // Pselect API function
317 // 317 //
318 // This is derived from the POSIX-200X specification. 318 // This is derived from the POSIX-200X specification.
319 319
320 #ifdef CYGPKG_POSIX
321
322 __externC int 320 __externC int
323 pselect(int nfd, fd_set *in, fd_set *out, fd_set *ex, 321 pselect(int nfd, fd_set *in, fd_set *out, fd_set *ex,
324 const struct timespec *ts, const sigset_t *sigmask) 322 const struct timespec *ts, const sigset_t *sigmask)
325 { 323 {
326 struct timeval tv; 324 struct timeval tv;
325
326 #ifndef CYGPKG_POSIX_SIGNALS
327 CYG_ASSERT( sigmask == NULL,
328 "pselect called with non-null sigmask without POSIX signal support"
329 );
330 #endif
327 331
328 if (ts != NULL) 332 if (ts != NULL)
329 { 333 {
330 tv.tv_sec = ts->tv_sec; 334 tv.tv_sec = ts->tv_sec;
331 tv.tv_usec = ts->tv_nsec/1000; 335 tv.tv_usec = ts->tv_nsec/1000;
332 } 336 }
333 337
334 return cyg_pselect(nfd, in, out, ex, ts ? &tv : NULL, sigmask); 338 return cyg_pselect(nfd, in, out, ex, ts ? &tv : NULL, sigmask);
335 } 339 }
336
337 #endif
338 340
339 //========================================================================== 341 //==========================================================================
340 // Select support functions. 342 // Select support functions.
341 343
342 // ------------------------------------------------------------------------- 344 // -------------------------------------------------------------------------