RE: [openssl.org #1700]: Bug report - openssl-0.9.8h breaks building applications which depend on it - Openssl

This is a discussion on RE: [openssl.org #1700]: Bug report - openssl-0.9.8h breaks building applications which depend on it - Openssl ; 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 ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: RE: [openssl.org #1700]: Bug report - openssl-0.9.8h breaks building applications which depend on it

  1. RE: [openssl.org #1700]: Bug report - openssl-0.9.8h breaks building applications which depend on it


    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

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


  2. RE: [openssl.org #1700]: Bug report - openssl-0.9.8h breaks building applications which depend on it



    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.






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


+ Reply to Thread