musl/arch/sh/bits
Rich Felker 1f0e9f9cc2 honor __WCHAR_TYPE__ on archs with legacy long definition of wchar_t
historically, a number of 32-bit archs used long rather than int for
wchar_t, for no good reason. GCC still uses the historical types, but
clang replaced them all with int, and it seems PCC uses int too.
mismatching the compiler's type for wchar_t is not an option due to
wide string literals.

note that the mismatch does not affect C++ ABI since wchar_t is its
own builtin type/keyword in C++, distinct from both int and long, not
a typedef.

i386 already worked around this by honoring __WCHAR_TYPE__ if defined
by the compiler, and only using the official legacy ABI type if not.
add the same to the other affected archs.

it might make sense at some point to switch to using int as the
default if __WCHAR_TYPE__ is not defined, if the expectations is that
new compilers will treat int as the correct choice, but it's unlikely
that the case where __WCHAR_TYPE__ is undefined will ever be used
anyway. I actually wanted to move the definition of wchar_t to the
top-level shared alltypes.h.in, using __WCHAR_TYPE__ and falling back
to int if not defined, but that can't be done without assuming all
compilers define __WCHAR_TYPE__ thanks to some pathological archs
where the ABI has wchar_t as an unsigned type.
2019-09-08 17:33:48 -04:00
..
alltypes.h.in honor __WCHAR_TYPE__ on archs with legacy long definition of wchar_t 2019-09-08 17:33:48 -04:00
endian.h
fenv.h add nofpu subarchs to the sh arch, and properly detect compiler's fpu config 2014-02-27 23:18:42 -05:00
float.h fix FLT_ROUNDS to reflect the current rounding mode 2015-03-07 12:05:28 -05:00
hwcap.h add bits/hwcap.h and include it in sys/auxv.h 2016-10-20 01:28:25 -04:00
ioctl.h move arch-invariant definitions out of bits/ioctl.h 2019-02-07 12:43:19 -05:00
ipcstat.h move IPC_STAT definition to a new bits/ipcstat.h file 2019-08-02 00:08:23 -04:00
limits.h reverse definition dependency between PAGESIZE and PAGE_SIZE 2018-03-10 17:47:14 -05:00
msg.h duplicate generic bits/msg.h for each arch using it, in prep to change 2019-07-29 18:22:33 -04:00
posix.h
ptrace.h add arm and sh bits/ptrace.h 2018-09-20 17:56:29 -04:00
sem.h duplicate generic bits/sem.h for each arch using it, in prep to change 2019-07-29 18:07:23 -04:00
setjmp.h fix sh jmp_buf size to match ABI 2015-04-27 20:03:28 -04:00
shm.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
signal.h fix MINSIGSTKSZ values for archs with large signal contexts 2015-03-18 00:31:37 -04:00
stat.h make brace placement in public header struct definitions consistent 2016-07-03 15:02:25 -04:00
stdint.h
syscall.h.in add new syscall numbers from linux v5.1 2019-07-01 14:20:58 -04:00
user.h fix clash between sys/user.h and kernel ptrace.h on powerpc[64], sh 2019-08-19 00:32:11 -04:00