While on the subject of building on OpenIndiana. If you build with the Sun compiler you get the following warnings:

cc acl.c
"acl.c", line 1478: initializer will be sign-extended: -1
"acl.c", line 1479: initializer will be sign-extended: -1
"acl.c", line 1480: initializer will be sign-extended: -1
"acl.c", line 1481: initializer will be sign-extended: -1
cc: acomp failed for acl.c
*** Error code 1
The following command caused the error:
cc -c -errwarn=%all -I. -I/usr/include/pcre -I/usr/include/pcre   acl.c
make: Fatal error: Command failed for target `acl.o'
Current working directory /var/tmp/exim-4.80.1/build-SunOS5-5.11-i386
*** Error code 1
The following command caused the error:
cd build-${build:-`/bin/sh scripts/os-type`-`/bin/sh scripts/arch-type`}; make SHELL=/bin/sh
make: Fatal error: Command failed for target `all'

Obviously I had the -errwarn=%all flag to turn warnings into errors.

The fix is to explicitly cast the values to be unsigned. Here are the diffs:

*** src/acl.c.orig      Sat Oct 27 17:37:04 2012
--- src/acl.c   Sat Oct 27 17:48:05 2012
***************
*** 1475,1484 ****
unsigned alt_opt_sep; /* >0 Non-/ option separator (custom parser) */
    } verify_type_t;
  static verify_type_t verify_type_list[] = {
! { US"reverse_host_lookup", VERIFY_REV_HOST_LKUP, ~0, TRUE, 0 }, ! { US"certificate", VERIFY_CERT, ~0, TRUE, 0 }, ! { US"helo", VERIFY_HELO, ~0, TRUE, 0 }, ! { US"csa", VERIFY_CSA, ~0, FALSE, 0 }, { US"header_syntax", VERIFY_HDR_SYNTAX, (1<<ACL_WHERE_DATA)|(1<<ACL_WHERE_NOTSMTP), TRUE, 0 }, { US"not_blind", VERIFY_NOT_BLIND, (1<<ACL_WHERE_DATA)|(1<<ACL_WHERE_NOTSMTP), TRUE, 0 }, { US"header_sender", VERIFY_HDR_SNDR, (1<<ACL_WHERE_DATA)|(1<<ACL_WHERE_NOTSMTP), FALSE, 0 },
--- 1475,1484 ----
unsigned alt_opt_sep; /* >0 Non-/ option separator (custom parser) */
    } verify_type_t;
  static verify_type_t verify_type_list[] = {
! { US"reverse_host_lookup", VERIFY_REV_HOST_LKUP, ~(unsigned)0, TRUE, 0 }, ! { US"certificate", VERIFY_CERT, ~(unsigned)0, TRUE, 0 }, ! { US"helo", VERIFY_HELO, ~(unsigned)0, TRUE, 0 }, ! { US"csa", VERIFY_CSA, ~(unsigned)0, FALSE, 0 }, { US"header_syntax", VERIFY_HDR_SYNTAX, (1<<ACL_WHERE_DATA)|(1<<ACL_WHERE_NOTSMTP), TRUE, 0 }, { US"not_blind", VERIFY_NOT_BLIND, (1<<ACL_WHERE_DATA)|(1<<ACL_WHERE_NOTSMTP), TRUE, 0 }, { US"header_sender", VERIFY_HDR_SNDR, (1<<ACL_WHERE_DATA)|(1<<ACL_WHERE_NOTSMTP), FALSE, 0 },



Meanwhile on Solaris 11 for a warning free build you need the above plus:

*** src/child.c.orig    Sat Oct 27 17:48:56 2012
--- src/child.c    Sat Oct 27 18:17:33 2012
***************
*** 155,161 ****
--- 155,163 ----

  _exit(EX_EXECFAILED);

+ #ifndef __SunOS_5_11
  return NULL;   /* To keep compilers happy */
+ #endif
  }


*** src/exim.h.orig    Sat Oct 27 17:56:39 2012
--- src/exim.h    Sat Oct 27 18:00:11 2012
***************
*** 397,403 ****
  here. */

  #ifndef ICONV_ARG2_TYPE
! #ifdef _SunOS
  #define ICONV_ARG2_TYPE char **
  #else
  #define ICONV_ARG2_TYPE const char **
--- 397,403 ----
  here. */

  #ifndef ICONV_ARG2_TYPE
! #ifdef sun
  #define ICONV_ARG2_TYPE char **
  #else
  #define ICONV_ARG2_TYPE const char **
*** src/tls-openssl.c.orig    Sat Oct 27 18:12:56 2012
--- src/tls-openssl.c    Sat Oct 27 18:11:53 2012
***************
*** 1729,1735 ****

  struct exim_openssl_option {
    uschar *name;
!   long    value;
  };
  /* We could use a macro to expand, but we need the ifdef and not all the
options document which version they were introduced in. Policylet: include
--- 1729,1735 ----

  struct exim_openssl_option {
    uschar *name;
!   unsigned long    value;
  };
  /* We could use a macro to expand, but we need the ifdef and not all the
options document which version they were introduced in. Policylet: include



--chris

--
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to