From: Larkin Nickle <me@larbob.org>
To: Bruno Haible <bruno@clisp.org>, bug-gnulib@gnu.org
Subject: Re: Fwd: Port getprogname module to Tru64
Date: Sat, 22 May 2021 13:41:56 -0400 [thread overview]
Message-ID: <9d5c1c74-0e44-b125-90e9-650052913f36@larbob.org> (raw)
In-Reply-To: <64870961.mrgUxqqVJz@omega>
[-- Attachment #1: Type: text/plain, Size: 245 bytes --]
On 2021-05-22 10:52, Bruno Haible wrote:
> This patch was mangled by your mailer. Please send patches as attachments
> to the mail, not inline in the mail.
>
> Bruno
>
Sure. I've attached the patch, which is working in my testing.
Larkin
[-- Attachment #2: getprogname_tru64.diff --]
[-- Type: text/plain, Size: 847 bytes --]
--- a/lib/getprogname.c 2021-05-22 02:27:02.835632500 -0400
+++ b/lib/getprogname.c 2021-05-22 02:33:55.003154200 -0400
@@ -43,7 +43,7 @@
# include <string.h>
#endif
-#ifdef __sgi
+#if defined __sgi || defined __osf__
# include <string.h>
# include <unistd.h>
# include <stdio.h>
@@ -224,11 +224,15 @@
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)
{
next prev parent reply other threads:[~2021-05-22 17:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bd1ab32a-8c9e-ef69-1e5f-58673fe77e7c@larbob.org>
2021-05-22 6:40 ` Fwd: Port getprogname module to Tru64 Larkin Nickle
2021-05-22 6:54 ` Larkin Nickle
2021-05-22 14:52 ` Bruno Haible
2021-05-22 17:41 ` Larkin Nickle [this message]
2021-05-22 19:19 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9d5c1c74-0e44-b125-90e9-650052913f36@larbob.org \
--to=me@larbob.org \
--cc=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).