unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 39d1c40e6a8e789f43ae074195a9c7c309e7881e 2371 bytes (raw)
name: gnu/packages/patches/glibc-2-26-0011.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
 
From 5e989c36934d0f0cf13b7a53ef2fa440bce39210 Mon Sep 17 00:00:00 2001
From: "Gabriel F. T. Gomes" <gftg@linux.vnet.ibm.com>
Date: Mon, 14 Aug 2017 17:51:51 -0300
Subject: [PATCH 11/90] Do not use generic selection in C++ mode

The logic to protect the use of generic selection (_Generic) does not
check for C or C++ mode, however, generic selection is a C-only
feature.

Tested for powerpc64le.

	* misc/sys/cdefs.h (__HAVE_GENERIC_SELECTION): Define to 0, if
	in C++ mode.

(cherry picked from commit 6913ad65e00bb32417ad39c41d292b976171e27e)

diff --git a/ChangeLog b/ChangeLog
index 415fa3cc79..23c00aed09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-08-18  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
+
+	* misc/sys/cdefs.h (__HAVE_GENERIC_SELECTION): Define to 0, if
+	in C++ mode.
+
 2017-08-18  Gabriel F. T. Gomes  <gftg@linux.vnet.ibm.com>
 
 	[BZ #21930]
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 06523bfe9c..0c808216a4 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -464,17 +464,18 @@
 # define __glibc_macro_warning(msg)
 #endif
 
-/* Support for generic selection (ISO C11) is available in GCC since
-   version 4.9.  Previous versions do not provide generic selection,
-   even though they might set __STDC_VERSION__ to 201112L, when in
-   -std=c11 mode.  Thus, we must check for !defined __GNUC__ when
-   testing __STDC_VERSION__ for generic selection support.
+/* Generic selection (ISO C11) is a C-only feature, available in GCC
+   since version 4.9.  Previous versions do not provide generic
+   selection, even though they might set __STDC_VERSION__ to 201112L,
+   when in -std=c11 mode.  Thus, we must check for !defined __GNUC__
+   when testing __STDC_VERSION__ for generic selection support.
    On the other hand, Clang also defines __GNUC__, so a clang-specific
    check is required to enable the use of generic selection.  */
-#if __GNUC_PREREQ (4, 9) \
-    || __glibc_clang_has_extension (c_generic_selections) \
-    || (!defined __GNUC__ && defined __STDC_VERSION__ \
-	&& __STDC_VERSION__ >= 201112L)
+#if !defined __cplusplus \
+    && (__GNUC_PREREQ (4, 9) \
+	|| __glibc_clang_has_extension (c_generic_selections) \
+	|| (!defined __GNUC__ && defined __STDC_VERSION__ \
+	    && __STDC_VERSION__ >= 201112L))
 # define __HAVE_GENERIC_SELECTION 1
 #else
 # define __HAVE_GENERIC_SELECTION 0

debug log:

solving 39d1c40e6 ...
found 39d1c40e6 in https://yhetil.org/guix-patches/87ine0pjiu.fsf@fastmail.com/ ||
	https://yhetil.org/guix-patches/87d148pe57.fsf@fastmail.com/

applying [1/1] https://yhetil.org/guix-patches/87ine0pjiu.fsf@fastmail.com/
diff --git a/gnu/packages/patches/glibc-2-26-0011.patch b/gnu/packages/patches/glibc-2-26-0011.patch
new file mode 100644
index 000000000..39d1c40e6

1:34: trailing whitespace.
 
1:35: space before tab in indent.
 	[BZ #21930]
1:43: trailing whitespace.
 
Checking patch gnu/packages/patches/glibc-2-26-0011.patch...
Applied patch gnu/packages/patches/glibc-2-26-0011.patch cleanly.
warning: 3 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/87d148pe57.fsf@fastmail.com/ for 39d1c40e6
index at:
100644 39d1c40e6a8e789f43ae074195a9c7c309e7881e	gnu/packages/patches/glibc-2-26-0011.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).