[Top][All Lists]

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

getprocname Tru64

From: Jay K
Subject: getprocname Tru64
Date: Tue, 29 Jun 2021 08:24:53 +0000

I see I lost the race here, but here is my rendition of getprogname for Tru64, 
much more efficient.

> diff -c getprogname.c.orig getprogname.c
*** getprogname.c.orig  Tue Jun 29 03:46:44 2021
--- getprogname.c       Tue Jun 29 03:48:55 2021
*** 283,288 ****
--- 283,291 ----
        close (fd);
    return "?";
+ # elif defined __osf__
+   extern char** __Argv;
+   return last_component (__Argv[0]);
  # else

I came to this by:
1: Looked in old gcc to find:
#define MD_STARTFILE_PREFIX "/usr/lib/cmplrs/cc/"

2: grep/nm/dis there.

I had hoped to step through the startup but haven't learned this dbx yet.

There is also maybe "auxv" stuff.

I find the proc file system kinda gross and inefficient but yeah.

Thank you,
 - Jay

reply via email to

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