History log of /freebsd-10-stable/usr.sbin/lpr/common_source/lp.cdefs.h
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 251044 27-May-2013 gad

Change the closeallfds() routine to use closefrom() when it is
available (closefrom() was added to FreeBSD in 8.0-release).
The selection is made at compile-time, as I still compile a
FreeBSD-based version of lpr&friends on other platforms.

While testing I out that (at least on my system) lpd has been
closing 11095 fd's, when there are only 6 fd's open. The old
code took 120 times more clocktime than calling closefrom().
(although that was still less than 2/1000-ths of a second!)

Reviewed by: jilles
MFC after: 2 weeks


# 117540 14-Jul-2003 gad

Introduce a new lp.cdefs.h file, which will be used to make it
somewhat easier to build this lpr on other operating systems.
This simply includes <sys/cdefs.h> when that is appropriate,
and then checks for any cdefs-ish macros that lpr uses, and
defines them if they don't already exist. This is only a start
at making freebsd's lpr less of a hassle to port. It is mainly
added so all of lpr can be changed to use the __FBSDID() macro,
without making it *more* of a hassle to build on other OS's.

Reviewed by: discussed with bde and obrien
MFC after: 15 days