pthread affinity patch - v2

Corinna Vinschen vinschen@redhat.com
Fri Nov 29 15:03:00 GMT 2013


Hi Joel,

On Nov 27 14:14, Joel Sherrill wrote:
> Hi
> 
> I hope this addresses all questions and concerns. There
> has been a lot of email. :)
> 
> OK to commit?

Sorry, but...

> Index: newlib/libc/include/sys/cdefs.h
> ===================================================================
> RCS file: /cvs/src/src/newlib/libc/include/sys/cdefs.h,v
> retrieving revision 1.7
> diff -u -r1.7 cdefs.h
> --- newlib/libc/include/sys/cdefs.h	12 Sep 2013 22:05:43 -0000	1.7
> +++ newlib/libc/include/sys/cdefs.h	27 Nov 2013 19:28:00 -0000
> @@ -158,6 +158,18 @@
>  #endif /* __GNUC__ || __INTEL_COMPILER */
>  
>  /*
> + * If an application defines _GNU_SOURCE, then GNU extensions
> + * and all features are enabled.
> + */
> +#ifdef  _GNU_SOURCE
> +#define __POSIX_VISIBLE         200809
> +#define __XSI_VISIBLE           700
> +#define __BSD_VISIBLE           1
> +#define __ISO_C_VISIBLE         2011
> +#define __GNU_VISIBLE           1
> +#endif
> +
> +/*
>   * The __CONCAT macro is used to concatenate parts of symbol names, e.g.
>   * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
>   * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI

This block comes *much* too early in sys/cdefs.h.  The visibility
stuff starts at about line 586 (including the longish comments).
Just for lucidity it need to be moved down to its siblings.

Suggestion:

Index: libc/include/sys/cdefs.h
===================================================================
RCS file: /cvs/src/src/newlib/libc/include/sys/cdefs.h,v
retrieving revision 1.7
diff -u -p -r1.7 cdefs.h
--- libc/include/sys/cdefs.h	12 Sep 2013 22:05:43 -0000	1.7
+++ libc/include/sys/cdefs.h	28 Nov 2013 10:20:14 -0000
@@ -693,7 +693,13 @@
 #define	__XSI_VISIBLE		0
 #define	__BSD_VISIBLE		0
 #define	__ISO_C_VISIBLE		2011
-#else				/* Default environment: show everything. */
+#elif defined(_GNU_SOURCE)	/* Everything and the kitchen sink. */
+#define	__POSIX_VISIBLE         200809
+#define	__XSI_VISIBLE           700
+#define	__BSD_VISIBLE           1
+#define	__ISO_C_VISIBLE         2011
+#define	__GNU_VISIBLE           1
+#else				/* Default: everything except __GNU_VISIBLE. */
 #define	__POSIX_VISIBLE		200809
 #define	__XSI_VISIBLE		700
 #define	__BSD_VISIBLE		1

With this change (or similar) the patch is good to go.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20131129/9af5b910/attachment.sig>


More information about the Newlib mailing list