* lib/getprogname.c: Treat __osf__ like __sgi, except
with /proc/123 instead of /proc/pinfo/123.
+2021-05-22 Larkin Nickle <me@larbob.org> (tiny change)
+
+ getprogname: port to Tru64
+ * lib/getprogname.c: Treat __osf__ like __sgi, except
+ with /proc/123 instead of /proc/pinfo/123.
+
2021-05-21 Paul Eggert <eggert@cs.ucla.edu>
sigsegv: don’t assume SIGSTKSZ is a constant
# include <string.h>
#endif
-#ifdef __sgi
+#if defined __sgi || defined __osf__
# include <string.h>
# include <unistd.h>
# include <stdio.h>
free (buf.ps_pathptr);
}
return p;
-# elif defined __sgi /* IRIX */
+# elif defined __sgi || defined __osf__ /* IRIX or Tru64 */
char filename[50];
int fd;
- sprintf (filename, "/proc/pinfo/%d", (int) getpid ());
+ # if defined __sgi
+ sprintf (filename, "/proc/pinfo/%d", (int) getpid ());
+ # else
+ sprintf (filename, "/proc/%d", (int) getpid ());
+ # endif
fd = open (filename, O_RDONLY | O_CLOEXEC);
if (0 <= fd)
{