In C++ bool is 1 byte long, but in C it is 4 bytes because of
infra/current/include/cyg_type.h:    typedef cyg_halbool bool;

Hence I suggest to replace bool by cyg_bool:

Index: io/can/current/include/can.h
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/can/current/include/can.h,v
retrieving revision 1.2
diff -u -r1.2 can.h
--- io/can/current/include/can.h        13 Sep 2005 13:36:24 -0000      1.2
+++ io/can/current/include/can.h        31 Jan 2007 15:28:02 -0000
@@ -110,11 +110,11 @@
volatile int data_cnt; // count of events or messages currently in buffer
    cyg_drv_cond_t           wait;
    cyg_drv_mutex_t          lock;
-    bool                     waiting;
+    cyg_bool                 waiting;
#if defined(CYGOPT_IO_CAN_SUPPORT_NONBLOCKING)
- bool blocking; // true - timeouts will bes used, false - call blocks until data arrives + cyg_bool blocking; // true - timeouts will bes used, false - call blocks until data arrives
#endif
- volatile bool abort; // Set by an outsider to kill processing + volatile cyg_bool abort; // Set by an outsider to kill processing volatile cyg_int32 pending; // This many bytes waiting to be sent
#if defined(CYGOPT_IO_CAN_SUPPORT_TIMEOUTS)
cyg_uint32 timeout; // timeout value for reading data from buffer
@@ -144,7 +144,7 @@
    can_callbacks_t    *callbacks;
void *dev_priv; // Whatever is needed by actual device routines
    cyg_can_info_t      config;    // Current configuration
-    bool                init;      // true if driver is already initialized
+    cyg_bool            init;      // true if driver is already initialized
    can_cbuf_t          out_cbuf;  // buffer for transmit can messages
    can_cbuf_t          in_cbuf;   // buffer with received can events
};

Reply via email to