[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: stdlib tweak
From: |
Jim Meyering |
Subject: |
Re: stdlib tweak |
Date: |
Tue, 22 Dec 2009 22:04:34 +0100 |
Eric Blake wrote:
> Jim Meyering <jim <at> meyering.net> writes:
>
>> > +static int (*check) (char const *, int, char const *) = symlinkat;
>> > +
>> > in order to validate that a function is correctly declared when the user
>> > includes just the one header named in the standards. We can then fix the
>> > fallout by making the *.in.h headers pull in the necessary pre-requisites
> for
>> > functions that declared in the wrong system header. Any objections?
>>
>> Good idea.
>>
>> You might want to use a name less likely than "check"
>> to impinge on the name space of the test program.
>
> I went with signature_check. Here's the patch:
>
> From: Eric Blake <address@hidden>
> Date: Tue, 22 Dec 2009 10:57:14 -0700
> Subject: [PATCH] tests: add signature checks
>
> These tests will help catch problems similar to the one recently
> fixed for cygwin declaring getsubopt in the wrong header.
...
> +int (*signature_check) (void (*) (void)) = atexit;
> +
...
> diff --git a/tests/test-btowc.c b/tests/test-btowc.c
...
> +wint_t (*signature_check) (int) = btowc;
I haven't looked carefully at each or tested, but...
please use the "static" attribute on all of those,
as in your example above.
- stdlib tweak, Eric Blake, 2009/12/21
- Re: stdlib tweak, Eric Blake, 2009/12/21
- Re: stdlib tweak, Eric Blake, 2009/12/21
- Re: stdlib tweak, Jim Meyering, 2009/12/22
- Re: stdlib tweak, Eric Blake, 2009/12/22
- Re: stdlib tweak,
Jim Meyering <=
- Re: stdlib tweak, Eric Blake, 2009/12/22
- Re: stdlib tweak, Jim Meyering, 2009/12/23
- Re: stdlib tweak, Bruno Haible, 2009/12/23
- Re: stdlib tweak, Eric Blake, 2009/12/23
- Re: ASSERT and _GL_UNUSED macros, Bruno Haible, 2009/12/23
- Re: ASSERT and _GL_UNUSED macros, Eric Blake, 2009/12/23
- Re: ASSERT macro, Bruno Haible, 2009/12/23
- Re: _GL_UNUSED macro, Bruno Haible, 2009/12/23
- new module 'unused-parameter', Bruno Haible, 2009/12/24
- Re: new module 'unused-parameter', Bruno Haible, 2009/12/25