Phillip Porch wrote:
> 
> Ben, after some trial and error and help from Richard Levitte in getting
> on the right track, I found the problem that kept openssl (current
> cvs) from compiling with the native compiler.
> 
> The problem is with the crypto/evp/evp_locl.h file
> 
> #define BLOCK_CIPHER_ecb_loop() \
>         unsigned int i; \
>         if(inl < 8) return 1;\
>         inl -= 8; \
>         for(i=0; i <= inl; i+=8) \
> 
> #define BLOCK_CIPHER_func_ecb(cname, cprefix, kname) \
> static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const 
>unsigned char *in, unsigned int inl) \
> {\
>         BLOCK_CIPHER_ecb_loop() \
>                 cprefix##_ecb_encrypt(in + i, out + i, &ctx->c.##kname, 
>ctx->encrypt);\
>         return 1;\
> }
>                                                              ^^^^^^^^^^
> 
> The construct c.##kname when run through the sco preprocessor results in 2
> tokens c .whatever where the compiler needs 3 like c . whatever
> 
> I changed all the c.##kname constructs to c.kname and it compiles and
> tests fine with the native compiler. I then compiled it with the gcc
> compiler and it again did it without problems.  I don't think the
> c.##kname is necessary and will include a patch below to remove it. If you
> find that it works for you, it will keep the current cvs from breaking the
> native cc compiler for SCO Openserver. If you want to leave what you have
> alone, I would be happy to submit a small change to the Configure script
> and the evp_locl.h file to add a flag -DSCO and include the alternate code
> if defined.

Interesting ... that code has not actually changed in living memory (OK,
I added a "const" two lines before), so it is curious that it suddenly
causes a problem. Anyway, I totally agree that the ## is not needed.

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

Coming to ApacheCon Europe 2000? http://apachecon.com/
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to