On Sat, Jun 6, 2009 at 4:28 PM, Lennart Poettering<[email protected]> wrote: > On Sat, 06.06.09 16:05, Felipe Contreras ([email protected]) wrote: > >> > Internally we actually use a definition like you suggested, but we >> > don't want to push that into the ABI and hence trigger breakage >> > there. Our definition is like this: >> > >> > #ifdef HAVE_STD_BOOL >> > typedef _Bool pa_bool_t; >> > #else >> > typedef int pa_bool_t; >> > #endif >> >> You said pa_bool_t is only internal, so it's safe to do: >> >> #if HAVE_STDBOOL_H >> #include <stdbool.h> >> #else >> typedef int bool >> #endif >> >> And s/pa_bool_t/bool/ >> >> If you have C99, pa_bool_t = _Bool, bool = _Bool >> If you don't: pa_bool_t = int, bool = int > > The big issue is that you would change the ABI depending on the > compiler used. That sucks.
Yeah, but according to what you pasted you are already doing that; sometimes pa_bool_t is _Bool, and sometimes it's int, right? -- Felipe Contreras _______________________________________________ pulseaudio-discuss mailing list [email protected] https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss
