Missing "defined" in stdlib.h on IA64?

Post Reply

Topic author
sms
Master
Posts: 398
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Missing "defined" in stdlib.h on IA64?

Post by sms » Wed May 22, 2024 1:21 pm

Code: Select all

ITS $ cc /version
VSI C V7.4-001 on OpenVMS IA64 V8.4-2L3


   OpenSSL 3.3.0 build failed.  Simple test case:

ITS $ type stdlib_xoe.c
#define _XOPEN_SOURCE_EXTENDED

#include <stdlib.h>
ITS $ 

ITS $ cc stdlib_xoe.c

#if defined _XOPEN_SOURCE || _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE
....................................................^
%CC-W-BADCONSTEXPR, Syntax error in constant expression.
at line number 283 in module STDLIB of text library SYS$COMMON:[SYSLIB]DECC$RTLDEF.TLB;1


   Apparently, that:
      || _XOPEN_SOURCE_EXTENDED ||
should be:
      || defined _XOPEN_SOURCE_EXTENDED ||
(like every other occurrence of _XOPEN_SOURCE_EXTENDED).


ITS $ gdiff  decc_include:stdlib.h stdlib.h
283c283
< #if defined _XOPEN_SOURCE || _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE
---
> #if defined _XOPEN_SOURCE || defined _XOPEN_SOURCE_EXTENDED || !defined _ANSI_C_SOURCE

ITS $ gdiff stdlib_xoe.c stdlib_xoe_s.c
3c3
< #include <stdlib.h>
---
> #include "stdlib.h"

ITS $ cc stdlib_xoe_s.c
ITS $ 


   I haven't tried it on Alpha, but it seems to be better here:

V87 $ cc /version
VSI C x86-64 V7.5-009 (GEM 50XBR) on OpenVMS x86_64 V9.2-2  


   Is this fix in some patch/update/version of something to which
peon-access is denied, or am I not doing _my_ job?


pustovetov
VSI Expert
Contributor
Posts: 24
Joined: Thu Sep 14, 2023 1:26 am
Reputation: 0
Status: Offline

Re: Missing "defined" in stdlib.h on IA64?

Post by pustovetov » Wed May 22, 2024 1:57 pm

sms wrote:
Wed May 22, 2024 1:21 pm
Is this fix in some patch/update/version of something to which
peon-access is denied, or am I not doing _my_ job?
I fixed the bug on 27-Sep-2023. So for non-x86 platforms, the fix will be delivered in RTL ECO9.


Topic author
sms
Master
Posts: 398
Joined: Fri Aug 21, 2020 5:18 pm
Reputation: 0
Status: Offline

Re: Missing "defined" in stdlib.h on IA64?

Post by sms » Wed May 22, 2024 6:53 pm

Code: Select all

> I fixed the bug [...]

   Thanks for the info.

> [...] the fix will be delivered in RTL ECO9.

   That may or may not affect me, but, while I hold my breath, I can
cope with LIBRARY /REPLACE.  And there're now things for a Web search to
find.

Post Reply