From 36a3b0416e0bed61d78e44f119cdafb1fde941ba Mon Sep 17 00:00:00 2001 From: Philip Hazel Date: Tue, 15 Mar 2005 14:09:12 +0000 Subject: [PATCH] Renamed SOCKLEN_T as EXIM_SOCKLEN_T to avoid a problem in AIX. --- doc/doc-txt/ChangeLog | 5 ++++- src/OS/os.h-OSF1 | 4 ++-- src/OS/os.h-SCO | 4 ++-- src/OS/os.h-SCO_SV | 4 ++-- src/OS/os.h-SunOS5 | 4 ++-- src/OS/os.h-Unixware7 | 4 ++-- src/src/daemon.c | 6 +++--- src/src/exim.c | 4 ++-- src/src/exim.h | 11 ++++++----- src/src/smtp_in.c | 8 ++++---- 10 files changed, 29 insertions(+), 25 deletions(-) diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index cdd74fbda..fb88fa9e1 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.90 2005/03/15 12:27:54 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.91 2005/03/15 14:09:12 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -40,6 +40,9 @@ PH/04. Change 4.11/85 fixed an obscure bug concerned with addresses that are certain circumstances this could lead to multiple deliveries to the same address. A one-line patch to add the appropriate test fixes the bug. +PH/05. Renamed the macro SOCKLEN_T as EXIM_SOCKLEN_T because AIX uses SOCKLEN_T + in its include files, and this causes problems building Exim. + A note about Exim versions 4.44 and 4.50 ---------------------------------------- diff --git a/src/OS/os.h-OSF1 b/src/OS/os.h-OSF1 index 1aa4ff95d..e7561a285 100644 --- a/src/OS/os.h-OSF1 +++ b/src/OS/os.h-OSF1 @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/OS/os.h-OSF1,v 1.1 2004/10/06 15:07:39 ph10 Exp $ */ +/* $Cambridge: exim/src/OS/os.h-OSF1,v 1.2 2005/03/15 14:09:12 ph10 Exp $ */ /* Exim: OS-specific C header file for OSF1 */ @@ -8,6 +8,6 @@ typedef struct flock flock_t; #define F_FREESP O_TRUNC -#define SOCKLEN_T size_t +#define EXIM_SOCKLEN_T size_t /* End */ diff --git a/src/OS/os.h-SCO b/src/OS/os.h-SCO index 1b7eb06e3..15b59b070 100644 --- a/src/OS/os.h-SCO +++ b/src/OS/os.h-SCO @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/OS/os.h-SCO,v 1.1 2004/10/06 15:07:39 ph10 Exp $ */ +/* $Cambridge: exim/src/OS/os.h-SCO,v 1.2 2005/03/15 14:09:12 ph10 Exp $ */ /* Exim: OS-specific C header file for SCO */ @@ -10,7 +10,7 @@ #define LOAD_AVG_SYMBOL "avenrun" #define KERNEL_PATH "/unix" #define FSCALE 256 -#define SOCKLEN_T int +#define EXIM_SOCKLEN_T int #define HAVE_SYS_STATVFS_H #define F_FAVAIL f_favail diff --git a/src/OS/os.h-SCO_SV b/src/OS/os.h-SCO_SV index 76dc4020f..7d8e2a8e2 100644 --- a/src/OS/os.h-SCO_SV +++ b/src/OS/os.h-SCO_SV @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/OS/os.h-SCO_SV,v 1.1 2004/10/06 15:07:39 ph10 Exp $ */ +/* $Cambridge: exim/src/OS/os.h-SCO_SV,v 1.2 2005/03/15 14:09:12 ph10 Exp $ */ /* Exim: OS-specific C header file for SCO_SV */ @@ -8,7 +8,7 @@ #define LOAD_AVG_SYMBOL "avenrun" #define KERNEL_PATH "/unix" #define FSCALE 256 -#define SOCKLEN_T int +#define EXIM_SOCKLEN_T int #define HAVE_SYS_STATVFS_H #define F_FAVAIL f_favail diff --git a/src/OS/os.h-SunOS5 b/src/OS/os.h-SunOS5 index d0ffd57fd..43c9eb9ae 100644 --- a/src/OS/os.h-SunOS5 +++ b/src/OS/os.h-SunOS5 @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/OS/os.h-SunOS5,v 1.1 2004/10/06 15:07:39 ph10 Exp $ */ +/* $Cambridge: exim/src/OS/os.h-SunOS5,v 1.2 2005/03/15 14:09:12 ph10 Exp $ */ /* Exim: OS-specific C header file for SunOS5 aka Solaris */ @@ -23,7 +23,7 @@ /* This is needed for some early Solaris releases, but causes trouble in the current ones, so it is out by default. */ -/* #define SOCKLEN_T size_t */ +/* #define EXIM_SOCKLEN_T size_t */ /* This is different from Linux and all other PAM implementations, it seems. */ diff --git a/src/OS/os.h-Unixware7 b/src/OS/os.h-Unixware7 index 618bac677..03ca6018f 100644 --- a/src/OS/os.h-Unixware7 +++ b/src/OS/os.h-Unixware7 @@ -1,11 +1,11 @@ -/* $Cambridge: exim/src/OS/os.h-Unixware7,v 1.1 2004/10/06 15:07:39 ph10 Exp $ */ +/* $Cambridge: exim/src/OS/os.h-Unixware7,v 1.2 2005/03/15 14:09:12 ph10 Exp $ */ /* Exim: OS-specific C header file for Unixware 7 */ #define NO_SYSEXITS #define ICONV_ARG2_TYPE char ** -#define SOCKLEN_T size_t +#define EXIM_SOCKLEN_T size_t #define LOAD_AVG_NEEDS_ROOT #define HAVE_DEV_KMEM diff --git a/src/src/daemon.c b/src/src/daemon.c index 76e970eb3..21d111023 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/daemon.c,v 1.9 2005/02/17 11:58:25 ph10 Exp $ */ +/* $Cambridge: exim/src/src/daemon.c,v 1.10 2005/03/15 14:09:12 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -142,7 +142,7 @@ handle_smtp_call(int *listen_sockets, int listen_socket_count, { pid_t pid; union sockaddr_46 interface_sockaddr; -SOCKLEN_T ifsize = sizeof(interface_sockaddr); +EXIM_SOCKLEN_T ifsize = sizeof(interface_sockaddr); int dup_accept_socket = -1; int max_for_this_host = 0; int wfsize = 0; @@ -1578,7 +1578,7 @@ for (;;) struct sockaddr_in accepted; #endif - SOCKLEN_T len = sizeof(accepted); + EXIM_SOCKLEN_T len = sizeof(accepted); pid_t pid; /* This code is placed first in the loop, so that it gets obeyed at the diff --git a/src/src/exim.c b/src/src/exim.c index 040e385f1..14cd03228 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/exim.c,v 1.15 2005/03/08 15:32:02 tom Exp $ */ +/* $Cambridge: exim/src/src/exim.c,v 1.16 2005/03/15 14:09:12 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -3450,7 +3450,7 @@ barf. */ if (smtp_input) { union sockaddr_46 inetd_sock; - SOCKLEN_T size = sizeof(inetd_sock); + EXIM_SOCKLEN_T size = sizeof(inetd_sock); if (getpeername(0, (struct sockaddr *)(&inetd_sock), &size) == 0) { int family = ((struct sockaddr *)(&inetd_sock))->sa_family; diff --git a/src/src/exim.h b/src/src/exim.h index ae22894c2..42f7980c2 100644 --- a/src/src/exim.h +++ b/src/src/exim.h @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/exim.h,v 1.8 2005/03/08 15:32:02 tom Exp $ */ +/* $Cambridge: exim/src/src/exim.h,v 1.9 2005/03/15 14:09:12 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -107,11 +107,12 @@ in sys/file.h. */ #include #endif -/* A few OS don't have socklen_t; their os.h files define SOCKLEN_T to -be size_t or whatever. */ +/* A few OS don't have socklen_t; their os.h files define EXIM_SOCKLEN_T to +be size_t or whatever. We used to use SOCKLEN_T, but then it was discovered +that this is used by the AIX include files. */ -#ifndef SOCKLEN_T -#define SOCKLEN_T socklen_t +#ifndef EXIM_SOCKLEN_T +#define EXIM_SOCKLEN_T socklen_t #endif /* Ensure that the sysexits we reference are defined */ diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 98a8d6ddf..7328280be 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/smtp_in.c,v 1.12 2005/03/08 15:32:02 tom Exp $ */ +/* $Cambridge: exim/src/src/smtp_in.c,v 1.13 2005/03/15 14:09:12 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -1262,16 +1262,16 @@ if (!sender_host_unknown) if (!host_checking && !sender_host_notsocket) { #if OPTSTYLE == 1 - SOCKLEN_T optlen = sizeof(struct ip_options) + MAX_IPOPTLEN; + EXIM_SOCKLEN_T optlen = sizeof(struct ip_options) + MAX_IPOPTLEN; struct ip_options *ipopt = store_get(optlen); #elif OPTSTYLE == 2 struct ip_opts ipoptblock; struct ip_opts *ipopt = &ipoptblock; - SOCKLEN_T optlen = sizeof(ipoptblock); + EXIM_SOCKLEN_T optlen = sizeof(ipoptblock); #else struct ipoption ipoptblock; struct ipoption *ipopt = &ipoptblock; - SOCKLEN_T optlen = sizeof(ipoptblock); + EXIM_SOCKLEN_T optlen = sizeof(ipoptblock); #endif /* Occasional genuine failures of getsockopt() have been seen - for -- 2.30.2