bug-bash
[Top][All Lists]
Advanced

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

Re: siglist.c fails to compile for bash-5.1.8 on HP-UX


From: Osipov, Michael (LDA IT PLM)
Subject: Re: siglist.c fails to compile for bash-5.1.8 on HP-UX
Date: Tue, 17 Aug 2021 17:15:33 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0

Am 2021-08-17 um 16:36 schrieb Chet Ramey:
On 8/17/21 8:03 AM, Osipov, Michael (LDA IT PLM) wrote:
Folks,

my compiler (aCC) tells me:
/opt/aCC/bin/aCC -Ae  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"ia64"'
-DCONF_OSTYPE='"hpux11.31"' -DCONF_MACHTYPE='"ia64-hp-hpux11.31"'
-DCONF_VENDOR='"hp"' -DLOCALEDIR='"/opt/ports/share/locale"'
-DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DHPUX -DTGETENT_BROKEN
-DTGETFLAG_BROKEN   -I.  -I. -I./include -I./lib   -I/opt/ports/include
-g   -c siglist.c
"general.h", line 221: error #2020: identifier "WORD_DESC" is undefined
   typedef int sh_wdesc_func_t PARAMS((WORD_DESC *));
                                       ^

"general.h", line 222: error #2020: identifier "WORD_LIST" is undefined
   typedef int sh_wlist_func_t PARAMS((WORD_LIST *));
                                       ^

"general.h", line 240: error #2020: identifier "WORD_DESC" is undefined
   typedef int sh_wassign_func_t PARAMS((WORD_DESC *, int));
                                         ^

"general.h", line 245: error #2020: identifier "WORD_LIST" is undefined
   typedef int sh_builtin_func_t PARAMS((WORD_LIST *)); /* sh_wlist_func_t */
                                         ^

"general.h", line 323: error #2020: identifier "WORD_DESC" is undefined
   extern int check_identifier PARAMS((WORD_DESC *, int));
                                       ^

5 errors detected in the compilation of "siglist.c".
gmake: *** [Makefile:101: siglist.o] Error 2

Weird. I have added #include "command.h" right after chartypes.h in general.h

Known issue? Platform-specific?

I think this is an HP-UX specific issue. It's the rare system that lacks
sys_siglist *and* strsignal(), so any fix should be in siglist.c. Does
adding the include of command.h before including general.h in siglist.c
work?

Right, I remember fixing the same issue about three years ago in Python [1].

This patch works for me:
diff -ur siglist.c siglist.c
--- siglist.c   2019-09-16 17:13:28 +0000
+++ siglist.c   2021-08-17 17:02:54 +0000
@@ -23,6 +23,7 @@
 #if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_UNDER_SYS_SIGLIST) && 
!defined (HAVE_STRSIGNAL)
#include <stdio.h>
+#include "command.h"
 #include "general.h"
 #include <signal.h>

I don't know whether this is a general include issue, but please consider upstreaming if it is.

Michael

[1] https://github.com/python/cpython/commit/48ce4897f8f8d91d948ecd1241ffab002df2be9e



reply via email to

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