summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2013-11-15 20:36:58 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2013-11-16 11:27:13 +0100
commit8f39f8bf905ca84db4c853733f6a3d3a3011c237 (patch)
tree6303e6c6be4af031f05e4136f3cae48652a49a8c
parentef0b64d8d0ee7851a4d149ef8e39c133e4b788b7 (diff)
Clean up the included header files
* libihash/ihash.c: Clean up the included header files. * libshouldbeinlibc/cacheq.c: Likewise. * libshouldbeinlibc/canon-host.c: Likewise. * libshouldbeinlibc/fsysops.c: Likewise. * libshouldbeinlibc/idvec-auth.c: Likewise. * libshouldbeinlibc/idvec.c: Likewise. * libshouldbeinlibc/idvec.h: Likewise. * libshouldbeinlibc/localhost.c: Likewise. * libshouldbeinlibc/maptime.c: Likewise. * libshouldbeinlibc/nullauth.c: Likewise. * libshouldbeinlibc/portxlate.c: Likewise. * libshouldbeinlibc/shared-dom.c: Likewise. * libshouldbeinlibc/ugids-argp.c: Likewise. * libshouldbeinlibc/ugids-auth.c: Likewise. * libshouldbeinlibc/ugids-imply.c: Likewise. * libshouldbeinlibc/ugids-merge.c: Likewise. * libshouldbeinlibc/ugids-subtract.c: Likewise. * libshouldbeinlibc/ugids-verify-auth.c: Likewise. * libshouldbeinlibc/ugids-verify.c: Likewise. * libshouldbeinlibc/ugids.c: Likewise. * libshouldbeinlibc/ugids.h: Likewise. * libshouldbeinlibc/wire.c: Likewise.
-rw-r--r--libihash/ihash.c4
-rw-r--r--libshouldbeinlibc/cacheq.c2
-rw-r--r--libshouldbeinlibc/canon-host.c1
-rw-r--r--libshouldbeinlibc/fsysops.c1
-rw-r--r--libshouldbeinlibc/idvec-auth.c1
-rw-r--r--libshouldbeinlibc/idvec.c3
-rw-r--r--libshouldbeinlibc/idvec.h1
-rw-r--r--libshouldbeinlibc/localhost.c2
-rw-r--r--libshouldbeinlibc/maptime.c1
-rw-r--r--libshouldbeinlibc/nullauth.c2
-rw-r--r--libshouldbeinlibc/portxlate.c2
-rw-r--r--libshouldbeinlibc/shared-dom.c3
-rw-r--r--libshouldbeinlibc/ugids-argp.c3
-rw-r--r--libshouldbeinlibc/ugids-auth.c2
-rw-r--r--libshouldbeinlibc/ugids-imply.c3
-rw-r--r--libshouldbeinlibc/ugids-merge.c3
-rw-r--r--libshouldbeinlibc/ugids-subtract.c4
-rw-r--r--libshouldbeinlibc/ugids-verify-auth.c7
-rw-r--r--libshouldbeinlibc/ugids-verify.c7
-rw-r--r--libshouldbeinlibc/ugids.c1
-rw-r--r--libshouldbeinlibc/ugids.h2
-rw-r--r--libshouldbeinlibc/wire.c2
22 files changed, 22 insertions, 35 deletions
diff --git a/libihash/ihash.c b/libihash/ihash.c
index fe9eaedf..be1c5803 100644
--- a/libihash/ihash.c
+++ b/libihash/ihash.c
@@ -26,13 +26,11 @@
#endif
#include <errno.h>
-#include <string.h>
#include <stdlib.h>
-#include <limits.h>
#include <stdint.h>
#include <assert.h>
-#include <hurd/ihash.h>
+#include "ihash.h"
/* The prime numbers of the form 4 * i + 3 for some i, all greater
diff --git a/libshouldbeinlibc/cacheq.c b/libshouldbeinlibc/cacheq.c
index 5649903a..c1be59c0 100644
--- a/libshouldbeinlibc/cacheq.c
+++ b/libshouldbeinlibc/cacheq.c
@@ -19,7 +19,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <string.h>
-#include <malloc.h>
+#include <stdlib.h>
#include "cacheq.h"
diff --git a/libshouldbeinlibc/canon-host.c b/libshouldbeinlibc/canon-host.c
index ea6c7195..41068d30 100644
--- a/libshouldbeinlibc/canon-host.c
+++ b/libshouldbeinlibc/canon-host.c
@@ -20,7 +20,6 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <unistd.h>
#include <string.h>
#include <netdb.h>
#include <netinet/in.h>
diff --git a/libshouldbeinlibc/fsysops.c b/libshouldbeinlibc/fsysops.c
index f26069df..dbcae672 100644
--- a/libshouldbeinlibc/fsysops.c
+++ b/libshouldbeinlibc/fsysops.c
@@ -25,6 +25,7 @@
#include <mach.h>
#include <sys/mman.h>
#include <hurd/fsys.h>
+#include <string.h>
/* Make FSYS readonly or writable. */
error_t
diff --git a/libshouldbeinlibc/idvec-auth.c b/libshouldbeinlibc/idvec-auth.c
index bb7f4afd..1858bd6a 100644
--- a/libshouldbeinlibc/idvec-auth.c
+++ b/libshouldbeinlibc/idvec-auth.c
@@ -22,6 +22,7 @@
#include <mach.h>
#include <sys/mman.h>
#include <hurd/auth.h>
+#include <errno.h>
#include "idvec.h"
diff --git a/libshouldbeinlibc/idvec.c b/libshouldbeinlibc/idvec.c
index d18871f9..7fdee104 100644
--- a/libshouldbeinlibc/idvec.c
+++ b/libshouldbeinlibc/idvec.c
@@ -20,7 +20,8 @@
#include <malloc.h>
#include <string.h>
-#include <idvec.h>
+
+#include "idvec.h"
/* Return a new, empty, idvec, or NULL if there wasn't enough memory. */
struct idvec *
diff --git a/libshouldbeinlibc/idvec.h b/libshouldbeinlibc/idvec.h
index abbc273e..d6ec1553 100644
--- a/libshouldbeinlibc/idvec.h
+++ b/libshouldbeinlibc/idvec.h
@@ -22,7 +22,6 @@
#include <sys/types.h>
#include <hurd/hurd_types.h>
-#include <errno.h>
#include <string.h>
#include <features.h>
diff --git a/libshouldbeinlibc/localhost.c b/libshouldbeinlibc/localhost.c
index f0225116..9b7d4e09 100644
--- a/libshouldbeinlibc/localhost.c
+++ b/libshouldbeinlibc/localhost.c
@@ -19,9 +19,9 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <unistd.h>
-#include <malloc.h>
#include <string.h>
#include <errno.h>
+#include <stdlib.h>
/* Return the name of the localhost. This is just a wrapper for gethostname,
which takes care of allocating a big enough buffer, and caches the result
diff --git a/libshouldbeinlibc/maptime.c b/libshouldbeinlibc/maptime.c
index cacf4b6f..971e05f7 100644
--- a/libshouldbeinlibc/maptime.c
+++ b/libshouldbeinlibc/maptime.c
@@ -20,7 +20,6 @@
#include <fcntl.h>
#include <hurd.h>
-#include <mach.h>
#include <device/device.h>
#include "maptime.h"
diff --git a/libshouldbeinlibc/nullauth.c b/libshouldbeinlibc/nullauth.c
index 4ba10a76..3a98e558 100644
--- a/libshouldbeinlibc/nullauth.c
+++ b/libshouldbeinlibc/nullauth.c
@@ -19,8 +19,6 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include <error.h>
-#include <errno.h>
#include <hurd.h>
/* Obtain an empty authentication handle and use it for further
diff --git a/libshouldbeinlibc/portxlate.c b/libshouldbeinlibc/portxlate.c
index 8888e2c2..f78abbf1 100644
--- a/libshouldbeinlibc/portxlate.c
+++ b/libshouldbeinlibc/portxlate.c
@@ -17,7 +17,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <malloc.h>
+#include <stdlib.h>
#include <sys/types.h>
#include <sys/mman.h>
diff --git a/libshouldbeinlibc/shared-dom.c b/libshouldbeinlibc/shared-dom.c
index 0f8efdf8..0115fced 100644
--- a/libshouldbeinlibc/shared-dom.c
+++ b/libshouldbeinlibc/shared-dom.c
@@ -18,10 +18,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <unistd.h>
-#include <malloc.h>
#include <string.h>
-#include <errno.h>
/* Returns a pointer into HOST1 that is the part of the domain shared with
HOST2. If the two do not share anything, the return value will point to
diff --git a/libshouldbeinlibc/ugids-argp.c b/libshouldbeinlibc/ugids-argp.c
index dc076d27..43a54d70 100644
--- a/libshouldbeinlibc/ugids-argp.c
+++ b/libshouldbeinlibc/ugids-argp.c
@@ -20,12 +20,11 @@
#include <stdlib.h>
#include <string.h>
-#include <hurd.h>
#include <ctype.h>
-#include <unistd.h>
#include <argp.h>
#include <pwd.h>
#include <grp.h>
+#include <errno.h>
#include "ugids.h"
diff --git a/libshouldbeinlibc/ugids-auth.c b/libshouldbeinlibc/ugids-auth.c
index d7ec9daa..0e4f84dc 100644
--- a/libshouldbeinlibc/ugids-auth.c
+++ b/libshouldbeinlibc/ugids-auth.c
@@ -18,9 +18,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <stdlib.h>
#include <hurd.h>
+#include "idvec.h"
#include "ugids.h"
/* Make an auth port from UGIDS and return it in AUTH, using authority in
diff --git a/libshouldbeinlibc/ugids-imply.c b/libshouldbeinlibc/ugids-imply.c
index 9c2a8a2c..272ba664 100644
--- a/libshouldbeinlibc/ugids-imply.c
+++ b/libshouldbeinlibc/ugids-imply.c
@@ -18,8 +18,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <stdlib.h>
+#include <errno.h>
+#include "idvec.h"
#include "ugids.h"
/* Mark as implied all gids in UGIDS that can be implied from its uids. */
diff --git a/libshouldbeinlibc/ugids-merge.c b/libshouldbeinlibc/ugids-merge.c
index 924e1ed9..f97da07c 100644
--- a/libshouldbeinlibc/ugids-merge.c
+++ b/libshouldbeinlibc/ugids-merge.c
@@ -18,8 +18,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <stdlib.h>
+#include <errno.h>
+#include "idvec.h"
#include "ugids.h"
static error_t
diff --git a/libshouldbeinlibc/ugids-subtract.c b/libshouldbeinlibc/ugids-subtract.c
index eecba20e..b56e397b 100644
--- a/libshouldbeinlibc/ugids-subtract.c
+++ b/libshouldbeinlibc/ugids-subtract.c
@@ -18,9 +18,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <stdlib.h>
-#include <stdio.h>
+#include <errno.h>
+#include "idvec.h"
#include "ugids.h"
/* Remove the gids in SUB from those in GIDS, except where they are implied
diff --git a/libshouldbeinlibc/ugids-verify-auth.c b/libshouldbeinlibc/ugids-verify-auth.c
index 28e3bdab..0e85b1b6 100644
--- a/libshouldbeinlibc/ugids-verify-auth.c
+++ b/libshouldbeinlibc/ugids-verify-auth.c
@@ -19,17 +19,12 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
#include <stdlib.h>
-#include <string.h>
#include <hurd.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <argp.h>
-#include <pwd.h>
-#include <grp.h>
#include <hurd/paths.h>
#include <hurd/password.h>
+#include "idvec.h"
#include "ugids.h"
/* Accumulated information from authentication various passwords. */
diff --git a/libshouldbeinlibc/ugids-verify.c b/libshouldbeinlibc/ugids-verify.c
index f9d45c63..5686bdf8 100644
--- a/libshouldbeinlibc/ugids-verify.c
+++ b/libshouldbeinlibc/ugids-verify.c
@@ -18,15 +18,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-#include <stdlib.h>
-#include <string.h>
#include <hurd.h>
-#include <ctype.h>
-#include <unistd.h>
#include <argp.h>
-#include <pwd.h>
-#include <grp.h>
+#include "idvec.h"
#include "ugids.h"
/* Verify that we have the right to the ids in UGIDS, given that we already
diff --git a/libshouldbeinlibc/ugids.c b/libshouldbeinlibc/ugids.c
index 2b9b6b71..db1ce3c8 100644
--- a/libshouldbeinlibc/ugids.c
+++ b/libshouldbeinlibc/ugids.c
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include <string.h>
+#include "idvec.h"
#include "ugids.h"
/* Return a new ugids structure, or 0 if an allocation error occurs. */
diff --git a/libshouldbeinlibc/ugids.h b/libshouldbeinlibc/ugids.h
index 10e7a242..5d0e1134 100644
--- a/libshouldbeinlibc/ugids.h
+++ b/libshouldbeinlibc/ugids.h
@@ -24,6 +24,8 @@
#include <stdlib.h> /* For inline function stuff. */
#include <idvec.h>
#include <features.h>
+#include <errno.h>
+#include <sys/types.h>
#ifdef UGIDS_DEFINE_EI
#define UGIDS_EI
diff --git a/libshouldbeinlibc/wire.c b/libshouldbeinlibc/wire.c
index bafc9599..b9540955 100644
--- a/libshouldbeinlibc/wire.c
+++ b/libshouldbeinlibc/wire.c
@@ -21,9 +21,9 @@
#include <link.h>
#include <dlfcn.h>
-#include <mach.h>
#include <hurd.h>
#include <error.h>
+#include <elf.h>
#pragma weak _DYNAMIC
#pragma weak dlopen