Ulf M�ller wrote:
>
> From: Janez Jere <[EMAIL PROTECTED]>
> Subject: cant compile
>
> [...]
>
> Here is an example of not properly written function, where const
> parameter is going to be changed with c2l macro, which is wrong, or I
> dont know enough about C.
This fix is wrong, of course. It is almost never correct to set a
non-const pointer to a const one, and, besides, it will also cause an
error on any sane compiler.
The weird thing, though, is that the error is wrong. c2l does _not_
modify its first argument, only the second.
Cheers,
Ben.
>
> [...]
> ===========
> void des_ecb_encrypt(const des_cblock in, des_cblock out,
> des_key_schedule ks,
> int enc)
> {
> register DES_LONG l;
> DES_LONG ll[2];
>
> c2l(in,l); ll[0]=l;
>
> chould be changed into
>
> void des_ecb_encrypt(const des_cblock _in, des_cblock out,
> des_key_schedule ks,
> int enc)
> {
> register DES_LONG l;
> DES_LONG ll[2];
>
> des_cblock in = _in;
> c2l(in,l); ll[0]=l;
>
> Error E2024 .\crypto\des\ecb_enc.c 112: Cannot modify a const object in
> function
> des_ecb_encrypt
> Error E2024 .\crypto\des\ecb_enc.c 112: Cannot modify a const object in
> function
> des_ecb_encrypt
> Error E2024 .\crypto\des\ecb_enc.c 112: Cannot modify a const object in
> function
> des_ecb_encrypt
> Error E2024 .\crypto\des\ecb_enc.c 112: Cannot modify a const object in
> function
> des_ecb_encrypt
> Error E2024 .\crypto\des\ecb_enc.c 113: Cannot modify a const object in
> function
> des_ecb_encrypt
> Error E2024 .\crypto\des\ecb_enc.c 113: Cannot modify a const object in
> function
> des_ecb_encrypt
> Error E2024 .\crypto\des\ecb_enc.c 113: Cannot modify a const object in
> function
> des_ecb_encrypt
> Error E2024 .\crypto\des\ecb_enc.c 113: Cannot modify a const object in
> function
> des_ecb_encrypt
> *** 8 errors in Compile ***
> make: *** [tmp32\ecb_enc.obj] Error 1
>
> ______________________________________________________________________
> OpenSSL Project http://www.openssl.org
> Development Mailing List [EMAIL PROTECTED]
> Automated List Manager [EMAIL PROTECTED]
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]