BOOL in Systypes.h

Erik Groenhuis e.groenhuis at xs4all.nl
Wed Dec 24 09:53:24 GMT 2003


Finally started to use OSLib in a serious way.

While attempting to re-compile !Dustbin, one of the things I hit upon
were:

Systypes.h in OSLibSupport does it's own definition of BOOL (and NULL):

------8<------------
#if !defined BOOL
  #define BOOL bool
#endif

#if !defined NULL
  #define NULL ((void*)0)
#endif
------8<------------

This is unwise, as there is a very good definition of BOOL in
oslib/types.h, which takes into account various compilers.

I propose to replace the above bit in Systypes.h with:

------8<------------
/* Make sure BOOL and NULL are defined */
#if !defined( types_H )
  #include "oslib/types.h"
#endif
------8<------------


-- 
Erik Groenhuis http://www.xs4all.nl/~erikgrnh
Home of RCS for RISC OS v5.7.1.2  http://www.rcs.riscos.org.uk/
Csite on RiscPC with a StrongARM RISC processor and RISC OS 4.02



More information about the oslib-user mailing list