summaryrefslogtreecommitdiffstats
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2018-04-26 12:42:50 +0000
committerguenther <guenther@openbsd.org>2018-04-26 12:42:50 +0000
commitf414793931f0f39a413874f9e342e33d9fd35eac (patch)
tree2f4a2abfbaa234b7cf3ecdbab222b87a5d01ccb9 /usr.sbin/lpr
parentDo not try getnetbyname(3) if gethostbyname(3) returns no result. (diff)
downloadwireguard-openbsd-f414793931f0f39a413874f9e342e33d9fd35eac.tar.xz
wireguard-openbsd-f414793931f0f39a413874f9e342e33d9fd35eac.zip
Use <fcntl.h> instead of <sys/file.h> for open() and friends.
Delete a bunch of unnecessary #includes and sort to match style(9) while doing the above cleanup. ok deraadt@ krw@
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/common_source/displayq.c3
-rw-r--r--usr.sbin/lpr/lpc/cmds.c3
-rw-r--r--usr.sbin/lpr/lpd/lpd.c6
-rw-r--r--usr.sbin/lpr/lpd/printjob.c5
-rw-r--r--usr.sbin/lpr/lpr/lpr.c3
5 files changed, 8 insertions, 12 deletions
diff --git a/usr.sbin/lpr/common_source/displayq.c b/usr.sbin/lpr/common_source/displayq.c
index 415cd581865..4eb544202d3 100644
--- a/usr.sbin/lpr/common_source/displayq.c
+++ b/usr.sbin/lpr/common_source/displayq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: displayq.c,v 1.39 2016/03/17 05:27:10 bentley Exp $ */
+/* $OpenBSD: displayq.c,v 1.40 2018/04/26 12:42:51 guenther Exp $ */
/* $NetBSD: displayq.c,v 1.21 2001/08/30 00:51:50 itojun Exp $ */
/*
@@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
-#include <sys/file.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c
index d27788c9429..149904f7960 100644
--- a/usr.sbin/lpr/lpc/cmds.c
+++ b/usr.sbin/lpr/lpc/cmds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmds.c,v 1.27 2015/01/16 06:40:18 deraadt Exp $ */
+/* $OpenBSD: cmds.c,v 1.28 2018/04/26 12:42:51 guenther Exp $ */
/* $NetBSD: cmds.c,v 1.12 1997/10/05 15:12:06 mrg Exp $ */
/*
@@ -37,7 +37,6 @@
#include <sys/time.h>
#include <sys/stat.h>
-#include <sys/file.h>
#include <signal.h>
#include <fcntl.h>
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c
index bd4f48c1485..e0d9196cfbb 100644
--- a/usr.sbin/lpr/lpd/lpd.c
+++ b/usr.sbin/lpr/lpd/lpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpd.c,v 1.64 2016/02/29 17:26:01 jca Exp $ */
+/* $OpenBSD: lpd.c,v 1.65 2018/04/26 12:42:51 guenther Exp $ */
/* $NetBSD: lpd.c,v 1.33 2002/01/21 14:42:29 wiz Exp $ */
/*
@@ -63,12 +63,12 @@
* Users can't touch the spool w/o the help of one of the lp* programs.
*/
-#include <sys/wait.h>
#include <sys/types.h>
+#include <sys/wait.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/stat.h>
-#include <sys/file.h>
+
#include <netinet/in.h>
#include <arpa/inet.h>
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c
index 280e1850aa9..ff9428359f1 100644
--- a/usr.sbin/lpr/lpd/printjob.c
+++ b/usr.sbin/lpr/lpd/printjob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printjob.c,v 1.59 2017/09/20 05:08:11 guenther Exp $ */
+/* $OpenBSD: printjob.c,v 1.60 2018/04/26 12:42:51 guenther Exp $ */
/* $NetBSD: printjob.c,v 1.31 2002/01/21 14:42:30 wiz Exp $ */
/*
@@ -38,10 +38,9 @@
* it does not need to be removed because file locks are dynamic.
*/
+#include <sys/types.h>
#include <sys/wait.h>
#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/file.h>
#include <pwd.h>
#include <unistd.h>
diff --git a/usr.sbin/lpr/lpr/lpr.c b/usr.sbin/lpr/lpr/lpr.c
index 1bb9eb2f95a..9f95109b38f 100644
--- a/usr.sbin/lpr/lpr/lpr.c
+++ b/usr.sbin/lpr/lpr/lpr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lpr.c,v 1.48 2015/02/09 23:00:14 deraadt Exp $ */
+/* $OpenBSD: lpr.c,v 1.49 2018/04/26 12:42:51 guenther Exp $ */
/* $NetBSD: lpr.c,v 1.19 2000/10/11 20:23:52 is Exp $ */
/*
@@ -44,7 +44,6 @@
*/
#include <sys/stat.h>
-#include <sys/file.h>
#include <dirent.h>
#include <errno.h>