From 9c19b270ead379003ece51fb49b83e7ea8b2d25e Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 26 Apr 2015 18:31:14 +0100 Subject: Invert default for iconv() 2nd arg type, to match SUSv3. Bug 1161 Probably most of the lesser-used builds are already broken; this won't fix them --- src/OS/os.h-AIX | 4 ++++ src/OS/os.h-BSDI | 3 +++ src/OS/os.h-DGUX | 3 +++ src/OS/os.h-Darwin | 3 +++ src/OS/os.h-DragonFly | 3 +++ src/OS/os.h-FreeBSD | 3 +++ src/OS/os.h-GNU | 3 +++ src/OS/os.h-GNUkFreeBSD | 3 +++ src/OS/os.h-GNUkNetBSD | 3 +++ src/OS/os.h-HI-OSF | 3 +++ src/OS/os.h-HI-UX | 3 +++ src/OS/os.h-HP-UX | 1 - src/OS/os.h-HP-UX-9 | 3 +++ src/OS/os.h-IRIX | 3 --- src/OS/os.h-IRIX6 | 3 --- src/OS/os.h-IRIX632 | 3 --- src/OS/os.h-IRIX65 | 3 --- src/OS/os.h-Linux | 3 --- src/OS/os.h-NetBSD | 3 +++ src/OS/os.h-OSF1 | 3 --- src/OS/os.h-OpenBSD | 3 +++ src/OS/os.h-OpenUNIX | 3 +++ src/OS/os.h-QNX | 3 +++ src/OS/os.h-SCO | 3 +++ src/OS/os.h-SCO_SV | 3 +++ src/OS/os.h-SunOS4 | 3 +++ src/OS/os.h-SunOS5 | 3 +++ src/OS/os.h-SunOS5-hal | 3 +++ src/OS/os.h-ULTRIX | 3 +++ src/OS/os.h-UNIX_SV | 3 +++ src/OS/os.h-USG | 3 +++ src/OS/os.h-Unixware7 | 1 - src/OS/os.h-cygwin | 3 +++ src/OS/os.h-mips | 3 +++ src/src/exim.h | 2 +- 35 files changed, 80 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/OS/os.h-AIX b/src/OS/os.h-AIX index f3a84f2e3..5cd4501a4 100644 --- a/src/OS/os.h-AIX +++ b/src/OS/os.h-AIX @@ -20,4 +20,8 @@ typedef struct flock flock_t; +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + + /* End */ diff --git a/src/OS/os.h-BSDI b/src/OS/os.h-BSDI index cd91936de..6e16722fd 100644 --- a/src/OS/os.h-BSDI +++ b/src/OS/os.h-BSDI @@ -8,4 +8,7 @@ typedef struct flock flock_t; +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-DGUX b/src/OS/os.h-DGUX index 838ddd991..9040f0e72 100644 --- a/src/OS/os.h-DGUX +++ b/src/OS/os.h-DGUX @@ -22,4 +22,7 @@ forego the detection of some source-routing based IP attacks. */ #define NO_IP_OPTIONS +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-Darwin b/src/OS/os.h-Darwin index 559003f53..f4087404e 100644 --- a/src/OS/os.h-Darwin +++ b/src/OS/os.h-Darwin @@ -42,4 +42,7 @@ updating Exim to use the newer interface. */ #define OFF_T_FMT "%lld" #define LONGLONG_T long int +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-DragonFly b/src/OS/os.h-DragonFly index 669bb2327..4c2f1d508 100644 --- a/src/OS/os.h-DragonFly +++ b/src/OS/os.h-DragonFly @@ -7,4 +7,7 @@ typedef struct flock flock_t; +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-FreeBSD b/src/OS/os.h-FreeBSD index c5ed04275..ba4889fec 100644 --- a/src/OS/os.h-FreeBSD +++ b/src/OS/os.h-FreeBSD @@ -10,4 +10,7 @@ typedef struct flock flock_t; +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-GNU b/src/OS/os.h-GNU index cc4da0e3b..44993163d 100644 --- a/src/OS/os.h-GNU +++ b/src/OS/os.h-GNU @@ -17,4 +17,7 @@ typedef struct flock flock_t; /* Hurd-specific bits below */ +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-GNUkFreeBSD b/src/OS/os.h-GNUkFreeBSD index e60690f71..ab3503131 100644 --- a/src/OS/os.h-GNUkFreeBSD +++ b/src/OS/os.h-GNUkFreeBSD @@ -19,4 +19,7 @@ typedef struct flock flock_t; #define HAVE_SYS_MOUNT_H #define SIOCGIFCONF_GIVES_ADDR +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-GNUkNetBSD b/src/OS/os.h-GNUkNetBSD index 121f2d3b3..bc3bc259d 100644 --- a/src/OS/os.h-GNUkNetBSD +++ b/src/OS/os.h-GNUkNetBSD @@ -19,4 +19,7 @@ typedef struct flock flock_t; #define HAVE_SYS_MOUNT_H #define SIOCGIFCONF_GIVES_ADDR +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-HI-OSF b/src/OS/os.h-HI-OSF index 76bd4295d..0f50fb660 100644 --- a/src/OS/os.h-HI-OSF +++ b/src/OS/os.h-HI-OSF @@ -6,4 +6,7 @@ typedef struct flock flock_t; #define F_FREESP O_TRUNC #define DN_EXPAND_ARG4_TYPE u_char * +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-HI-UX b/src/OS/os.h-HI-UX index 97b83edf1..f3df9638c 100644 --- a/src/OS/os.h-HI-UX +++ b/src/OS/os.h-HI-UX @@ -15,4 +15,7 @@ typedef struct flock flock_t; +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-HP-UX b/src/OS/os.h-HP-UX index 87e4dfc97..3359204bd 100644 --- a/src/OS/os.h-HP-UX +++ b/src/OS/os.h-HP-UX @@ -1,6 +1,5 @@ /* Exim: OS-specific C header file for HP-UX versions greater than 9 */ -#define ICONV_ARG2_TYPE char ** #define EXIM_SOCKLEN_T size_t #define LOAD_AVG_NEEDS_ROOT diff --git a/src/OS/os.h-HP-UX-9 b/src/OS/os.h-HP-UX-9 index dab965e3b..5a260d607 100644 --- a/src/OS/os.h-HP-UX-9 +++ b/src/OS/os.h-HP-UX-9 @@ -17,4 +17,7 @@ typedef struct flock flock_t; +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-IRIX b/src/OS/os.h-IRIX index ac5a6b326..1d4bf46ba 100644 --- a/src/OS/os.h-IRIX +++ b/src/OS/os.h-IRIX @@ -14,7 +14,4 @@ #define F_FAVAIL f_favail #define vfork fork -/* Other OS have "const" in here */ -#define ICONV_ARG2_TYPE char ** - /* End */ diff --git a/src/OS/os.h-IRIX6 b/src/OS/os.h-IRIX6 index c41a23424..bf3076713 100644 --- a/src/OS/os.h-IRIX6 +++ b/src/OS/os.h-IRIX6 @@ -13,7 +13,4 @@ #define F_FAVAIL f_favail #define vfork fork -/* Other OS have "const" in here */ -#define ICONV_ARG2_TYPE char ** - /* End */ diff --git a/src/OS/os.h-IRIX632 b/src/OS/os.h-IRIX632 index 0196931d2..90f1c582c 100644 --- a/src/OS/os.h-IRIX632 +++ b/src/OS/os.h-IRIX632 @@ -15,7 +15,4 @@ #define F_FAVAIL f_favail #define vfork fork -/* Other OS have "const" in here */ -#define ICONV_ARG2_TYPE char ** - /* End */ diff --git a/src/OS/os.h-IRIX65 b/src/OS/os.h-IRIX65 index 683c66a9f..4b248fe36 100644 --- a/src/OS/os.h-IRIX65 +++ b/src/OS/os.h-IRIX65 @@ -13,7 +13,4 @@ #define F_FAVAIL f_favail #define vfork fork -/* Other OS have "const" in here */ -#define ICONV_ARG2_TYPE char ** - /* End */ diff --git a/src/OS/os.h-Linux b/src/OS/os.h-Linux index 3fead17d7..05c153e2c 100644 --- a/src/OS/os.h-Linux +++ b/src/OS/os.h-Linux @@ -44,9 +44,6 @@ storage" as quickly as Exim thinks they are. */ #define NEED_SYNC_DIRECTORY -/* Other OS have "const" in here */ -#define ICONV_ARG2_TYPE char ** - #define os_find_running_interfaces os_find_running_interfaces_linux /* Need a prototype for the Linux-specific function. The structure hasn't diff --git a/src/OS/os.h-NetBSD b/src/OS/os.h-NetBSD index 19a8ac0c7..d2d3e0d82 100644 --- a/src/OS/os.h-NetBSD +++ b/src/OS/os.h-NetBSD @@ -22,4 +22,7 @@ typedef struct flock flock_t; #define HAVE_SYS_STATVFS_H #endif +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-OSF1 b/src/OS/os.h-OSF1 index f04a5b700..6b5fa4973 100644 --- a/src/OS/os.h-OSF1 +++ b/src/OS/os.h-OSF1 @@ -13,7 +13,4 @@ changed. */ /* Still not "socklen_t", which is the most common setting */ #define EXIM_SOCKLEN_T int -/* The default for this is "const char **" */ -#define ICONV_ARG2_TYPE char ** - /* End */ diff --git a/src/OS/os.h-OpenBSD b/src/OS/os.h-OpenBSD index 9578047af..35eddd5a5 100644 --- a/src/OS/os.h-OpenBSD +++ b/src/OS/os.h-OpenBSD @@ -20,4 +20,7 @@ typedef struct flock flock_t; typedef struct __res_state *res_state; +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-OpenUNIX b/src/OS/os.h-OpenUNIX index 90be8d56d..67d1063b0 100644 --- a/src/OS/os.h-OpenUNIX +++ b/src/OS/os.h-OpenUNIX @@ -13,4 +13,7 @@ #define _SVID3 #define NEED_H_ERRNO +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-QNX b/src/OS/os.h-QNX index 106b0a61b..798f799ed 100644 --- a/src/OS/os.h-QNX +++ b/src/OS/os.h-QNX @@ -18,4 +18,7 @@ doesn't have/need this header file. From Karsten P. Hoffmann. */ extern int h_errno; +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-SCO b/src/OS/os.h-SCO index 07d21bd94..e5e915ed0 100644 --- a/src/OS/os.h-SCO +++ b/src/OS/os.h-SCO @@ -15,4 +15,7 @@ #define _SVID3 #define NEED_H_ERRNO +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-SCO_SV b/src/OS/os.h-SCO_SV index 486fcbe94..0ca29f74a 100644 --- a/src/OS/os.h-SCO_SV +++ b/src/OS/os.h-SCO_SV @@ -13,4 +13,7 @@ #define _SVID3 #define NEED_H_ERRNO +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-SunOS4 b/src/OS/os.h-SunOS4 index b0deefc49..65556204c 100644 --- a/src/OS/os.h-SunOS4 +++ b/src/OS/os.h-SunOS4 @@ -33,4 +33,7 @@ flag causes this to get done in exim.h. */ #define FUDGE_GETC_AND_FRIENDS +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-SunOS5 b/src/OS/os.h-SunOS5 index 8bc0799d2..dd14f25c8 100644 --- a/src/OS/os.h-SunOS5 +++ b/src/OS/os.h-SunOS5 @@ -28,4 +28,7 @@ it seems. */ #define PAM_CONVERSE_ARG2_TYPE struct pam_message +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-SunOS5-hal b/src/OS/os.h-SunOS5-hal index 044e09b30..cd9e877a9 100644 --- a/src/OS/os.h-SunOS5-hal +++ b/src/OS/os.h-SunOS5-hal @@ -8,4 +8,7 @@ #define LOAD_AVG_SYMBOL "avenrun_1min" #define LOAD_AVG_FIELD value.ul +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-ULTRIX b/src/OS/os.h-ULTRIX index 9985af263..08db5aec8 100644 --- a/src/OS/os.h-ULTRIX +++ b/src/OS/os.h-ULTRIX @@ -12,4 +12,7 @@ a minority operating system, easiest just to say "no" until someone asks. */ #define NO_OPENLOG typedef struct flock flock_t; +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-UNIX_SV b/src/OS/os.h-UNIX_SV index 9ad824ab7..4943a07de 100644 --- a/src/OS/os.h-UNIX_SV +++ b/src/OS/os.h-UNIX_SV @@ -19,4 +19,7 @@ #define _SVID3 #define NEED_H_ERRNO +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-USG b/src/OS/os.h-USG index 1c780ee64..e76922067 100644 --- a/src/OS/os.h-USG +++ b/src/OS/os.h-USG @@ -13,4 +13,7 @@ #define _SVID3 #define NEED_H_ERRNO +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-Unixware7 b/src/OS/os.h-Unixware7 index 159209497..4d3ed42f2 100644 --- a/src/OS/os.h-Unixware7 +++ b/src/OS/os.h-Unixware7 @@ -2,7 +2,6 @@ #define NO_SYSEXITS -#define ICONV_ARG2_TYPE char ** #define EXIM_SOCKLEN_T size_t #define LOAD_AVG_NEEDS_ROOT diff --git a/src/OS/os.h-cygwin b/src/OS/os.h-cygwin index 740300af6..07c14d04d 100644 --- a/src/OS/os.h-cygwin +++ b/src/OS/os.h-cygwin @@ -48,4 +48,7 @@ struct { \ DWORD SubAuthority[n]; \ } name = { SID_REVISION, n, {SECURITY_NT_AUTHORITY}, {sid}} +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/OS/os.h-mips b/src/OS/os.h-mips index 79f3ff253..325e3a134 100644 --- a/src/OS/os.h-mips +++ b/src/OS/os.h-mips @@ -21,4 +21,7 @@ extern char *strerror(int); extern int sys_nerr; extern char *sys_errlist[]; +/* default is non-const */ +#define ICONV_ARG2_TYPE const char ** + /* End */ diff --git a/src/src/exim.h b/src/src/exim.h index fb48a43d3..48cf8c146 100644 --- a/src/src/exim.h +++ b/src/src/exim.h @@ -418,7 +418,7 @@ iconv(). It's os.h file defines ICONV_ARG2_TYPE. For the rest, define a default here. */ #ifndef ICONV_ARG2_TYPE -# define ICONV_ARG2_TYPE const char ** +# define ICONV_ARG2_TYPE char ** #endif /* One OS uses a different type for the 5th argument of getsockopt */ -- cgit v1.2.3