This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix build problem when no posix signals enabled


Index: isoinfra/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/isoinfra/current/ChangeLog,v
retrieving revision 1.24
diff -u -5 -p -r1.24 ChangeLog
--- isoinfra/current/ChangeLog	15 Jul 2003 13:39:40 -0000	1.24
+++ isoinfra/current/ChangeLog	7 Jan 2004 06:44:56 -0000
@@ -1,5 +1,10 @@
+2004-01-07  Jonathan Larmour  <jifl@eCosCentric.com>
+
+	* include/sys/select.h: Only declare pselect() when posix signals are
+	included.
+
 2003-07-15  Andrew Lunn  <andrew.lunn@ascom.ch>
 
 	* include/sys/stat.h (S_ISGID): Please, somebody teach me to count!
 
 2003-07-10  Andrew Lunn  <andrew.lunn@ascom.ch>
Index: isoinfra/current/include/sys/select.h
===================================================================
RCS file: /cvs/ecos/ecos/packages/isoinfra/current/include/sys/select.h,v
retrieving revision 1.4
diff -u -5 -p -r1.4 select.h
--- isoinfra/current/include/sys/select.h	11 Nov 2002 23:55:20 -0000	1.4
+++ isoinfra/current/include/sys/select.h	7 Jan 2004 06:44:56 -0000
@@ -117,27 +117,29 @@ typedef	struct fd_set {
 #  ifndef __NEED_FD_SETS_ONLY
 
 #   ifndef CYGONCE_ISO_SYS_SELECT_H
 #   define CYGONCE_ISO_SYS_SELECT_H
 
-#include <signal.h>
-
 #   ifdef __cplusplus
 extern "C" {
 #   endif
 
 struct timeval;
 extern int
 select( int /* nfd */, fd_set * /* in */, fd_set * /* out */,
         fd_set * /* ex */, struct timeval * /* tv */ );
 
 #ifdef CYGPKG_POSIX
+# include <pkgconf/posix.h>
+# ifdef CYGPKG_POSIX_SIGNALS
+#  include <signal.h>
 struct timespec;
 extern int
 pselect( int /* nfd */, fd_set * /* in */, fd_set * /* out */,
         fd_set * /* ex */, const struct timespec * /* ts */,
         const sigset_t * /* mask */);
+# endif
 #endif
     
 #   ifdef __cplusplus
 }   /* extern "C" */
 #   endif
Index: io/fileio/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/ChangeLog,v
retrieving revision 1.38
diff -u -5 -p -r1.38 ChangeLog
--- io/fileio/current/ChangeLog	21 Dec 2003 10:11:16 -0000	1.38
+++ io/fileio/current/ChangeLog	7 Jan 2004 06:44:56 -0000
@@ -1,5 +1,14 @@
+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
 	EBADF
 
Index: io/fileio/current/src/fio.h
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/src/fio.h,v
retrieving revision 1.9
diff -u -5 -p -r1.9 fio.h
--- io/fileio/current/src/fio.h	6 Oct 2003 18:45:23 -0000	1.9
+++ io/fileio/current/src/fio.h	7 Jan 2004 06:44:57 -0000
@@ -90,33 +90,38 @@
 
 //=============================================================================
 // 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 )
 
 #define CYG_FILEIO_SIGPENDING() CYG_POSIX_SIGPENDING()
 
 #define CYG_FILEIO_DELIVER_SIGNALS( __mask ) \
         CYG_POSIX_DELIVER_SIGNALS( __mask )
 
 #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)
 
 #define CYG_FILEIO_DELIVER_SIGNALS( __mask ) CYG_EMPTY_STATEMENT
 
Index: io/fileio/current/src/select.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/fileio/current/src/select.cxx,v
retrieving revision 1.10
diff -u -5 -p -r1.10 select.cxx
--- io/fileio/current/src/select.cxx	5 Dec 2003 09:04:14 -0000	1.10
+++ io/fileio/current/src/select.cxx	7 Jan 2004 06:44:57 -0000
@@ -315,28 +315,30 @@ select(int nfd, fd_set *in, fd_set *out,
 // -------------------------------------------------------------------------
 // Pselect API function
 //
 // 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;
             tv.tv_usec = ts->tv_nsec/1000;
         }
 
 	return cyg_pselect(nfd, in, out, ex, ts ? &tv : NULL, sigmask);
 }
-
-#endif
 
 //==========================================================================
 // Select support functions.
 
 // -------------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]