diff mbox

[19/19] Define NOT_IN when building outside glibc.

Message ID 1408618663-2281-20-git-send-email-siddhesh@redhat.com
State Rejected
Headers show

Commit Message

Siddhesh Poyarekar Aug. 21, 2014, 10:57 a.m. UTC
* nptl_db/structs.def [!_LIBC]: Define NOT_IN.
---
 nptl_db/structs.def | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Richard Henderson Aug. 22, 2014, 1:50 p.m. UTC | #1
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~
Patchwork Bot Aug. 22, 2014, 2:24 p.m. UTC | #2
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
Siddhesh Poyarekar Aug. 22, 2014, 7:50 p.m. UTC | #3
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
diff mbox

Patch

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
+
 #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)