bug-gnulib
[Top][All Lists]
Advanced

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

request for update to z/OS progname


From: Mike Fulton
Subject: request for update to z/OS progname
Date: Tue, 30 May 2023 20:06:09 -0700

Hello,

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;
                 }
             }

This is lines 213 to 220 of my version of the code - which I believe is current.

The __e2a_s function will convert from EBCDIC 1047 to ASCII ISO8859-1. The program name is not locale sensitive. 

Specifically, I am patching this code for man-db so that it operates correctly, and this would let me eliminate this patch. 

Thanks, Mike

reply via email to

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