[openssl.org #3380] OpenSSL 1.0.1h on SGI IRIX

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

[openssl.org #3380] OpenSSL 1.0.1h on SGI IRIX

Rich Salz via RT
The following shows up using SGI IRIX cc:

cc -I.. -I../include  -DOPENSSL_THREADS -D_SGI_MP_SOURCE -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_USE_IPV6=0 -n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W   -c -o heartbeat_test.o heartbeat_test.c
cc-1020 cc: ERROR File = heartbeat_test.c, Line = 276
  The identifier "__func__" is undefined.

  SETUP_HEARTBEAT_TEST_FIXTURE(dtls);
  ^

cc-1020 cc: ERROR File = heartbeat_test.c, Line = 294
  The identifier "__func__" is undefined.

  SETUP_HEARTBEAT_TEST_FIXTURE(dtls);
  ^

cc-1020 cc: ERROR File = heartbeat_test.c, Line = 312
  The identifier "__func__" is undefined.

  SETUP_HEARTBEAT_TEST_FIXTURE(dtls);
  ^

cc-1020 cc: ERROR File = heartbeat_test.c, Line = 326
  The identifier "__func__" is undefined.

  SETUP_HEARTBEAT_TEST_FIXTURE(dtls);
  ^

cc-1020 cc: ERROR File = heartbeat_test.c, Line = 343
  The identifier "__func__" is undefined.

  SETUP_HEARTBEAT_TEST_FIXTURE(dtls);
  ^

cc-1020 cc: ERROR File = heartbeat_test.c, Line = 360
  The identifier "__func__" is undefined.

  SETUP_HEARTBEAT_TEST_FIXTURE(tls);
  ^

cc-1020 cc: ERROR File = heartbeat_test.c, Line = 378
  The identifier "__func__" is undefined.

  SETUP_HEARTBEAT_TEST_FIXTURE(tls);
  ^

cc-1020 cc: ERROR File = heartbeat_test.c, Line = 396
  The identifier "__func__" is undefined.

  SETUP_HEARTBEAT_TEST_FIXTURE(tls);
  ^

cc-1020 cc: ERROR File = heartbeat_test.c, Line = 410
  The identifier "__func__" is undefined.

  SETUP_HEARTBEAT_TEST_FIXTURE(tls);
  ^

9 errors detected in the compilation of "heartbeat_test.c".

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

Re: [openssl.org #3380] OpenSSL 1.0.1h on SGI IRIX

Mike Bland
__func__ is defined in C99. What version of the SGI C compiler are you
using? According to the following, as of version 7.4, the -c99 flag
should enable this to compile:

http://www.sgi.com/products/software/irix/tools/c.html

Mike


On Fri, Jun 6, 2014 at 3:14 AM, Pieter Bowman via RT <[hidden email]> wrote:

> The following shows up using SGI IRIX cc:
>
> cc -I.. -I../include  -DOPENSSL_THREADS -D_SGI_MP_SOURCE -DDSO_DLFCN -DHAVE_DLFCN_H -DOPENSSL_USE_IPV6=0 -n32 -mips3 -O2 -use_readonly_const -G0 -rdata_shared -DTERMIOS -DB_ENDIAN -DBN_DIV3W   -c -o heartbeat_test.o heartbeat_test.c
> cc-1020 cc: ERROR File = heartbeat_test.c, Line = 276
>   The identifier "__func__" is undefined.
>
>         SETUP_HEARTBEAT_TEST_FIXTURE(dtls);
>         ^
>
> cc-1020 cc: ERROR File = heartbeat_test.c, Line = 294
>   The identifier "__func__" is undefined.
>
>         SETUP_HEARTBEAT_TEST_FIXTURE(dtls);
>         ^
>
> cc-1020 cc: ERROR File = heartbeat_test.c, Line = 312
>   The identifier "__func__" is undefined.
>
>         SETUP_HEARTBEAT_TEST_FIXTURE(dtls);
>         ^
>
> cc-1020 cc: ERROR File = heartbeat_test.c, Line = 326
>   The identifier "__func__" is undefined.
>
>         SETUP_HEARTBEAT_TEST_FIXTURE(dtls);
>         ^
>
> cc-1020 cc: ERROR File = heartbeat_test.c, Line = 343
>   The identifier "__func__" is undefined.
>
>         SETUP_HEARTBEAT_TEST_FIXTURE(dtls);
>         ^
>
> cc-1020 cc: ERROR File = heartbeat_test.c, Line = 360
>   The identifier "__func__" is undefined.
>
>         SETUP_HEARTBEAT_TEST_FIXTURE(tls);
>         ^
>
> cc-1020 cc: ERROR File = heartbeat_test.c, Line = 378
>   The identifier "__func__" is undefined.
>
>         SETUP_HEARTBEAT_TEST_FIXTURE(tls);
>         ^
>
> cc-1020 cc: ERROR File = heartbeat_test.c, Line = 396
>   The identifier "__func__" is undefined.
>
>         SETUP_HEARTBEAT_TEST_FIXTURE(tls);
>         ^
>
> cc-1020 cc: ERROR File = heartbeat_test.c, Line = 410
>   The identifier "__func__" is undefined.
>
>         SETUP_HEARTBEAT_TEST_FIXTURE(tls);
>         ^
>
> 9 errors detected in the compilation of "heartbeat_test.c".
>
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> Development Mailing List                       [hidden email]
> Automated List Manager                           [hidden email]
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [openssl.org #3380] OpenSSL 1.0.1h on SGI IRIX

Dr. Stephen Henson
On Fri, Jun 06, 2014, Mike Bland wrote:

> __func__ is defined in C99. What version of the SGI C compiler are you
> using? According to the following, as of version 7.4, the -c99 flag
> should enable this to compile:
>
> http://www.sgi.com/products/software/irix/tools/c.html
>

Note that VC++ under Windows doesn't support __func__ either. Well at least
the versions I tested didn't.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [openssl.org #3380] OpenSSL 1.0.1h on SGI IRIX

Tom Kacvinsky
The Microsoft compilers support __FUNCTION__, same functionality as __func__.  Could be the SGI compiler supports
__FUNCTION__, but it's been a long time since I had access to a SGI machine, so I couldn't check.


On Fri, Jun 6, 2014 at 2:02 PM, Dr. Stephen Henson <[hidden email]> wrote:
On Fri, Jun 06, 2014, Mike Bland wrote:

> __func__ is defined in C99. What version of the SGI C compiler are you
> using? According to the following, as of version 7.4, the -c99 flag
> should enable this to compile:
>
> http://www.sgi.com/products/software/irix/tools/c.html
>

Note that VC++ under Windows doesn't support __func__ either. Well at least
the versions I tested didn't.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [openssl.org #3380] OpenSSL 1.0.1h on SGI IRIX

Tim Hudson
In reply to this post by Dr. Stephen Henson
On 7/06/2014 4:02 AM, Dr. Stephen Henson wrote:

> On Fri, Jun 06, 2014, Mike Bland wrote:
>
>> __func__ is defined in C99. What version of the SGI C compiler are you
>> using? According to the following, as of version 7.4, the -c99 flag
>> should enable this to compile:
>>
>> http://www.sgi.com/products/software/irix/tools/c.html
>>
> Note that VC++ under Windows doesn't support __func__ either. Well at least
> the versions I tested didn't.

Adding in C99 dependencies in the code will run into a lot of non-C99
environments which still are being actively used.
I think it is time to either decide that C99 is now a requirement (and
there are features in C99 that would be nice to be able to use) or to
decide that code which uses those features shouldn't go in - i.e. don't
use those features so that platforms which don't support C99 are still
supportable.

Either approach leads to things breaking for at least some users ...

In this particular case (the ssl/heartbeat_test.c) the use of __func__
really isn't critical and can easily be changed to not be a C99 __func__
dependency and pass in a test name in the 9 locations rather than the
function name. That would fix the couple of platforms already noted that
had issues.

Tim.

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

Re: [openssl.org #3380] OpenSSL 1.0.1h on SGI IRIX

Mike Bland
On Sat, Jun 7, 2014 at 4:33 AM, Tim Hudson <[hidden email]> wrote:

> On 7/06/2014 4:02 AM, Dr. Stephen Henson wrote:
>> On Fri, Jun 06, 2014, Mike Bland wrote:
>>
>>> __func__ is defined in C99. What version of the SGI C compiler are you
>>> using? According to the following, as of version 7.4, the -c99 flag
>>> should enable this to compile:
>>>
>>> http://www.sgi.com/products/software/irix/tools/c.html
>>>
>> Note that VC++ under Windows doesn't support __func__ either. Well at least
>> the versions I tested didn't.

Unfortunately I know next to nothing about VC++, but perhaps it also
supports a -C99 switch?

> Adding in C99 dependencies in the code will run into a lot of non-C99
> environments which still are being actively used.
> I think it is time to either decide that C99 is now a requirement (and
> there are features in C99 that would be nice to be able to use) or to
> decide that code which uses those features shouldn't go in - i.e. don't
> use those features so that platforms which don't support C99 are still
> supportable.
>
> Either approach leads to things breaking for at least some users ...
>
> In this particular case (the ssl/heartbeat_test.c) the use of __func__
> really isn't critical and can easily be changed to not be a C99 __func__
> dependency and pass in a test name in the 9 locations rather than the
> function name. That would fix the couple of platforms already noted that
> had issues.

I certainly don't want to argue that unit testing alone is sufficient
reason to force the use of C99. (Well, were it my project... ;-) That
said, I imagine there's a lot more than the convenience of __func__ to
be gained from an upgrade. It is a fifteen-year-old standard; I'm just
getting my feet wet with the OpenSSL code, but even in my limited
experience with ssl/heartbeat_test.c, I'm getting a feel for the kind
of workarounds that an upgrade would render unnecessary.

There's already been a recent thread debating whether older platforms
should be supported, or how they should be supported. Since I'm a n00b
here, I don't want to jump into the middle of a debate I don't have
enough context for, but that's how I see things for now.

In the meanwhile, I'm looking into how to work around the lack of
support for __func__ on non-C99 platforms.

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

Re: [openssl.org #3380] OpenSSL 1.0.1h on SGI IRIX

Mike Bland
Just created https://github.com/openssl/openssl/pull/126 with what I
hope is a workable solution.

Mike

On Sat, Jun 7, 2014 at 9:55 AM, Mike Bland <[hidden email]> wrote:

> On Sat, Jun 7, 2014 at 4:33 AM, Tim Hudson <[hidden email]> wrote:
>> On 7/06/2014 4:02 AM, Dr. Stephen Henson wrote:
>>> On Fri, Jun 06, 2014, Mike Bland wrote:
>>>
>>>> __func__ is defined in C99. What version of the SGI C compiler are you
>>>> using? According to the following, as of version 7.4, the -c99 flag
>>>> should enable this to compile:
>>>>
>>>> http://www.sgi.com/products/software/irix/tools/c.html
>>>>
>>> Note that VC++ under Windows doesn't support __func__ either. Well at least
>>> the versions I tested didn't.
>
> Unfortunately I know next to nothing about VC++, but perhaps it also
> supports a -C99 switch?
>
>> Adding in C99 dependencies in the code will run into a lot of non-C99
>> environments which still are being actively used.
>> I think it is time to either decide that C99 is now a requirement (and
>> there are features in C99 that would be nice to be able to use) or to
>> decide that code which uses those features shouldn't go in - i.e. don't
>> use those features so that platforms which don't support C99 are still
>> supportable.
>>
>> Either approach leads to things breaking for at least some users ...
>>
>> In this particular case (the ssl/heartbeat_test.c) the use of __func__
>> really isn't critical and can easily be changed to not be a C99 __func__
>> dependency and pass in a test name in the 9 locations rather than the
>> function name. That would fix the couple of platforms already noted that
>> had issues.
>
> I certainly don't want to argue that unit testing alone is sufficient
> reason to force the use of C99. (Well, were it my project... ;-) That
> said, I imagine there's a lot more than the convenience of __func__ to
> be gained from an upgrade. It is a fifteen-year-old standard; I'm just
> getting my feet wet with the OpenSSL code, but even in my limited
> experience with ssl/heartbeat_test.c, I'm getting a feel for the kind
> of workarounds that an upgrade would render unnecessary.
>
> There's already been a recent thread debating whether older platforms
> should be supported, or how they should be supported. Since I'm a n00b
> here, I don't want to jump into the middle of a debate I don't have
> enough context for, but that's how I see things for now.
>
> In the meanwhile, I'm looking into how to work around the lack of
> support for __func__ on non-C99 platforms.
>
> Mike
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: [openssl.org #3380] OpenSSL 1.0.1h on SGI IRIX

J. J. Farrell-2
From: Mike Bland [mailto:[hidden email]]
Sent: Saturday, June 07, 2014 6:36 PM
>
> Just created https://github.com/openssl/openssl/pull/126 with what I
> hope is a workable solution.

104 +#if __STDC_VERSION__ < 199901L
105 +#define testutil_stringify_helper(s) #s
106 +#define testutil_stringify(s) testutil_stringify_helper(s)
107 +#define TEST_CASE_NAME __FILE__ ":" testutil_stringify(__LINE__)
108 +#elif defined(_MSC_VER)
109 +#define TEST_CASE_NAME __FUNCTION__
110 +#else
111 +#define TEST_CASE_NAME __func__
112 +#endif /* __STDC_VERSION */

The _MSC_VER block will never be used since MSC is does not claim C99 conformance.

#if __STDC_VERSION__ < 199901L
#if defined(_MSC_VER)
#define TEST_CASE_NAME __FUNCTION__
#else
#define testutil_stringify_helper(s) #s
#define testutil_stringify(s) testutil_stringify_helper(s)
#define TEST_CASE_NAME __FILE__ ":" testutil_stringify(__LINE__)
#endif /* _MSC_VER */
#else
#define TEST_CASE_NAME __func__
#endif /* __STDC_VERSION__ */

or similar should do the trick.

Regards,
                       jjf

> On Sat, Jun 7, 2014 at 9:55 AM, Mike Bland <[hidden email]> wrote:
> > On Sat, Jun 7, 2014 at 4:33 AM, Tim Hudson <[hidden email]> wrote:
> >> On 7/06/2014 4:02 AM, Dr. Stephen Henson wrote:
> >>> On Fri, Jun 06, 2014, Mike Bland wrote:
> >>>
> >>>> __func__ is defined in C99. What version of the SGI C compiler are
> you
> >>>> using? According to the following, as of version 7.4, the -c99
> flag
> >>>> should enable this to compile:
> >>>>
> >>>> http://www.sgi.com/products/software/irix/tools/c.html
> >>>>
> >>> Note that VC++ under Windows doesn't support __func__ either. Well
> at least
> >>> the versions I tested didn't.
> >
> > Unfortunately I know next to nothing about VC++, but perhaps it also
> > supports a -C99 switch?
> >
> >> Adding in C99 dependencies in the code will run into a lot of non-
> C99
> >> environments which still are being actively used.
> >> I think it is time to either decide that C99 is now a requirement
> (and
> >> there are features in C99 that would be nice to be able to use) or
> to
> >> decide that code which uses those features shouldn't go in - i.e.
> don't
> >> use those features so that platforms which don't support C99 are
> still
> >> supportable.
> >>
> >> Either approach leads to things breaking for at least some users ...
> >>
> >> In this particular case (the ssl/heartbeat_test.c) the use of
> __func__
> >> really isn't critical and can easily be changed to not be a C99
> __func__
> >> dependency and pass in a test name in the 9 locations rather than
> the
> >> function name. That would fix the couple of platforms already noted
> that
> >> had issues.
> >
> > I certainly don't want to argue that unit testing alone is sufficient
> > reason to force the use of C99. (Well, were it my project... ;-) That
> > said, I imagine there's a lot more than the convenience of __func__
> to
> > be gained from an upgrade. It is a fifteen-year-old standard; I'm
> just
> > getting my feet wet with the OpenSSL code, but even in my limited
> > experience with ssl/heartbeat_test.c, I'm getting a feel for the kind
> > of workarounds that an upgrade would render unnecessary.
> >
> > There's already been a recent thread debating whether older platforms
> > should be supported, or how they should be supported. Since I'm a
> n00b
> > here, I don't want to jump into the middle of a debate I don't have
> > enough context for, but that's how I see things for now.
> >
> > In the meanwhile, I'm looking into how to work around the lack of
> > support for __func__ on non-C99 platforms.
> >
> > Mike
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: [openssl.org #3380] OpenSSL 1.0.1h on SGI IRIX

Mike Bland
On Sat, Jun 7, 2014 at 10:00 PM, Jeremy Farrell
<[hidden email]> wrote:

> From: Mike Bland [mailto:[hidden email]]
> Sent: Saturday, June 07, 2014 6:36 PM
>>
>> Just created https://github.com/openssl/openssl/pull/126 with what I
>> hope is a workable solution.
>
> 104 +#if __STDC_VERSION__ < 199901L
> 105 +#define testutil_stringify_helper(s) #s
> 106 +#define testutil_stringify(s) testutil_stringify_helper(s)
> 107 +#define TEST_CASE_NAME __FILE__ ":" testutil_stringify(__LINE__)
> 108 +#elif defined(_MSC_VER)
> 109 +#define TEST_CASE_NAME __FUNCTION__
> 110 +#else
> 111 +#define TEST_CASE_NAME __func__
> 112 +#endif /* __STDC_VERSION */
>
> The _MSC_VER block will never be used since MSC is does not claim C99 conformance.
>
> #if __STDC_VERSION__ < 199901L
> #if defined(_MSC_VER)
> #define TEST_CASE_NAME __FUNCTION__
> #else
> #define testutil_stringify_helper(s) #s
> #define testutil_stringify(s) testutil_stringify_helper(s)
> #define TEST_CASE_NAME __FILE__ ":" testutil_stringify(__LINE__)
> #endif /* _MSC_VER */
> #else
> #define TEST_CASE_NAME __func__
> #endif /* __STDC_VERSION__ */
>
> or similar should do the trick.

Thanks for that, Jeremy. Done.

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