* Fwd: Port getprogname module to Tru64 [not found] <bd1ab32a-8c9e-ef69-1e5f-58673fe77e7c@larbob.org> @ 2021-05-22 6:40 ` Larkin Nickle 2021-05-22 6:54 ` Larkin Nickle 0 siblings, 1 reply; 5+ messages in thread From: Larkin Nickle @ 2021-05-22 6:40 UTC (permalink / raw) To: bug-gnulib This patch allows getprogname to work under Tru64. This has been tested on Tru64 5.1B-6 with success. Larkin --- lib/getprogname.c 2021-05-22 02:27:02.835632500 -0400 +++ lib/getprogname.c.patched 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) { ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Port getprogname module to Tru64 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 0 siblings, 1 reply; 5+ messages in thread From: Larkin Nickle @ 2021-05-22 6:54 UTC (permalink / raw) To: bug-gnulib On 2021-05-22 02:40, Larkin Nickle wrote: > This patch allows getprogname to work under Tru64. This has been tested > on Tru64 5.1B-6 with success. > > Larkin > > ... Oops, the last patch has a bad header. This should be fixed. :) Larkin --- 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) { ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Port getprogname module to Tru64 2021-05-22 6:54 ` Larkin Nickle @ 2021-05-22 14:52 ` Bruno Haible 2021-05-22 17:41 ` Larkin Nickle 0 siblings, 1 reply; 5+ messages in thread From: Bruno Haible @ 2021-05-22 14:52 UTC (permalink / raw) To: bug-gnulib; +Cc: Larkin Nickle Hi, Larkin Nickle wrote: > > This patch allows getprogname to work under Tru64. This has been tested > > on Tru64 5.1B-6 with success. Tru64 is unsupported by gnulib, see <https://www.gnu.org/software/gnulib/manual/html_node/Formerly-Supported-Platforms.html> If you provide patches that work and are otherwise good, we may apply them, though. > --- a/lib/getprogname.c 2021-05-22 02:27:02.835632500 -0400 > +++ b/lib/getprogname.c 2021-05-22 02:33:55.003154200 -0400 This patch was mangled by your mailer. Please send patches as attachments to the mail, not inline in the mail. Bruno ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Port getprogname module to Tru64 2021-05-22 14:52 ` Bruno Haible @ 2021-05-22 17:41 ` Larkin Nickle 2021-05-22 19:19 ` Paul Eggert 0 siblings, 1 reply; 5+ messages in thread From: Larkin Nickle @ 2021-05-22 17:41 UTC (permalink / raw) To: Bruno Haible, bug-gnulib [-- 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) { ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Fwd: Port getprogname module to Tru64 2021-05-22 17:41 ` Larkin Nickle @ 2021-05-22 19:19 ` Paul Eggert 0 siblings, 0 replies; 5+ messages in thread From: Paul Eggert @ 2021-05-22 19:19 UTC (permalink / raw) To: Larkin Nickle; +Cc: Gnulib bugs Thanks, I installed that in your name. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-05-22 19:19 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [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 2021-05-22 19:19 ` Paul Eggert
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).