bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] stdbool.h: support for BeOS


From: Bruno Haible
Subject: [Bug-gnulib] stdbool.h: support for BeOS
Date: Mon, 27 Oct 2003 14:59:00 +0100
User-agent: KMail/1.5

Hi,

Currently, using

  #include <stdbool.h>
  #include <sys/socket.h>

leads to a compilation error on BeOS, because some auxiliary file included
by <sys/socket.h> defines the type 'bool' but not '_Bool'.

I've committed this fix, that works by forcing the inclusion of that
auxiliary file (via <OS.h>) and reusing its 'bool' type.

Bruno


2003-10-27  Bruno Haible  <address@hidden>

        * stdbool_.h: Better support for BeOS.

*** stdbool_.h  11 Aug 2003 12:34:07 -0000      1.4
--- stdbool_.h  27 Oct 2003 13:57:05 -0000
***************
*** 56,61 ****
--- 56,62 ----
  /* BeOS <sys/socket.h> already #defines false 0, true 1.  We use the same
     definitions below, but temporarily we have to #undef them.  */
  #ifdef __BEOS__
+ # include <OS.h> /* defines bool but not _Bool */
  # undef false
  # undef true
  #endif
***************
*** 69,75 ****
     (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
     (see ISO C 99 6.3.1.1.(2)).  So we add a negative value to the
     enum; this ensures that '_Bool' promotes to 'int'.  */
! #ifndef __cplusplus
  # if address@hidden@
  #  if defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1)
      /* Avoid stupid "warning: _Bool is a keyword in ISO C99".  */
--- 70,76 ----
     (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
     (see ISO C 99 6.3.1.1.(2)).  So we add a negative value to the
     enum; this ensures that '_Bool' promotes to 'int'.  */
! #if !(defined __cplusplus || defined __BEOS__)
  # if address@hidden@
  #  if defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1)
      /* Avoid stupid "warning: _Bool is a keyword in ISO C99".  */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]