bug-bash
[Top][All Lists]
Advanced

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

declaration of dollar_dollar_pid


From: Kiyoshi KANAZAWA
Subject: declaration of dollar_dollar_pid
Date: Tue, 8 Jan 2019 13:21:24 +0900 (JST)

Hello,
Trying to install bash-5.0 and have error in 'make install' phase.


$ uname -a
SunOS hidden 5.11 11.3 i86pc i386 i86pc


$ gcc --version
gcc (GCC) 7.4.0

$ ./configure --prefix=/tmp/local CC=gcc CXX=g++
$ make
$ make check
$ make install
    :
gcc -shared -Wl,-i -Wl,-h,sync   -o sync sync.o 
gcc -fpic -DHAVE_CONFIG_H -DSHELL -DSOLARIS -g -O2 -Wno-parentheses 
-Wno-format-security -I. -I.. -I../.. -I../../lib -I../../builtins -I. 
-I../../include -I/tmp/bash-5.0 -I/tmp/bash-5.0/lib -I/tmp/bash-5.0/builtins  
-c -o push.o push.c
push.c:38:12: error: conflicting types for 'dollar_dollar_pid'
 extern int dollar_dollar_pid;
            ^~~~~~~~~~~~~~~~~
In file included from ../../shell.h:31:0,
                 from push.c:29:
../../variables.h:251:14: note: previous declaration of 'dollar_dollar_pid' was 
here
 extern pid_t dollar_dollar_pid;
              ^~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:100: push.o] Error 1
make[1]: Leaving directory '/tmp/bash-5.0/examples/loadables'
make: [Makefile:824: install] Error 2 (ignored)



I wonder why it is not detected on 'make' or 'make check' phase.
Anyway, can be fixed with

--- sample fix from here ---

diff -ur ../bash-5.0.orig/examples/loadables/push.c ./examples/loadables/push.c
--- ../bash-5.0.orig/examples/loadables/push.c  2017-06-20 23:54:52.000000000 
+0000
+++ ./examples/loadables/push.c 2019-01-08 12:48:03.903548202 +0000
@@ -35,7 +35,7 @@
 extern int errno;
 #endif
 
-extern int dollar_dollar_pid;
+extern pid_t dollar_dollar_pid;
 extern int last_command_exit_value;
 
 int
--- sample fix till here ---

--- Kiyoshi



reply via email to

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