summaryrefslogtreecommitdiff
path: root/src/process
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-09-12 00:08:09 -0400
committerRich Felker <dalias@aerifal.cx>2018-09-12 14:34:37 -0400
commit5ce3737931bb411a8d167356d4d0287b53b0cbdc (patch)
tree726fc5dde9cc462316faa715158c38f0da72292d /src/process
parent0676c3a34c7bf12b33f8f5efb92476f4ffc7f20e (diff)
downloadmusl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.tar.gz
musl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.tar.bz2
musl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.tar.xz
musl-5ce3737931bb411a8d167356d4d0287b53b0cbdc.zip
reduce spurious inclusion of libc.h
libc.h was intended to be a header for access to global libc state and related interfaces, but ended up included all over the place because it was the way to get the weak_alias macro. most of the inclusions removed here are places where weak_alias was needed. a few were recently introduced for hidden. some go all the way back to when libc.h defined CANCELPT_BEGIN and _END, and all (wrongly implemented) cancellation points had to include it. remaining spurious users are mostly callers of the LOCK/UNLOCK macros and files that use the LFS64 macro to define the awful *64 aliases. in a few places, new inclusion of libc.h is added because several internal headers no longer implicitly include libc.h. declarations for __lockfile and __unlockfile are moved from libc.h to stdio_impl.h so that the latter does not need libc.h. putting them in libc.h made no sense at all, since the macros in stdio_impl.h are needed to use them correctly anyway.
Diffstat (limited to 'src/process')
-rw-r--r--src/process/execvp.c1
-rw-r--r--src/process/posix_spawn.c1
-rw-r--r--src/process/system.c1
-rw-r--r--src/process/waitid.c1
-rw-r--r--src/process/waitpid.c1
5 files changed, 0 insertions, 5 deletions
diff --git a/src/process/execvp.c b/src/process/execvp.c
index 2dddeddb..1fdf036f 100644
--- a/src/process/execvp.c
+++ b/src/process/execvp.c
@@ -3,7 +3,6 @@
#include <unistd.h>
#include <errno.h>
#include <limits.h>
-#include "libc.h"
extern char **__environ;
diff --git a/src/process/posix_spawn.c b/src/process/posix_spawn.c
index 2f8ef935..5aaf829d 100644
--- a/src/process/posix_spawn.c
+++ b/src/process/posix_spawn.c
@@ -8,7 +8,6 @@
#include "syscall.h"
#include "pthread_impl.h"
#include "fdop.h"
-#include "libc.h"
struct args {
int p[2];
diff --git a/src/process/system.c b/src/process/system.c
index 9135b815..5af59b80 100644
--- a/src/process/system.c
+++ b/src/process/system.c
@@ -5,7 +5,6 @@
#include <spawn.h>
#include <errno.h>
#include "pthread_impl.h"
-#include "libc.h"
extern char **__environ;
diff --git a/src/process/waitid.c b/src/process/waitid.c
index c67feac3..d688650d 100644
--- a/src/process/waitid.c
+++ b/src/process/waitid.c
@@ -1,6 +1,5 @@
#include <sys/wait.h>
#include "syscall.h"
-#include "libc.h"
int waitid(idtype_t type, id_t id, siginfo_t *info, int options)
{
diff --git a/src/process/waitpid.c b/src/process/waitpid.c
index f75e31ef..1b65bf05 100644
--- a/src/process/waitpid.c
+++ b/src/process/waitpid.c
@@ -1,6 +1,5 @@
#include <sys/wait.h>
#include "syscall.h"
-#include "libc.h"
pid_t waitpid(pid_t pid, int *status, int options)
{