diff options
Diffstat (limited to 'print/pips800/files/extra-patch-2.6.2-common')
-rw-r--r-- | print/pips800/files/extra-patch-2.6.2-common | 215 |
1 files changed, 215 insertions, 0 deletions
diff --git a/print/pips800/files/extra-patch-2.6.2-common b/print/pips800/files/extra-patch-2.6.2-common new file mode 100644 index 000000000000..431b4982e7a3 --- /dev/null +++ b/print/pips800/files/extra-patch-2.6.2-common @@ -0,0 +1,215 @@ +Index: ekpnavi/ekpcom.c +diff -u -p ekpnavi/ekpcom.c.orig ekpnavi/ekpcom.c +--- ekpnavi/ekpcom.c.orig Wed Jul 30 23:06:39 2003 ++++ ekpnavi/ekpcom.c Tue Aug 24 23:37:45 2004 +@@ -42,15 +42,25 @@ sock_open (void) + { + int sockfd, len; + struct sockaddr_in address; ++#ifndef MSG_NOSIGNAL ++ const int on = 1; ++#endif + + if (server_sock_fd >= 0) + return 0; + + /* ソケットオープン */ + sockfd = socket (AF_INET, SOCK_STREAM, 0); ++#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE) ++ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); ++#endif ++ memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr.s_addr = htonl (INADDR_ANY); + address.sin_port = htons (35586); ++#ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++#endif + len = sizeof (address); + if (connect (sockfd, (struct sockaddr *)&address, len)) + { +@@ -92,7 +102,11 @@ sock_write (char* buf, int* lp_wsize) + packet[4] = size % 0xFF; + memcpy (packet + Header_Size, buf, size); + ++#ifndef MSG_NOSIGNAL ++ size = send (server_sock_fd, packet, size + Header_Size, 0); ++#else + size = send (server_sock_fd, packet, size + Header_Size, MSG_NOSIGNAL); ++#endif + + if (size < 0) + return -1; +@@ -116,7 +130,11 @@ sock_read (char* buf, int* lp_rsize) + if (size <= 0) + return 0; + ++#ifndef MSG_NOSIGNAL ++ dsize = recv (server_sock_fd, packet, size, 0); ++#else + dsize = recv (server_sock_fd, packet, size, MSG_NOSIGNAL); ++#endif + + if (dsize < 0) + return -1; +Index: ekpstm/ekpcom.c +diff -u -p ekpstm/ekpcom.c.orig ekpstm/ekpcom.c +--- ekpstm/ekpcom.c.orig Thu Jul 31 15:01:39 2003 ++++ ekpstm/ekpcom.c Tue Aug 24 23:37:56 2004 +@@ -42,15 +42,25 @@ sock_open (void) + { + int sockfd, len; + struct sockaddr_in address; ++#ifndef MSG_NOSIGNAL ++ const int on = 1; ++#endif + + if (server_sock_fd >= 0) + return 0; + + /* ソケットオープン */ + sockfd = socket (AF_INET, SOCK_STREAM, 0); ++#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE) ++ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); ++#endif ++ memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr.s_addr = htonl (INADDR_ANY); + address.sin_port = htons (35586); ++#ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++#endif + len = sizeof (address); + if (connect (sockfd, (struct sockaddr *)&address, len)) + { +@@ -92,7 +102,11 @@ sock_write (char* buf, int* lp_wsize) + packet[4] = size % 0xFF; + memcpy (packet + Header_Size, buf, size); + ++#ifndef MSG_NOSIGNAL ++ size = send (server_sock_fd, packet, size + Header_Size, 0); ++#else + size = send (server_sock_fd, packet, size + Header_Size, MSG_NOSIGNAL); ++#endif + + if (size < 0) + return -1; +@@ -116,7 +130,11 @@ sock_read (char* buf, int* lp_rsize) + if (size <= 0) + return 0; + ++#ifndef MSG_NOSIGNAL ++ dsize = recv (server_sock_fd, packet, size, 0); ++#else + dsize = recv (server_sock_fd, packet, size, MSG_NOSIGNAL); ++#endif + + if (dsize < 0) + return -1; +Index: ekpstm/main.c +diff -u -p ekpstm/main.c.orig ekpstm/main.c +--- ekpstm/main.c.orig Thu Jul 31 15:01:39 2003 ++++ ekpstm/main.c Tue Aug 24 19:41:40 2004 +@@ -69,6 +69,7 @@ main (int argc, char *argv[]) + break; + + default: ++ break; + } + } + +Index: src/Makefile.in +diff -u src/Makefile.in.orig src/Makefile.in +--- src/Makefile.in.orig Fri Oct 24 16:12:54 2003 ++++ src/Makefile.in Tue Aug 24 19:41:40 2004 +@@ -131,7 +131,7 @@ + # CUPS + AM_CFLAGS = -DGS_PATH=\"gs\" -DLOCALEDIR=\"$(datadir)/locale\" -DPRINTER_MODEL="\"$(MODEL_FULL)\"" -D$(MODEL_L) -DLIBPATH=\"$(libdir)/lib$(MODEL).so\" -DRSC_PATH=\"$(sysconfdir)/pipsrc\" -DSPOOL_NAME=\"$(MODEL)\" -DLOCALE_PATH=\"$(datadir)/locale\" -DNAVI_PATH=\"$(bindir)/ekpnavi\" -DDATA_PATH=\"$(pkgdatadir)\" -DRULED_PATH=\"$(pkgdatadir)/BID.PRN\" -DPATCH_PATH=\"$(pkgdatadir)/PATCH.PRN\" -DBAND_PATH=\"$(pkgdatadir)/BAND.PRN\" -DCUT_PATH=\"$(pkgdatadir)/CUT.PRN\" -D_LPR_DIRECT -fsigned-char -DCUPS_FILTER_PATH=\"$(cupsfilterdir)\" + +-INCLUDES = @GTK_CFLAGS@ ++INCLUDES = @GTK_CFLAGS@ $(INCLTDL) + + libcutils_la_SOURCES = str.c str.h err.c err.h csv.c csv.h mem.c mem.h def.h + +@@ -146,12 +146,12 @@ + rastertopips_SOURCES = rastertopips.c + + +-pipstoprinter_LDFLAGS = @LIBLTDL@ @CUPS_LIBS@ libcutils.la ++pipstoprinter_LDFLAGS = @LIBLTDL@ @CUPS_LIBS@ -lintl libcutils.la + + pipstoprinter_SOURCES = pipstoprinter.c libprtX.h debug.c debug.h ekpcom.c ekpcom.h getstat.c getstat.h + + +-ekplp_LDFLAGS = @CUPS_LIBS@ libcutils.la ++ekplp_LDFLAGS = @CUPS_LIBS@ -lintl libcutils.la + + ekplp_SOURCES = ekplp.c + +Index: src/ekpcom.c +diff -u -p src/ekpcom.c.orig src/ekpcom.c +--- src/ekpcom.c.orig Wed Jul 30 22:11:04 2003 ++++ src/ekpcom.c Tue Aug 24 23:37:59 2004 +@@ -52,15 +52,25 @@ sock_open (void) + { + int sockfd, len; + struct sockaddr_in address; ++#ifndef MSG_NOSIGNAL ++ const int on = 1; ++#endif + + if (server_sock_fd >= 0) + return 0; + + /* Socket open */ + sockfd = socket (AF_INET, SOCK_STREAM, 0); ++#if !defined(MSG_NOSIGNAL) && defined(SO_NOSIGPIPE) ++ setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof(on)); ++#endif ++ memset(&address, 0, sizeof(address)); + address.sin_family = AF_INET; + address.sin_addr.s_addr = htonl (INADDR_ANY); + address.sin_port = htons (PORT_NUMBER); ++#ifdef __FreeBSD__ ++ address.sin_len = sizeof(address); ++#endif + len = sizeof (address); + if (connect (sockfd, (struct sockaddr *)&address, len)) + { +@@ -102,7 +112,11 @@ sock_write (char* buf, int* lp_wsize) + packet[4] = size % 0xFF; + memcpy (packet + Header_Size, buf, size); + ++#ifndef MSG_NOSIGNAL ++ size = send (server_sock_fd, packet, size + Header_Size, 0); ++#else + size = send (server_sock_fd, packet, size + Header_Size, MSG_NOSIGNAL); ++#endif + + if (size < 0) + return -1; +@@ -126,7 +140,11 @@ sock_read (char* buf, int* lp_rsize) + if (size <= 0) + return 0; + ++#ifndef MSG_NOSIGNAL ++ dsize = recv (server_sock_fd, packet, size, 0); ++#else + dsize = recv (server_sock_fd, packet, size, MSG_NOSIGNAL); ++#endif + + if (dsize < 0) + return -1; +Index: src/rastertopips.c +diff -u -p src/rastertopips.c.orig src/rastertopips.c +--- src/rastertopips.c.orig Thu Sep 4 13:34:25 2003 ++++ src/rastertopips.c Tue Aug 24 19:41:41 2004 +@@ -32,6 +32,8 @@ + #include <string.h> + #include <ctype.h> + ++#define NAME_MAX 41 ++ + #define WIDTH_BYTES(bits) (((bits) + 31) / 32 * 4) + + typedef struct rtp_filter_option { |