Applications From Scratch: http://appsfromscratch.berlios.de/


--- On Sun, 6/22/08, Sergei Steshenko wrote:

> From: Sergei Steshenko
> Subject: RE: [openssl.org #1700]: Bug report - openssl-0.9.8h breaks building applications which depend on it
> To: rt@openssl.org
> Cc: openssl-dev@openssl.org
> Date: Sunday, June 22, 2008, 2:47 PM
> Applications From Scratch:
> http://appsfromscratch.berlios.de/
>
>
> --- On Sun, 6/22/08, Jeroen Daanen via RT
> wrote:
>
> > From: Jeroen Daanen via RT
> > Subject: RE: [openssl.org #1700]: Bug report -

> openssl-0.9.8h breaks building applications which depend on
> it
> > To: sergstesh@yahoo.com
> > Cc: openssl-dev@openssl.org
> > Date: Sunday, June 22, 2008, 12:55 PM
> > This is caused by a name clash. In the VC8 file

> WinCrypt.h
> > the following
> > is defined:
> > PlatformSDK/Include/WinCrypt.h:#define X509_EXTENSIONS
> > ((LPCSTR) 5)
> >
> > This causes line 207 of openssl/x509.h to be

> pre-compiled
> > to
> >
> > typedef STACK ((LPCSTR) 5);
> >
> > X509_EXTENSIONS should be renamed to prevent this

> clash.
> >
> > Regards,
> > Jeroen

>
> The point of my report is somewhat different, and maybe I
> misunderstand
> the 'typedef' festure of "C"; anyway,
> I've just refreshed my memory
> reading
>
> http://en.wikipedia.org/wiki/Typedef
> .
>
> The point is that 'typedef' is legally used as
>
> typedef OLD_TYPE NEW_TYPE
>
> , where OLD_TYPE is just and identifier, without any
> '(', ')'; NEW_TYPE
> can be pretty complex though.
>
> For example, I can write something like this:
>
> #define MY_FUNKY_TYPE(type1, size1, type2, size2) \
> struct \
> { \
> type1 foo[size1]; \
> type2 bar[size2]; \
> }
>
> typedef my_funky_type MY_FUNKY_TYPE(double, 10, unsigned,
> 20);
>
> ,
>
> but I do not think I can write
>
> typedef my_type() NEW_TYPE;
>
> - the "()" part looks illegal to
> me, and this is how I
> understood 'gcc' error messages.
>
> That's why I suggested to replace
>
> typedef OLD_TYPE()
> NEW_TYPE();
>
> with
>
> #define OLD_TYPE()
> NEW_TYPE()
>
> - the latter is a macro in which OLD_TYPE _can_ have
> arguments.
>
> Thanks,
> Sergei.


Well, if in

207 typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS;

"STACK_OF(X509_EXTENSION)" is a macro, then from "C" point of view
the line may be OK - depends on how "STACK_OF(X509_EXTENSION)" is
expanded.

Regards,
Sergei.










__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org