libcdio-devel
[Top][All Lists]
Advanced

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

Re: [Libcdio-devel] [RFC] New API iso9660_statv2_t as API/ABI compatible


From: Rocky Bernstein
Subject: Re: [Libcdio-devel] [RFC] New API iso9660_statv2_t as API/ABI compatible way to read files >= 4 GiB
Date: Thu, 12 Jul 2018 12:34:42 -0400

On Thu, Jul 12, 2018 at 12:25 PM, Thomas Schmitt <address@hidden> wrote:

> Hi,
>
> the decisive trigger for the include problem with iso9660_private.h
> is that <stdbool.h> is included after <cdio/iso9660.h>.
>
> This gesture in iso9660_private.h reproduces the problem:
>
>   #include <cdio/iso9660.h>
>
>   #ifdef HAVE_STDBOOL_H
>   # include <stdbool.h>
>   #endif
>
> and this does not:
>
>   #include <cdio/iso9660.h>
>
> and this does not either:
>
>   #ifdef HAVE_STDBOOL_H
>   # include <stdbool.h>
>   #endif
>
>   #include <cdio/iso9660.h>
>
> So at least we got it under control. (And the #ifdef around
> <cdio/iso9660.h>
> is not necessary.)
>
> But why is <stdbool.h> after <cdio/iso9660.h> so poisonous ?
>


The declaration of functions that have bool parameters will mismatch. The
bool declaration in the public headers will use the one from cdio/types.h
while
the implementation will use the definition from stdbool.h.

The definition of bool in types.h comes from an era decades ago when
stdbool.h wasn't so std or rather didn't exist.

In this day and age though, I think we should just drop the bool definition
in types.h. That will probably break the ABI, but I think I'm okay with
that.


>
> Have a nice day :)
>
> Thomas
>
>
>


reply via email to

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