summaryrefslogtreecommitdiff
path: root/print/lprps/files/patch-lprps.c
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2013-04-27 16:00:26 +0000
committerHiroki Sato <hrs@FreeBSD.org>2013-04-27 16:00:26 +0000
commit03156fbc9e57b8833d571c09fe86a65de05d8966 (patch)
treea41583195bf11eaddcc25d81461b4a49df2cefca /print/lprps/files/patch-lprps.c
parent- rename patch, since it's now applied uncoditionally and remove EXTRA_PATCHE... (diff)
Add libpaper support to print/a2ps-*[1], print/c2ps-*, print/lprps-*,
graphics/jpeg2ps-*, and merge the papersize-suffixed versions into single ones respectively as print/psutils did. Approved by: dinoex (maintainer) [1]
Diffstat (limited to 'print/lprps/files/patch-lprps.c')
-rw-r--r--print/lprps/files/patch-lprps.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/print/lprps/files/patch-lprps.c b/print/lprps/files/patch-lprps.c
new file mode 100644
index 000000000000..08f4e761355f
--- /dev/null
+++ b/print/lprps/files/patch-lprps.c
@@ -0,0 +1,60 @@
+--- lprps.c.orig 1993-02-22 21:46:10.000000000 +0900
++++ lprps.c 2013-04-27 23:00:32.000000000 +0900
+@@ -5,7 +5,9 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ctype.h>
++#include <string.h>
+ #include <strings.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+@@ -15,8 +17,13 @@
+ #include <sys/time.h>
+ #include <signal.h>
+ #include <syslog.h>
++#include <unistd.h>
+ #include <errno.h>
+
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
++#include <sys/param.h>
++#endif
++
+ #ifndef errno
+ extern int errno;
+ #endif
+@@ -27,7 +34,13 @@
+ #define VOLATILE /* as nothing */
+ #endif
+
+-#define SENDMAIL "/usr/lib/sendmail"
++#ifndef SENDMAIL
++# if (defined(BSD) && (BSD >= 199103))
++# define SENDMAIL "/usr/sbin/sendmail"
++# else
++# define SENDMAIL "/usr/lib/sendmail"
++# endif
++#endif
+
+ #define EXIT_SUCCESS 0
+ #define EXIT_REPRINT 1
+@@ -43,8 +56,6 @@
+ char ctrl_d = '\004';
+ char ctrl_t = '\024';
+
+-char *malloc();
+-
+ /* user's login name */
+ char *login = 0;
+ /* user's host */
+@@ -346,7 +357,9 @@
+ char *strsignal(n)
+ int n;
+ {
++# if !(defined(BSD) && (BSD >= 199103))
+ extern char *sys_siglist[];
++# endif
+ static char buf[32];
+ if (n >= 0 && n < NSIG)
+ return sys_siglist[n];