board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / gcc / 5.4.0 / 860-cilk-wchar.patch
blob1d9916f55473062e9877d4a1be133299567f2fab
1 [PATCH] cilk: fix build without wchar
3 When building against uClibc with wchar support disabled, WCHAR_MIN and
4 WCHAR_MAX are not defined leading to compilation errors.
6 Fix it by only including the wchar code if available.
8 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
9 ---
10 libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
11 1 file changed, 8 insertions(+)
13 Index: b/libcilkrts/include/cilk/reducer_min_max.h
14 ===================================================================
15 --- a/libcilkrts/include/cilk/reducer_min_max.h
16 +++ b/libcilkrts/include/cilk/reducer_min_max.h
17 @@ -3154,7 +3154,9 @@
18 CILK_C_REDUCER_MAX_INSTANCE(char, char, CHAR_MIN)
19 CILK_C_REDUCER_MAX_INSTANCE(unsigned char, uchar, 0)
20 CILK_C_REDUCER_MAX_INSTANCE(signed char, schar, SCHAR_MIN)
21 +#ifdef WCHAR_MIN
22 CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
23 +#endif
24 CILK_C_REDUCER_MAX_INSTANCE(short, short, SHRT_MIN)
25 CILK_C_REDUCER_MAX_INSTANCE(unsigned short, ushort, 0)
26 CILK_C_REDUCER_MAX_INSTANCE(int, int, INT_MIN)
27 @@ -3306,7 +3308,9 @@
28 CILK_C_REDUCER_MAX_INDEX_INSTANCE(char, char, CHAR_MIN)
29 CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned char, uchar, 0)
30 CILK_C_REDUCER_MAX_INDEX_INSTANCE(signed char, schar, SCHAR_MIN)
31 +#ifdef WCHAR_MIN
32 CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
33 +#endif
34 CILK_C_REDUCER_MAX_INDEX_INSTANCE(short, short, SHRT_MIN)
35 CILK_C_REDUCER_MAX_INDEX_INSTANCE(unsigned short, ushort, 0)
36 CILK_C_REDUCER_MAX_INDEX_INSTANCE(int, int, INT_MIN)
37 @@ -3432,7 +3436,9 @@
38 CILK_C_REDUCER_MIN_INSTANCE(char, char, CHAR_MAX)
39 CILK_C_REDUCER_MIN_INSTANCE(unsigned char, uchar, CHAR_MAX)
40 CILK_C_REDUCER_MIN_INSTANCE(signed char, schar, SCHAR_MAX)
41 +#ifdef WCHAR_MAX
42 CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
43 +#endif
44 CILK_C_REDUCER_MIN_INSTANCE(short, short, SHRT_MAX)
45 CILK_C_REDUCER_MIN_INSTANCE(unsigned short, ushort, USHRT_MAX)
46 CILK_C_REDUCER_MIN_INSTANCE(int, int, INT_MAX)
47 @@ -3584,7 +3590,9 @@
48 CILK_C_REDUCER_MIN_INDEX_INSTANCE(char, char, CHAR_MAX)
49 CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned char, uchar, CHAR_MAX)
50 CILK_C_REDUCER_MIN_INDEX_INSTANCE(signed char, schar, SCHAR_MAX)
51 +#ifdef WCHAR_MAX
52 CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
53 +#endif
54 CILK_C_REDUCER_MIN_INDEX_INSTANCE(short, short, SHRT_MAX)
55 CILK_C_REDUCER_MIN_INDEX_INSTANCE(unsigned short, ushort, USHRT_MAX)
56 CILK_C_REDUCER_MIN_INDEX_INSTANCE(int, int, INT_MAX)