aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-11-04 17:00:46 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-11-04 17:00:46 +0000
commit45cc66a611304748f4f2e2d38d8eb00527c93d3e (patch)
tree456b9c0bf641077756418d31269a88609911ce49 /socket.c
parent3153b1bcc67a1d910a200170a3e669a377da95ee (diff)
downloadfetchmail-45cc66a611304748f4f2e2d38d8eb00527c93d3e.tar.gz
fetchmail-45cc66a611304748f4f2e2d38d8eb00527c93d3e.tar.bz2
fetchmail-45cc66a611304748f4f2e2d38d8eb00527c93d3e.zip
Eliminated socket.h.
svn path=/trunk/; revision=480
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/socket.c b/socket.c
index 974fd70e..08f660ad 100644
--- a/socket.c
+++ b/socket.c
@@ -17,12 +17,14 @@
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
-#if defined(HAVE_STDARG_H)
-#include <stdarg.h>
+
+#ifndef INADDR_NONE
+#ifdef INADDR_BROADCAST
+#define INADDR_NONE INADDR_BROADCAST
#else
-#include <varargs.h>
+#define INADDR_NONE -1
+#endif
#endif
-#include "socket.h"
#define INTERNAL_BUFSIZE 2048
@@ -66,24 +68,4 @@ int clientPort;
return sockfp;
}
-int SockGets(buf, len, sockfp)
-char *buf;
-int len;
-FILE *sockfp;
-{
- if (fgets(buf, len, sockfp) == (char *)NULL)
- return(-1);
- else
- {
- char *sp, *tp;
-
- for (tp = sp = buf; *sp; sp++)
- if (*sp != '\r' && *sp != '\n')
- *tp++ = *sp;
- *tp++ = '\0';
-
- return(strlen(buf));
- }
-}
-
/* socket.c ends here */