OpenSSL 0.9.8 and C89 compliance

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenSSL 0.9.8 and C89 compliance

Steffen Fiksdal
Hi all!

After upgrading to OpenSSL 0.9.8 I received a lot of warnings about
'long long' datatype not supported by C89 (I compile with -ansi).

Now I have to compile with -std=c99 instead.

I guess this is done intentionally (I mean breaking C89? )

Best Regards
Steffen Fiksdal

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL 0.9.8 and C89 compliance

Richard Levitte - VMS Whacker
Steffen Fiksdal writes:

> After upgrading to OpenSSL 0.9.8 I received a lot of warnings about
> 'long long' datatype not supported by C89 (I compile with -ansi).

Which files did you get that warning on (I'd be happy to take a look at a
build log), and what compiler (including the version)?  A small detail: ANSI
C is C99 these days (as far as I understand)..

> I guess this is done intentionally (I mean breaking C89? )

Not really, but it depends a bit on who tested and on what.  With compilers
that don't complain about 'long long' or that believe ANSI C == C99, you
don't get that kind of warning.  In other words, it's easy to miss.  I'll
happily correct this for 0.9.8a if I can.

Cheers,
Richard

 -----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

--
Richard Levitte                         [hidden email]
                                       http://richard.levitte.org/ 

"When I became a man I put away childish things, including
the fear of childishness and the desire to be very grown up."
                                               -- C.S. Lewis

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL 0.9.8 and C89 compliance

Steffen Fiksdal

> Steffen Fiksdal writes:
>
> > After upgrading to OpenSSL 0.9.8 I received a lot of warnings about
> > 'long long' datatype not supported by C89 (I compile with -ansi).
>
> Which files did you get that warning on (I'd be happy to take a look at a
> build log), and what compiler (including the version)?  A small detail: ANSI
> C is C99 these days (as far as I understand)..

I use gcc 3.2.3 on a Linux 2.4 box. In gcc 3.2.3 the "-ansi" flag means
compliance with C89. If this has changed in later gcc's I don't know.

I receive:
warning: ISO C89 does not support 'long long'.
This applies to several header files, among those sha.h:
#define SHA_LONG64 unsigned long long




> > I guess this is done intentionally (I mean breaking C89? )
>
> Not really, but it depends a bit on who tested and on what.  With compilers
> that don't complain about 'long long' or that believe ANSI C == C99, you
> don't get that kind of warning.  In other words, it's easy to miss.  I'll
> happily correct this for 0.9.8a if I can.a

I don't know is this is wrong, but my compiler says that "-ansi" is C89
...


Best Regards
Steffen Fiksdal
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: OpenSSL 0.9.8 and C89 compliance

Richard Levitte - VMS Whacker
Steffen Fiksdal writes:

> I use gcc 3.2.3 on a Linux 2.4 box. In gcc 3.2.3 the "-ansi" flag means
> compliance with C89. If this has changed in later gcc's I don't know.

There's a quick solution, BTW: -Wno-long-long

Since your platform obviously can handle long long, I think it's safe to
suppress that warning.

Cheers,
Richard

 -----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.

--
Richard Levitte                         [hidden email]
                                       http://richard.levitte.org/ 

"When I became a man I put away childish things, including
the fear of childishness and the desire to be very grown up."
                                               -- C.S. Lewis

______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [hidden email]
Automated List Manager                           [hidden email]