1
0
forked from pool/cups-backends
cups-backends/hpnpf.patch

96 lines
2.8 KiB
Diff
Raw Normal View History

--- hpnpf/fifo.c.orig 2000-07-18 05:40:24.000000000 +0200
+++ hpnpf/fifo.c 2005-07-26 12:15:35.000000000 +0200
@@ -29,6 +29,7 @@
#endif
#include <stdio.h>
+#include <string.h>
#include "fifo.h"
extern char leftstr[]; /* hpnpf: prepend or leftover string */
--- hpnpf/hpnptyd.c.orig 1992-02-14 23:05:57.000000000 +0100
+++ hpnpf/hpnptyd.c 2005-07-26 12:17:53.000000000 +0200
@@ -81,8 +81,12 @@
/*
* Declare external variables.
*/
+#ifndef errno
extern int errno; /* system error number */
+#endif
+#ifndef LINUX
extern char *sys_errlist[]; /* array of system error messages */
+#endif
extern char *optarg; /* pointer to option argument */
extern int optind; /* index of current option */
extern int opterr; /* flag to enable error logging by getopt() */
--- hpnpf/linux_std.mak.orig 2004-02-14 21:46:29.000000000 +0100
+++ hpnpf/linux_std.mak 2005-07-26 12:15:09.000000000 +0200
@@ -1,8 +1,10 @@
-CC=cc -DSVR4 -DLINUX -DSTDARG -lnsl
+CC=cc -DSVR4 -DLINUX -DSTDARG
+LIBS=-lnsl
+
all: hpnpf hpnptyd
hpnptyd: fifo.h hpnptyd.o network.o fifo.o log.o
- cc -o hpnptyd hpnptyd.o network.o fifo.o log.o
+ ${CC} -o hpnptyd hpnptyd.o network.o fifo.o log.o ${LIBS}
hpnpf: fifo.h hpnpf.o network.o fifo.o log.o status.o
${CC} -o hpnpf hpnpf.o network.o fifo.o log.o status.o
--- hpnpf/log.c.orig 2004-02-14 21:44:10.000000000 +0100
+++ hpnpf/log.c 2005-07-26 12:16:23.000000000 +0200
@@ -27,6 +27,8 @@
#include <stdio.h>
#include <sys/time.h>
#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
#ifdef STDARG
#include <stdarg.h>
#else
--- hpnpf/network.c.orig 2000-07-24 00:38:34.000000000 +0200
+++ hpnpf/network.c 2005-07-26 12:12:55.000000000 +0200
@@ -28,6 +28,9 @@
#include <netdb.h>
#include <fcntl.h>
#include <errno.h>
+#ifdef LINUX
+#include <stdlib.h>
+#endif
/* adapt to UNIX System 5.4 1995-01-29/Bl */
#ifdef SVR4
--- hpnpf/hpnptyd.c.orig 2005-07-26 12:18:48.000000000 +0200
+++ hpnpf/hpnptyd.c 2005-07-26 12:20:39.000000000 +0200
@@ -41,6 +41,7 @@
#include <fcntl.h>
#include <errno.h>
#include <signal.h>
+#include <stdlib.h>
#if defined(BSD)
#include <sys/file.h>
#include <sys/ioctl.h>
--- hpnpf/linux_std.mak.orig 2005-07-26 12:18:48.000000000 +0200
+++ hpnpf/linux_std.mak 2005-07-26 12:23:22.000000000 +0200
@@ -1,7 +1,8 @@
CC=cc -DSVR4 -DLINUX -DSTDARG
LIBS=-lnsl
-all: hpnpf hpnptyd
+all: hpnpf
+# doesn't link: hpnptyd
hpnptyd: fifo.h hpnptyd.o network.o fifo.o log.o
${CC} -o hpnptyd hpnptyd.o network.o fifo.o log.o ${LIBS}
--- hpnpf/network.c.orig 2005-07-26 12:23:54.000000000 +0200
+++ hpnpf/network.c 2005-07-26 12:27:47.000000000 +0200
@@ -28,6 +28,7 @@
#include <netdb.h>
#include <fcntl.h>
#include <errno.h>
+#include <string.h>
#ifdef LINUX
#include <stdlib.h>
#endif