summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-08-02 13:22:46 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-08-02 13:22:46 +0000
commit29b5eb2caa2e7744524e53a3c114e80409c37f33 (patch)
tree3d6f40f7492de46de1508ff5ca9ebb53516ddde5
parent86b70b831eed513183b8ad9ad2dc3c46acb483f0 (diff)
downloadpw-darwin-29b5eb2caa2e7744524e53a3c114e80409c37f33.tar.gz
pw-darwin-29b5eb2caa2e7744524e53a3c114e80409c37f33.tar.zst
pw-darwin-29b5eb2caa2e7744524e53a3c114e80409c37f33.zip
Cleanup a bit includes
-rw-r--r--pw/cpdir.c7
-rw-r--r--pw/grupd.c4
-rw-r--r--pw/psdate.c5
-rw-r--r--pw/pw.c7
-rw-r--r--pw/pw.h16
-rw-r--r--pw/pw_conf.c8
-rw-r--r--pw/pw_group.c4
-rw-r--r--pw/pw_log.c2
-rw-r--r--pw/pw_nis.c1
-rw-r--r--pw/pw_user.c25
-rw-r--r--pw/pw_utils.c2
-rw-r--r--pw/pwupd.c14
12 files changed, 43 insertions, 52 deletions
diff --git a/pw/cpdir.c b/pw/cpdir.c
index e84d0f3..334f789 100644
--- a/pw/cpdir.c
+++ b/pw/cpdir.c
@@ -29,17 +29,12 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
+#include <dirent.h>
#include <err.h>
#include <errno.h>
#include <fcntl.h>
-#include <stdio.h>
#include <string.h>
-#include <stdlib.h>
#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <dirent.h>
#include "pw.h"
#include "pwupd.h"
diff --git a/pw/grupd.c b/pw/grupd.c
index d52a345..9cbe0cb 100644
--- a/pw/grupd.c
+++ b/pw/grupd.c
@@ -29,13 +29,11 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
+#include <err.h>
#include <grp.h>
#include <libutil.h>
-#include <err.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
-#include <sys/param.h>
#include "pwupd.h"
diff --git a/pw/psdate.c b/pw/psdate.c
index 8e3a951..bd2aa15 100644
--- a/pw/psdate.c
+++ b/pw/psdate.c
@@ -29,12 +29,11 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
-#include <stdio.h>
+#include <ctype.h>
+#include <err.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
#include <xlocale.h>
-#include <err.h>
#include "psdate.h"
diff --git a/pw/pw.c b/pw/pw.c
index b13db70..1f42101 100644
--- a/pw/pw.c
+++ b/pw/pw.c
@@ -32,9 +32,10 @@ static const char rcsid[] =
#include <err.h>
#include <fcntl.h>
#include <locale.h>
-#include <paths.h>
-#include <stdbool.h>
-#include <sys/wait.h>
+#include <string.h>
+#include <sysexits.h>
+#include <unistd.h>
+
#include "pw.h"
const char *Modes[] = {
diff --git a/pw/pw.h b/pw/pw.h
index e1a3949..b389f12 100644
--- a/pw/pw.h
+++ b/pw/pw.h
@@ -26,23 +26,13 @@
* $FreeBSD$
*/
+#include <sys/stat.h>
+
#define _WITH_GETLINE
+#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <inttypes.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <pwd.h>
-#include <grp.h>
-#include <sys/queue.h>
-#include <sysexits.h>
-#include "psdate.h"
#include "pwupd.h"
enum _mode
diff --git a/pw/pw_conf.c b/pw/pw_conf.c
index 41ab79b..087f48e 100644
--- a/pw/pw_conf.c
+++ b/pw/pw_conf.c
@@ -31,11 +31,11 @@ static const char rcsid[] =
#include <sys/types.h>
#include <sys/sbuf.h>
-#include <inttypes.h>
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
+
#include <err.h>
+#include <fcntl.h>
+#include <string.h>
+#include <unistd.h>
#include "pw.h"
diff --git a/pw/pw_group.c b/pw/pw_group.c
index 22e80b0..3f19e77 100644
--- a/pw/pw_group.c
+++ b/pw/pw_group.c
@@ -32,10 +32,10 @@ static const char rcsid[] =
#include <ctype.h>
#include <err.h>
#include <grp.h>
-#include <inttypes.h>
#include <libutil.h>
#include <paths.h>
-#include <stdbool.h>
+#include <string.h>
+#include <sysexits.h>
#include <termios.h>
#include <unistd.h>
diff --git a/pw/pw_log.c b/pw/pw_log.c
index b774423..29038d9 100644
--- a/pw/pw_log.c
+++ b/pw/pw_log.c
@@ -30,6 +30,8 @@ static const char rcsid[] =
#endif /* not lint */
#include <fcntl.h>
+#include <string.h>
+#include <stdarg.h>
#include "pw.h"
diff --git a/pw/pw_nis.c b/pw/pw_nis.c
index 6697835..6cc361b 100644
--- a/pw/pw_nis.c
+++ b/pw/pw_nis.c
@@ -30,6 +30,7 @@ static const char rcsid[] =
#endif /* not lint */
#include <sys/types.h>
+
#include <err.h>
#include <pwd.h>
#include <libutil.h>
diff --git a/pw/pw_user.c b/pw/pw_user.c
index 172e5ef..b54cccb 100644
--- a/pw/pw_user.c
+++ b/pw/pw_user.c
@@ -30,23 +30,28 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
+#include <sys/param.h>
+#include <sys/resource.h>
+#include <sys/time.h>
+#include <sys/types.h>
+
#include <ctype.h>
+#include <dirent.h>
#include <err.h>
#include <fcntl.h>
-#include <inttypes.h>
-#include <sys/param.h>
-#include <dirent.h>
-#include <paths.h>
-#include <termios.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#include <login_cap.h>
-#include <pwd.h>
#include <grp.h>
+#include <pwd.h>
#include <libutil.h>
+#include <login_cap.h>
+#include <paths.h>
+#include <string.h>
+#include <sysexits.h>
+#include <termios.h>
+#include <unistd.h>
+
#include "pw.h"
#include "bitmap.h"
+#include "psdate.h"
#define LOGNAMESIZE (MAXLOGNAME-1)
diff --git a/pw/pw_utils.c b/pw/pw_utils.c
index 31b79c0..1a4f812 100644
--- a/pw/pw_utils.c
+++ b/pw/pw_utils.c
@@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$");
#include <sysexits.h>
#include <limits.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#include "pw.h"
diff --git a/pw/pwupd.c b/pw/pwupd.c
index f9e1959..ee23952 100644
--- a/pw/pwupd.c
+++ b/pw/pwupd.c
@@ -29,18 +29,16 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* not lint */
+#include <sys/wait.h>
+
+#include <err.h>
+#include <errno.h>
+#include <pwd.h>
+#include <libutil.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <pwd.h>
-#include <libutil.h>
-#include <errno.h>
-#include <err.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <sys/wait.h>
#include "pwupd.h"