[Top][All Lists]

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

Re: getprogname fails randomly on PA-RISC HPUX 11.11 with 64-bit kernel

From: Bruno Haible
Subject: Re: getprogname fails randomly on PA-RISC HPUX 11.11 with 64-bit kernel
Date: Wed, 22 Sep 2021 21:49:58 +0200

Hi John Dave,

According to
versions < 11.31 of HP-UX are already past end-of-support for more than
5 years. The only possibly relevant HP-UX version nowadays is 11.31.

Therefore I would not want to spend time on the earlier versions.

We have already declared HP-UX as being unsupported in Gnulib:
(The reason is that I no longer have access to an HP-UX machine.)
But if you come up with reasonable patches for HP-UX 11.31 and actively
maintain this configuration (e.g. through regular builds of gnulib testdirs
or coreutils or such), we might add it back into the category of supported

Regarding this particular patch:

> --- getprogname.c.save        2021-09-19 15:28:26 +0000
> +++ getprogname.c     2021-09-22 13:35:07 +0000
> @@ -155,7 +155,12 @@
>               as above, but in a compilation unit where '#define _PSTAT64 1'
>               is in effect.  I prefer a single compilation unit; the struct
>               size and the offsets are not going to change.  */
> +#    ifdef __hppa__
> +          char status64[1176];
> +#    else
>            char status64[1216];
> +#    endif
> +          int __pstat_getproc64 (char *, size_t, size_t, int);
>            if (__pstat_getproc64 (status64, sizeof status64, 0, pid) > 0)
>              {
>                char *ucomm = status64 + 288;

Are you sure the struct size depends on the CPU type, not on the HP-UX version?
(I don't remember whether I tested this on both HPPA and IA64 hardware.)
And are you sure the offsets are correct in the smaller struct?

Not being sure, it would be more maintainable to move this code into a
separate compilation unit, getprogname-hpux32.c, which would define
_PSTAT64 to 1 before including the system headers.


reply via email to

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