[19/19] Define NOT_IN when building outside glibc.
Commit Message
* nptl_db/structs.def [!_LIBC]: Define NOT_IN.
---
nptl_db/structs.def | 4 ++++
1 file changed, 4 insertions(+)
Comments
On 08/21/2014 03:57 AM, Siddhesh Poyarekar wrote:
> * nptl_db/structs.def [!_LIBC]: Define NOT_IN.
> ---
> nptl_db/structs.def | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/nptl_db/structs.def b/nptl_db/structs.def
> index ea8b7ac..82e7157 100644
> --- a/nptl_db/structs.def
> +++ b/nptl_db/structs.def
> @@ -16,6 +16,10 @@
> License along with the GNU C Library; if not, see
> <http://www.gnu.org/licenses/>. */
>
> +#ifndef _LIBC
> +# define NOT_IN(lib) (0)
> +#endif
I'm not especially convinced by the readability improvement of NOT_IN, and I'm
particularly confused by a NOT_IN that defaults to false.
r~
On 22 August 2014 19:20, Richard Henderson <rth@twiddle.net> wrote:
>> +#ifndef _LIBC
>> +# define NOT_IN(lib) (0)
>> +#endif
>
> I'm not especially convinced by the readability improvement of NOT_IN, and I'm
> particularly confused by a NOT_IN that defaults to false.
That's not the default definition; the default one is in
libc-symbols.h. That's a fallback definition when building outside
libc, but I'm thinking of getting rid of it because it will break
namespace tests for the headers.
Siddhesh
On Fri, Aug 22, 2014 at 07:54:24PM +0530, Siddhesh Poyarekar wrote:
> On 22 August 2014 19:20, Richard Henderson <rth@twiddle.net> wrote:
> >> +#ifndef _LIBC
> >> +# define NOT_IN(lib) (0)
> >> +#endif
> >
> > I'm not especially convinced by the readability improvement of NOT_IN, and I'm
> > particularly confused by a NOT_IN that defaults to false.
>
> That's not the default definition; the default one is in
> libc-symbols.h. That's a fallback definition when building outside
> libc, but I'm thinking of getting rid of it because it will break
> namespace tests for the headers.
Oh, and it's confusing because it's wrong. I should probably get some
sleep.
Siddhesh
@@ -16,6 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _LIBC
+# define NOT_IN(lib) (0)
+#endif
+
#ifndef DB_STRUCT_ARRAY_FIELD
# define DB_STRUCT_ARRAY_FIELD(type, field) DB_STRUCT_FIELD (type, field)
# define DB_ARRAY_VARIABLE(name) DB_VARIABLE (name)