cURL / Mailing Lists / curl-library / Single Mail

curl-library

Problems compiling 7.19 with GnuTLS on AIX and IRIX

From: Albert Chin <curl-library_at_mlists.thewrittenword.com>
Date: Fri, 17 Oct 2008 16:16:09 -0500

Ran into a problem when building 7.19.0 on AIX and IRIX with the vendor
C compiler. On AIX:
/opt/fsw/bash30/bin/bash ../libtool --tag=CC --mode=compile xlc -DHAVE_CONFIG_H -I../include -I../include -I../lib -I../lib -I/opt/TWWfsw/libssh201/include -I/opt/TWWfsw/libz12/include -I/opt/TWWfsw/libgnutls16/include -I/opt/TWWfsw/libidn10/include -O2 -qro -qroconst -qmaxmem=-1 -qarch=ppc -qthreaded -qnoansialias -qhalt=e -c -o sslgen.lo sslgen.c
 xlc -DHAVE_CONFIG_H -I../include -I../include -I../lib -I../lib -I/opt/TWWfsw/libssh201/include -I/opt/TWWfsw/libz12/include -I/opt/TWWfsw/libgnutls16/include -I/opt/TWWfsw/libidn10/include -O2 -qro -qroconst -qmaxmem=-1 -qarch=ppc -qthreaded -qnoansialias -qhalt=e -c sslgen.c -DPIC -o .libs/sslgen.o
"sslgen.c", line 381.10: 1506-1332 (W) A function with return type "struct curl_slist*" may not return a value of type "int".

The code in sslgen.c is:
  /* Return list of OpenSSL crypto engine names. */
  struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data)
  {
    return curlssl_engines_list(data);
  }

gtls.h defines curlssl_engines_list as:
  #define curlssl_engines_list(x) (x=x, NULL)

So, the compiler sees:
  struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data)
  {
    return (data=data, 0);
  }
which it cannot compile. The old code from 7.18.2 had:
  struct curl_slist *Curl_ssl_engines_list(struct SessionHandle *data)
  {
  #ifdef USE_SSLEAY
    return Curl_ossl_engines_list(data);
  #else
  #ifdef USE_GNUTLS
    /* FIX: add code here? */
    (void)data;
    return NULL;
  #else
  #ifdef USE_NSS
    /* In theory we could return the PKCS#11 modules loaded but that
     * would just confuse things */
    (void)data;
    return NULL;
  #else
  #ifdef USE_QSOSSL
    /* No engine support in QSOSSL. */
    (void)data;
    return NULL;
  #else
    (void)data;
    return NULL;
  #endif /* USE_QSOSSL */
  #endif /* USE_NSS */
  #endif /* USE_GNUTLS */
  #endif /* USE_SSLEAY */
  }

-- 
albert chin (china_at_thewrittenword.com)
Received on 2008-10-17