Hi Yes - good point - this would not work if it was built in 31-bit addressing mode, non-XPLINK. 64-bit is always XPLINK. That would be a good addition.
On Wed, May 31, 2023 at 5:17 AM Bruno Haible <br...@clisp.org> wrote: > 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 > > > >