[openssl.org #433] 0.9.7 compilation problem with Borland C++ 5.5

2003-01-14 Thread Stephen Henson via RT

I've analysed this further and the cause seems to be that it bcc 5.5
complains about taking the address of a structure that doesn't have a
complete definition.

For example the following wont compile:

typedef struct FOO_st FOO;

extern FOO bar;

FOO *pbar;

pbar = bar;

but it has no problems on other compilers.

There are several possible workarounds for this. One is to include the
complete definition whenever some_item is used, another is to change
things so some_item is of type ASN1_ITEM * instead of ASN1_ITEM.

However the easiest is to use the same options as VC++ which has an
unrelated problem with initializing structures containing pointers to
structures in DLLs.

If you add EXPORT_VAR_AS_FN in the BCC-32 entry in Configure as in the
VC-WIN32 entry it seems to compile OK and passes all the tests.

I'll check in this fix soon.

Steve.


__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: [openssl.org #433] 0.9.7 compilation problem with Borland C++ 5.5

2003-01-14 Thread Richard Levitte - VMS Whacker via RT

In message [EMAIL PROTECTED] on Tue, 14 Jan 2003 14:49:31 
+0100 (MET), Stephen Henson via RT [EMAIL PROTECTED] said:

rt I've analysed this further and the cause seems to be that it bcc 5.5
rt complains about taking the address of a structure that doesn't have a
rt complete definition.
rt 
rt For example the following wont compile:
rt 
rt typedef struct FOO_st FOO;
rt 
rt extern FOO bar;
rt 
rt FOO *pbar;
rt 
rt pbar = bar;
rt 
rt but it has no problems on other compilers.

I believe this is a compiler bug, which should be reported back to
Borland (unless they have a newer version of bcc that works
correctly).

rt If you add EXPORT_VAR_AS_FN in the BCC-32 entry in Configure as in the
rt VC-WIN32 entry it seems to compile OK and passes all the tests.
rt 
rt I'll check in this fix soon.

Sounds reasonable.

-- 
Richard Levitte   \ Spannvägen 38, II \ [EMAIL PROTECTED]
Redakteur@Stacken  \ S-168 35  BROMMA  \ T: +46-8-26 52 47
\  SWEDEN   \ or +46-708-26 53 44
Procurator Odiosus Ex Infernis-- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/

Unsolicited commercial email is subject to an archival fee of $400.
See http://www.stacken.kth.se/~levitte/mail/ for more info.

__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: [openssl.org #433] 0.9.7 compilation problem with Borland C++5.5

2003-01-14 Thread Ben Laurie
Richard Levitte - VMS Whacker via RT wrote:

In message [EMAIL PROTECTED] on Tue, 14 Jan 2003 14:49:31 +0100 (MET), Stephen Henson via RT [EMAIL PROTECTED] said:

rt I've analysed this further and the cause seems to be that it bcc 5.5
rt complains about taking the address of a structure that doesn't have a
rt complete definition.
rt 
rt For example the following wont compile:
rt 
rt typedef struct FOO_st FOO;
rt 
rt extern FOO bar;
rt 
rt FOO *pbar;
rt 
rt pbar = bar;
rt 
rt but it has no problems on other compilers.

I believe this is a compiler bug, which should be reported back to
Borland (unless they have a newer version of bcc that works
correctly).

It is a compiler bug, definitely.

Cheers,

Ben.

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

There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit. - Robert Woodruff

__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: [openssl.org #433] 0.9.7 compilation problem with Borland C++5.5

2003-01-14 Thread Rich Salz
Yes that's what I thought. Any ANSI C experts care to comment on whether
that is legal or not?


It's as legal as this:
  extern int foo(int);
  int (*fp)(int) = foo;

 :)


__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: [openssl.org #433] 0.9.7 compilation problem with Borland C++ 5.5

2003-01-14 Thread Rich Salz via RT

 Yes that's what I thought. Any ANSI C experts care to comment on whether
 that is legal or not?

It's as legal as this:
   extern int foo(int);
   int (*fp)(int) = foo;

  :)


__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



[openssl.org #433] 0.9.7 compilation problem with Borland C++ 5.5

2003-01-14 Thread Stephen Henson via RT

OK, since the consensus seems to be a compiler bug and a workaround has
been checked in I'll resolve this ticket.

__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: [openssl.org #433] 0.9.7 compilation problem with Borland C++5.5

2003-01-13 Thread Jon Bright
  [[EMAIL PROTECTED] - Fri Jan  3 06:45:12 2003]: 
   
   I'm trying to compile 0.9.7 with Borland C++ 5.5 and NASM 0.98.35 on 
   Windows XP Professional SP1 with all updates. 

   .\crypto\x509\x_all.c: 
   Error E2450 .\crypto\x509\x_all.c 72: Undefined structure 
  'ASN1_ITEM_st' 

This same error happpened for me when compiling with Builder 5.  I
haven't checked Builder 6 yet.  This is the one outstanding error for
Builder 5 for which I still have local patches - I did submit a working
fix for this some time ago, but it was kind-of controversial and didn't
make it in.

-- 
Jon Bright
Lead Programmer, Silicon Circus Ltd.
http://www.siliconcircus.com/


__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: [openssl.org #433] 0.9.7 compilation problem with Borland C++ 5.5

2003-01-13 Thread [EMAIL PROTECTED] via RT

  [[EMAIL PROTECTED] - Fri Jan  3 06:45:12 2003]: 
   
   I'm trying to compile 0.9.7 with Borland C++ 5.5 and NASM 0.98.35 on 
   Windows XP Professional SP1 with all updates. 

   .\crypto\x509\x_all.c: 
   Error E2450 .\crypto\x509\x_all.c 72: Undefined structure 
  'ASN1_ITEM_st' 

This same error happpened for me when compiling with Builder 5.  I
haven't checked Builder 6 yet.  This is the one outstanding error for
Builder 5 for which I still have local patches - I did submit a working
fix for this some time ago, but it was kind-of controversial and didn't
make it in.

-- 
Jon Bright
Lead Programmer, Silicon Circus Ltd.
http://www.siliconcircus.com/


__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



[openssl.org #433] 0.9.7 compilation problem with Borland C++ 5.5

2003-01-13 Thread Stephen Henson via RT

[[EMAIL PROTECTED] - Fri Jan 10 21:48:32 2003]:

 
 I tried 0.9.7 before succesfully compiling 0.9.6h.
 
 As Doug Kaufman suggested for some reason asn1t.h doesn't get
 included. I
 had to manually edit a dozen source files.
 
 I also have Cygwin in c:\cygwin, but my PATH shows:
 

PATH=C:\usr\Perl\bin\;C:\usr\Borland\Bcc55\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
 
 I really don't see how it could be including other headers if I did
 everything from g:\Linux\openssl-0.9.7.
 

Odd. It shouldn't need the definition of the ASN1_ITEM_st structure,
that file only uses pointers to ASN1_ITEM. It doesn't access any fields:
if it did every compiler should choke on that file.

Presumably adding a #include openssl/asn1t.h in asn1.h would work
around this?

I'm suprised though that it doesn't have similar problems in other
places. This kind of thing is done quite a bit is ossl_typ.h in 0.9.7 to
avoid having to drag in the full definitions of structures that are only
being used as pointers so I'm not sure why it doesn't like ASN1_ITEM.

Also the type ASN1_VALUE doesn't even have a complete definition. Does
it complain about undefined ASN1_VALUE_st structure anywhere?

__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



[openssl.org #433] 0.9.7 compilation problem with Borland C++ 5.5

2003-01-10 Thread Lutz Jaenicke via RT

[[EMAIL PROTECTED] - Fri Jan  3 06:45:12 2003]: 
 
 I'm trying to compile 0.9.7 with Borland C++ 5.5 and NASM 0.98.35 on 
 Windows XP Professional SP1 with all updates. 
  
 I did 
  
 perl Configure BC-32 no-idea no-mdc2 no-rc5 
 ms\do_nasm 
 make -f ms\bcb.mak 
  
 It fails at: 
  
 bcc32 -otmp32\x_all.obj -Iinc32 -Itmp32 -DWIN32_LEAN_AND_MEAN 
-q 
 -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 
 -DL_ENDIAN -DDSO_WIN32 -D_stricmp=stricmp -O2 -ff -fp 
-DBN_ASM 
 -DMD5_ASM -DSHA1_ASM -DRMD160_ASM -DOPENSSL_NO_IDEA 
 -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_KRB5  -c 
 .\crypto\x509\x_all.c 
 .\crypto\x509\x_all.c: 
 Error E2450 .\crypto\x509\x_all.c 72: Undefined structure 
'ASN1_ITEM_st' 
 in function X509_verify 
 Error E2450 .\crypto\x509\x_all.c 72: Undefined structure 
'ASN1_ITEM_st' 
 in function X509_verify 
 
ASN1_ITEM_st was added in OpenSSL 0.9.7. It therefore seems, that 
old header files are picked up. 
 
Best regards, 
  Lutz 
 
__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: [openssl.org #433] 0.9.7 compilation problem with Borland C++ 5.5

2003-01-10 Thread Frédéric L. W. Meunier via RT

On Fri, 10 Jan 2003 21:27:56 +0100 (MET), Lutz Jaenicke via RT
[EMAIL PROTECTED] said:
 
 [[EMAIL PROTECTED] - Fri Jan  3 06:45:12 2003]: 
  
  I'm trying to compile 0.9.7 with Borland C++ 5.5 and NASM 0.98.35 on 
  Windows XP Professional SP1 with all updates. 
   
  I did 
   
  perl Configure BC-32 no-idea no-mdc2 no-rc5 
  ms\do_nasm 
  make -f ms\bcb.mak 
   
  It fails at: 
   
  bcc32 -otmp32\x_all.obj -Iinc32 -Itmp32 -DWIN32_LEAN_AND_MEAN 
 -q 
  -w-aus -w-par -w-inl -c -tWC -tWM -DOPENSSL_SYSNAME_WIN32 
  -DL_ENDIAN -DDSO_WIN32 -D_stricmp=stricmp -O2 -ff -fp 
 -DBN_ASM 
  -DMD5_ASM -DSHA1_ASM -DRMD160_ASM -DOPENSSL_NO_IDEA 
  -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DOPENSSL_NO_KRB5  -c 
  .\crypto\x509\x_all.c 
  .\crypto\x509\x_all.c: 
  Error E2450 .\crypto\x509\x_all.c 72: Undefined structure 
 'ASN1_ITEM_st' 
  in function X509_verify 
  Error E2450 .\crypto\x509\x_all.c 72: Undefined structure 
 'ASN1_ITEM_st' 
  in function X509_verify 
  
 ASN1_ITEM_st was added in OpenSSL 0.9.7. It therefore seems, that 
 old header files are picked up. 
 
I tried 0.9.7 before succesfully compiling 0.9.6h.

As Doug Kaufman suggested for some reason asn1t.h doesn't get included. I
had to manually edit a dozen source files.

I also have Cygwin in c:\cygwin, but my PATH shows:

PATH=C:\usr\Perl\bin\;C:\usr\Borland\Bcc55\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

I really don't see how it could be including other headers if I did
everything from g:\Linux\openssl-0.9.7.

--
0@pervalidus.{net, dyndns.org}

-- 
http://fastmail.fm - And now for something completely different...

__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



Re: [openssl.org #433] 0.9.7 compilation problem with Borland C++ 5.5

2003-01-03 Thread Frédéric L. W. Meunier via RT

Just to inform you that 0.9.6h compiled with the same setup.

I don't know if the following are serious:

bcc32 -otmp32\c_zlib.obj -Iinc32 -Itmp32 -DWIN32_LEAN_AND_MEAN -q
-w-aus -w-par -w-inl -c -tWC -tWM -DWINDOWS -DWIN32 -DL_ENDIAN
-DDSO_WIN32 -O2 -ff -fp -DBN_ASM -DMD5_ASM -DSHA1_ASM
-DRMD160_ASM -DNO_IDEA -DNO_RC5 -DNO_MDC2  -c
.\crypto\comp\c_zlib.c
.\crypto\comp\c_zlib.c:
echo LIB 0
LIB 0
tlib /P64 out32\libeay32.lib -+tmp32\cryptlib.obj
TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation
Warning: 'cryptlib' not found in library
tlib /P64 out32\libeay32.lib -+tmp32\mem.obj
TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation
Warning: 'mem' not found in library
...
TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation
Warning: 'err_all' not found in library
Warning: public '_ERR_load_crypto_strings' in module 'err_all' clashes
with prior module 'cpt_err'
tlib /P64 out32\libeay32.lib -+tmp32\err_prn.obj
TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation
Warning: public '_ERR_load_crypto_strings' in module 'err_all' clashes
with prior module 'cpt_err'

bcc32 -otmp32\ssl_err.obj -Iinc32 -Itmp32 -DWIN32_LEAN_AND_MEAN
-q -w-aus -w-par -w-inl -c -tWC -tWM -DWINDOWS -DWIN32 -DL_ENDIAN
-DDSO_WIN32 -O2 -ff -fp -DBN_ASM -DMD5_ASM -DSHA1_ASM
-DRMD160_ASM -DNO_IDEA -DNO_RC5 -DNO_MDC2  -c .\ssl\ssl_err.c
.\ssl\ssl_err.c:
echo LIB 0
LIB 0
tlib /P64 out32\ssleay32.lib -+tmp32\s2_meth.obj
TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation
Warning: 's2_meth' not found in library
tlib /P64 out32\ssleay32.lib -+tmp32\s2_srvr.obj
TLIB 4.5 Copyright (c) 1987, 1999 Inprise Corporation
Warning: 's2_srvr' not found in library
...

--
0@pervalidus.{net, dyndns.org}

-- 
http://fastmail.fm - Accessible with your email software
  or over the web

__
OpenSSL Project http://www.openssl.org
Development Mailing List   [EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]