Solaris 10 build of saslauthd/auth_getpwent.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am running into problems trying to build cyrus-sasl-2.1.23 .

I get the following error on saslauthd/auth_getpwent.c when compiling with
  - SUNWspro-12-0907 C compiler
  - using openssl 0.9.7m
  - both solaris 9 and solaris 10

"/usr/include/crypt.h", line 22: syntax error before or at: (
"/usr/include/crypt.h", line 22: syntax error before or at: const
"/usr/include/crypt.h", line 22: syntax error before or at: )
"/usr/include/crypt.h", line 22: warning: syntax error:  empty declaration

The problem is similar to

    % cat > /usr/tmp/deleteme.c <<EOF

    #include <stdlib.h>
    #include <openssl/des.h>
    #include <crypt.h>
    EOF
    % cc -I/usr/local/include -c /usr/tmp/deleteme.c
    "/usr/include/crypt.h", line 22: syntax error before or at: (
    "/usr/include/crypt.h", line 22: syntax error before or at: const
    "/usr/include/crypt.h", line 22: syntax error before or at: )

The problem is that openssl/des.h does 
    #include <openssl/des_old.h>
And openssl/des_old.h does
    #define des_crypt(b,s) \
            DES_crypt((b),(s))
While solaris crypt.h does
    extern char* des_crypt(const char *, const char *)
The result is
    extern char* des_crypt((const char *), (const char *))
Which is lexically incorrect.

The setup in saslauthd/auth_getpwent.c looks like this...
    # ifdef WITH_DES
    #  ifdef WITH_SSL_DES
    #   include <openssl/des.h>
    #  else
    #   include <des.h>
    #  endif /* WITH_SSL_DES */
    # endif /* WITH_DES */

    #ifdef HAVE_CRYPT_H
    #include <crypt.h>
    #endif 
This problem does not occur with saslauthd/lak.c even though both include
many of the same include files. The saslauthd/lak.c has additional
boilerplate...
    #ifdef HAVE_CRYPT_H
    #include <crypt.h>
    #endif

    #ifdef HAVE_OPENSSL
    #ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT
    #define OPENSSL_DISABLE_OLD_DES_SUPPORT
    #endif
    #include <openssl/evp.h>
    #include <openssl/des.h>
    #endif

Perhaps the lak.c style conditional includes could be used by auth_getpwent.c .
Or perhaps at least they should be somewhat consistent.

Do you agree?

 


[Index of Archives]     [Info Cyrus]     [Squirrel Mail]     [Linux Media]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux