bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: request for update to z/OS progname


From: Bruno Haible
Subject: Re: request for update to z/OS progname
Date: Wed, 31 May 2023 14:17:12 +0200

Hello Mike,

> In getprogname.c, there is a section of code delimited by
> 
> # elif __MVS__
> ...
> #elif defined __sgi || defined __osf__
> 
> I would like to request a patch so that code built in ASCII mode will
> operate correctly.
> Currently, the program name returned is always in EBCDIC. This can be fixed
> with the
> patch:
> 
>                if (token > 0 && buf.ps_pid == pid)
>                  {
>                    char *s = strdup (last_component (buf.ps_pathptr));
> -                  if (s)
> +                  if (s) {
>                      p = s;
> +#if (__CHARSET_LIB == 1)
> +                    __e2a_s(p);
> +#endif
> +                  }
>                    break;
>                  }
>              }

The __e2a_s documentation [1] says:
  "This function is valid for applications compiled XPLINK only."
What does it mean? Can we use it anyway? Or should the #if be changed to
  #if defined __XPLINK__ && __CHARSET_LIB == 1

Bruno

[1] 
https://www.ibm.com/docs/en/zos/2.2.0?topic=functions-e2a-s-convert-string-from-ebcdic-ascii






reply via email to

[Prev in Thread] Current Thread [Next in Thread]