stdbool.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*-------------------------------------------------------------------------
  2. stdbool.h - ANSI functions forward declarations
  3. Copyright (C) 2004, Maarten Brock, sourceforge.brock@dse.nl
  4. This library is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by the
  6. Free Software Foundation; either version 2, or (at your option) any
  7. later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this library; see the file COPYING. If not, write to the
  14. Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston,
  15. MA 02110-1301, USA.
  16. As a special exception, if you link this library with other files,
  17. some of which are compiled with SDCC, to produce an executable,
  18. this library does not by itself cause the resulting executable to
  19. be covered by the GNU General Public License. This exception does
  20. not however invalidate any other reasons why the executable file
  21. might be covered by the GNU General Public License.
  22. -------------------------------------------------------------------------*/
  23. #ifndef __SDC51_STDBOOL_H
  24. #define __SDC51_STDBOOL_H 1
  25. #define true 1
  26. #define false 0
  27. #if defined (__SDCC_ds390) || defined (__SDCC_mcs51) || defined (__SDCC_xa51)
  28. /* The ports that have __bit and use it as an imperfect substitute for bool */
  29. #define _Bool __bit
  30. #define bool _Bool
  31. #define __bool_true_false_are_defined 1
  32. #define __SDCC_WEIRD_BOOL 1
  33. #else
  34. /* The ports that have bool */
  35. #define bool _Bool
  36. #define __bool_true_false_are_defined 1
  37. #endif
  38. #endif