summaryrefslogtreecommitdiff
path: root/mail/ja-mh/patches/patch-bs
blob: 76057b573663f00dd7221100666004cbdba2252b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
$NetBSD: patch-bs,v 1.3 2011/12/17 12:50:57 marino Exp $

* Fix confilct with getline(3).

--- uip/pshsbr.c.orig	2001-04-02 10:50:24.000000000 +0000
+++ uip/pshsbr.c
@@ -27,17 +27,11 @@ static char ident[] = "@(#)$Id: popsbr.c
 #define	TRM	"."
 #define	TRMLEN	(sizeof TRM - 1)
 
-#ifdef __CYGWIN32__
 #include <errno.h>
-#endif
-extern int  errno;
 #if !defined(BSD44) && !defined(__GNU_LIBRARY__)
 extern int  sys_nerr;
 extern char *sys_errlist[];
 #endif
-#ifdef __NetBSD__ /* XXX */
-#include <errno.h>
-#endif
 
 static int  poprint = 0;
 static int  pophack = 0;
@@ -63,7 +57,7 @@ int	command(), multiline();
 static	int	command(), multiline();
 #endif
 
-static int	getline();
+static int	_getline();
 static putline();
 
 #ifdef NNTP
@@ -176,7 +170,7 @@ int	snoop;
 
     (void) signal (SIGPIPE, SIG_IGN);
 
-    switch (getline (response, sizeof response, input)) {
+    switch (_getline (response, sizeof response, input)) {
 	case OK: 
 	    if (poprint)
 		fprintf (stderr, "<--- %s\n", response);
@@ -619,7 +613,7 @@ char   *fmt,
     if (putline (buffer, output) == NOTOK)
 	return NOTOK;
 
-    switch (getline (response, sizeof response, input)) {
+    switch (_getline (response, sizeof response, input)) {
 	case OK: 
 	    if (poprint)
 		fprintf (stderr, "<--- %s\n", response);
@@ -645,7 +639,7 @@ static int  multiline () {
 #endif
     char    buffer[BUFSIZ + TRMLEN];
 
-    if (getline (buffer, sizeof buffer, input) != OK)
+    if (_getline (buffer, sizeof buffer, input) != OK)
 	return NOTOK;
 #ifdef	DEBUG
     if (poprint)
@@ -665,7 +659,7 @@ static int  multiline () {
 
 /*  */
 
-static int  getline (s, n, iop)
+static int  _getline (s, n, iop)
 char   *s;
 int     n;
 FILE * iop;