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>
10 libcilkrts/include/cilk/reducer_min_max.h | 8 ++++++++
11 1 file changed, 8 insertions(+)
13 Index: host-gcc-final-4.9.2/libcilkrts/include/cilk/reducer_min_max.h
14 ===================================================================
15 --- host-gcc-final-4.9.2.orig/libcilkrts/include/cilk/reducer_min_max.h
16 +++ host-gcc-final-4.9.2/libcilkrts/include/cilk/reducer_min_max.h
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)
22 CILK_C_REDUCER_MAX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
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)
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)
32 CILK_C_REDUCER_MAX_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MIN)
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)
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)
42 CILK_C_REDUCER_MIN_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
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)
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)
52 CILK_C_REDUCER_MIN_INDEX_INSTANCE(wchar_t, wchar_t, WCHAR_MAX)
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)