aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src/pop.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib-src/pop.c')
-rw-r--r--lib-src/pop.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/lib-src/pop.c b/lib-src/pop.c
index 426b39bd1fb..37494d17a44 100644
--- a/lib-src/pop.c
+++ b/lib-src/pop.c
@@ -1,6 +1,6 @@
1/* pop.c: client routines for talking to a POP3-protocol post-office server 1/* pop.c: client routines for talking to a POP3-protocol post-office server
2 2
3Copyright (C) 1991, 1993, 1996-1997, 1999, 2001-2011 3Copyright (C) 1991, 1993, 1996-1997, 1999, 2001-2012
4 Free Software Foundation, Inc. 4 Free Software Foundation, Inc.
5 5
6Author: Jonathan Kamens <jik@security.ov.com> 6Author: Jonathan Kamens <jik@security.ov.com>
@@ -34,15 +34,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
34#include "ntlib.h" 34#include "ntlib.h"
35#include <winsock.h> 35#include <winsock.h>
36#undef SOCKET_ERROR 36#undef SOCKET_ERROR
37#define RECV(s,buf,len,flags) recv(s,buf,len,flags) 37#define RECV(s,buf,len,flags) recv (s,buf,len,flags)
38#define SEND(s,buf,len,flags) send(s,buf,len,flags) 38#define SEND(s,buf,len,flags) send (s,buf,len,flags)
39#define CLOSESOCKET(s) closesocket(s) 39#define CLOSESOCKET(s) closesocket (s)
40#else 40#else
41#include <netinet/in.h> 41#include <netinet/in.h>
42#include <sys/socket.h> 42#include <sys/socket.h>
43#define RECV(s,buf,len,flags) read(s,buf,len) 43#define RECV(s,buf,len,flags) read (s,buf,len)
44#define SEND(s,buf,len,flags) write(s,buf,len) 44#define SEND(s,buf,len,flags) write (s,buf,len)
45#define CLOSESOCKET(s) close(s) 45#define CLOSESOCKET(s) close (s)
46#endif 46#endif
47#include <pop.h> 47#include <pop.h>
48 48
@@ -65,9 +65,7 @@ extern struct servent *hes_getservbyname (/* char *, char * */);
65#include <netdb.h> 65#include <netdb.h>
66#include <errno.h> 66#include <errno.h>
67#include <stdio.h> 67#include <stdio.h>
68#ifdef STDC_HEADERS
69#include <string.h> 68#include <string.h>
70#endif
71#include <unistd.h> 69#include <unistd.h>
72 70
73#ifdef KERBEROS 71#ifdef KERBEROS
@@ -103,7 +101,7 @@ extern char *krb_realmofhost (/* char * */);
103#endif /* KERBEROS */ 101#endif /* KERBEROS */
104 102
105#ifndef WINDOWSNT 103#ifndef WINDOWSNT
106#if !defined(HAVE_H_ERRNO) || !defined(HAVE_CONFIG_H) 104#if !defined (HAVE_H_ERRNO) || !defined (HAVE_CONFIG_H)
107extern int h_errno; 105extern int h_errno;
108#endif 106#endif
109#endif 107#endif
@@ -1069,7 +1067,7 @@ socket_connection (char *host, int flags)
1069 } 1067 }
1070 1068
1071#ifdef HAVE_GETADDRINFO 1069#ifdef HAVE_GETADDRINFO
1072 memset (&hints, 0, sizeof(hints)); 1070 memset (&hints, 0, sizeof (hints));
1073 hints.ai_socktype = SOCK_STREAM; 1071 hints.ai_socktype = SOCK_STREAM;
1074 hints.ai_flags = AI_CANONNAME; 1072 hints.ai_flags = AI_CANONNAME;
1075 hints.ai_family = AF_INET; 1073 hints.ai_family = AF_INET;
@@ -1161,7 +1159,7 @@ socket_connection (char *host, int flags)
1161 krb5_free_context (kcontext); 1159 krb5_free_context (kcontext);
1162 strcpy (pop_error, KRB_ERROR); 1160 strcpy (pop_error, KRB_ERROR);
1163 strncat (pop_error, error_message (rem), 1161 strncat (pop_error, error_message (rem),
1164 ERROR_MAX - sizeof(KRB_ERROR)); 1162 ERROR_MAX - sizeof (KRB_ERROR));
1165 CLOSESOCKET (sock); 1163 CLOSESOCKET (sock);
1166 return (-1); 1164 return (-1);
1167 } 1165 }
@@ -1214,7 +1212,7 @@ socket_connection (char *host, int flags)
1214 ERROR_MAX - strlen (pop_error) - 1); 1212 ERROR_MAX - strlen (pop_error) - 1);
1215 } 1213 }
1216#elif defined HAVE_KRB5_ERROR_E_TEXT 1214#elif defined HAVE_KRB5_ERROR_E_TEXT
1217 if (err_ret && err_ret->e_text && strlen(*err_ret->e_text)) 1215 if (err_ret && err_ret->e_text && strlen (*err_ret->e_text))
1218 { 1216 {
1219 strncat (pop_error, " [server says '", 1217 strncat (pop_error, " [server says '",
1220 ERROR_MAX - strlen (pop_error) - 1); 1218 ERROR_MAX - strlen (pop_error) - 1);