diff options
author | Karl Williamson <khw@cpan.org> | 2022-02-01 19:50:45 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-02-06 12:16:54 -0700 |
commit | b1c011dc3a1fd4662a219a9591314d12964a5d1b (patch) | |
tree | 30c8170a6e2352e011c75a3284db36e3732c0bc0 /handy.h | |
parent | 18cbf839872f70dd53e87fcb7f8a3be570a69669 (diff) | |
download | perl-b1c011dc3a1fd4662a219a9591314d12964a5d1b.tar.gz |
Remove PERL_BOOL_AS_CHAR uses; always define HAS_BOOL
Now that C99 is required, bool is always defined, so HAS_BOOL should
also always be defined.
PERL_BOOL_AS_CHAR was used to workaround problems when no bool type
existed, so it is obsolete, and in fact perl won't compile if
PERL_BOOL_AS_CHAR is #defined. So remove it completely from being
looked at.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 29 |
1 files changed, 2 insertions, 27 deletions
@@ -106,36 +106,11 @@ already-built-in ones return pointers to what their names indicate. #define MUTABLE_IO(p) ((IO *)MUTABLE_PTR(p)) #define MUTABLE_SV(p) ((SV *)MUTABLE_PTR(p)) -#if defined(I_STDBOOL) && !defined(PERL_BOOL_AS_CHAR) +#ifndef __cplusplus # include <stdbool.h> -# ifndef HAS_BOOL -# define HAS_BOOL 1 -# endif -#endif - -/* bool is built-in for g++-2.6.3 and later, which might be used - for extensions. <_G_config.h> defines _G_HAVE_BOOL, but we can't - be sure _G_config.h will be included before this file. _G_config.h - also defines _G_HAVE_BOOL for both gcc and g++, but only g++ - actually has bool. Hence, _G_HAVE_BOOL is pretty useless for us. - g++ can be identified by __GNUG__. - Andy Dougherty February 2000 -*/ -#ifdef __GNUG__ /* GNU g++ has bool built-in */ -# ifndef PERL_BOOL_AS_CHAR -# ifndef HAS_BOOL -# define HAS_BOOL 1 -# endif -# endif #endif -#ifndef HAS_BOOL -# ifdef bool -# undef bool -# endif -# define bool char -# define HAS_BOOL 1 -#endif +#define HAS_BOOL 1 /* =for apidoc_section $casting |