platform_bionic/libc/include
Elliott Hughes df53b16fca Avoid multiple definitions of sigaction.
Before this change, we have the kernel's sigaction in the uapi headers,
and our own sigaction in <bits/signal_types.h> and we rely on callers
making sure to use `#define` to move the kernel type out of the way if
they include a uapi header directly. This is obviously error-prone and
undesireable, and not what we usually do now.

What we _usually_ do now is use the header scrubber's ability to replace
a struct definition with a `#include <bits/STRUCT.h>`, but that doesn't
work here because struct sigaction relies on a lot of other types,
some of which also come from uapi headers.

So instead use our second best trick, which is to "move the kernel struct
out of the way" at header scrubbing time instead. This means that someone
who does `#include <linux/signal.h>` or `#include <asm/signal.h>` won't
get `struct sigaction` (they'll only have `struct __kernel_sigaction`
instead), but it does mean that they can't get two incompatible
definitions if they include a uapi header both directly and indirectly.

So although this doesn't do what I'd set out to do, it's still an
improvement in some cases, and it's our preferred idiom in most cases
anyway. (I'll come back once this is in to tidy up the two other kernel
structs where we're still using the deprecated "rename out of the way
using #define" trick, but this change is already hairy enough, and
there's a possibility it will break code that didn't care that it was
getting the kernel `struct sigaction` rather than the userspace one.)

Bug: http://b/236042740
Test: treehugger
Change-Id: Icff50e330c09c587e8f77ba0fb7cffffd9c3b708
2023-11-28 14:20:43 -08:00
..
android s/master/main/ 2023-10-04 23:36:48 +00:00
arpa Merge "Remove the always-true __INTRODUCED_IN() annotations." 2023-06-20 20:47:49 +00:00
bits Avoid multiple definitions of sigaction. 2023-11-28 14:20:43 -08:00
net Nullability check for if module. 2023-05-11 17:15:57 +00:00
netinet Nullability check for modules in the netinet directory. 2023-04-25 20:10:14 +00:00
netpacket
sys Move ; in NDK declaration 2023-11-14 15:28:57 -08:00
.clang-format
alloca.h
ar.h
assert.h static_assert is a keyword in C23. 2023-05-24 08:48:42 -07:00
byteswap.h
complex.h <complex.h>: stop using __INTRODUCED_IN_(32|64). 2023-06-12 10:22:12 -07:00
cpio.h
ctype.h <ctype.h>: stop using _ctype_. 2023-10-09 13:53:03 -07:00
dirent.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
dlfcn.h dlfcn.h: dlclose doc ~'do not use' 2023-11-01 00:48:24 +00:00
elf.h elf.h: add SHT_RISCV_ATTRIBUTES. 2023-11-03 17:25:09 -07:00
endian.h
err.h Nullability check for error module 2023-02-24 19:44:21 +00:00
errno.h Merge "Nullability check for error module" 2023-02-24 23:08:57 +00:00
error.h Nullability check for error module 2023-02-24 19:44:21 +00:00
execinfo.h Nullability check for execinfo module 2023-01-13 02:14:10 +00:00
fcntl.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
features.h
fenv.h <fenv.h>: documentation, and __INTRODUCED_IN removal. 2023-06-06 20:32:12 +00:00
fnmatch.h
fts.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
ftw.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
getopt.h Nullability check for getopt module 2023-03-13 18:03:29 +00:00
glob.h Nullability check for glob module 2023-02-19 22:33:27 +00:00
grp.h Nullability check for grp module 2023-03-08 00:15:01 +00:00
iconv.h <iconv.h>: clarify the docs a bit more. 2023-06-14 20:55:58 +00:00
ifaddrs.h Nullability check for ifaddrs module 2023-03-01 01:36:30 +00:00
inttypes.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
langinfo.h Nullability check for langinfo module. 2023-01-03 19:52:35 +00:00
lastlog.h
libgen.h Nullability check for libgen module. 2022-12-13 00:06:09 +00:00
limits.h
link.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
locale.h Remove __INTRODUCED_IN_NO_GUARD_FOR_NDK(21). 2023-06-20 14:32:58 -07:00
malloc.h s/master/main/ 2023-10-04 23:36:48 +00:00
math.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
memory.h
mntent.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
netdb.h Nullability check for inet module. 2023-05-24 22:02:49 +00:00
nl_types.h Nullability check for nl_types module 2023-01-26 06:48:13 +00:00
paths.h
poll.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
pthread.h bionic: Set PTHREAD_STACK_MIN for page agnostic targets 2023-08-22 20:04:13 +00:00
pty.h Cleanup for #inclusivefixit. 2020-07-28 12:12:20 -07:00
pwd.h Nullability check for pwd module 2023-03-17 02:53:37 +00:00
regex.h Add BIONIC_COMPLICATED_NULLNESS as _Null_unspecified 2023-01-31 22:51:30 +00:00
resolv.h Nullability check for resolv module 2023-03-10 01:40:04 +00:00
sched.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
search.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
semaphore.h Nullability check for semaphore module 2023-04-12 18:07:11 +00:00
setjmp.h riscv64: increase jmp_buf size. 2023-08-21 20:50:14 +00:00
signal.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
spawn.h <spawn.h>: add posix_spawn_file_actions_addchdir_np()/posix_spawn_file_actions_addfchdir_np(). 2023-04-04 17:28:39 -07:00
stdatomic.h
stdint.h
stdio.h s/master/main/ 2023-10-04 23:36:48 +00:00
stdio_ext.h Nullability check for stdio_ext module 2023-02-27 23:34:25 +00:00
stdlib.h Explain why system(3)'s argument is marked _Nonnull. 2023-10-26 21:28:58 +00:00
string.h string.h: drag in <strings.h> for GNU source as well as BSD. 2023-11-14 00:40:30 +00:00
strings.h Nullability check for string module 2023-02-14 20:47:10 +00:00
syscall.h
sysexits.h
syslog.h <syslog.h>: add facilitynames[] and prioritynames[]. 2023-10-23 17:47:15 -07:00
tar.h
termio.h
termios.h <termios.h>: add two new POSIX functions. 2023-08-29 09:33:04 -07:00
threads.h Nullability check for thread module 2023-03-10 20:37:27 +00:00
time.h time.h: use "duration" rather than "request". 2023-11-01 00:34:47 +00:00
time64.h Reduce duplication in the NOTICE file. 2023-10-04 22:28:27 +00:00
uchar.h Make multibyte result constants public. 2023-08-04 19:48:35 +00:00
ucontext.h
unistd.h s/master/main/ 2023-10-04 23:36:48 +00:00
utime.h
utmp.h Add POSIX <utmpx.h>. 2023-04-03 17:20:58 -07:00
utmpx.h Add POSIX <utmpx.h>. 2023-04-03 17:20:58 -07:00
wait.h
wchar.h Make multibyte result constants public. 2023-08-04 19:48:35 +00:00
wctype.h Remove the always-true __INTRODUCED_IN() annotations. 2023-06-16 12:39:33 -07:00
xlocale.h