bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH] use unlocked stdio functions


From: Grisha Levit
Subject: Re: [PATCH] use unlocked stdio functions
Date: Fri, 16 Feb 2024 21:37:00 -0500

After this change, `make -C examples/loadables others` fails building
necho.o with:

    use of undeclared identifier 'fflush_unlocked'

I checked other object files to make sure the expected symbols are used
and they were, except for the loadable pushd.

Also added the dependency where needed in Makefile.in -- do you usually
do these manually or with some tool?

* builtins/pushd.def,examples/loadables/necho.c
- fix include order for unlocked-io
* Makefile.in
- BASHINCFILES,INSTALLED_INCFILES: add missing header files
- $(BASHINCDIR)/unlocked-io.h: add to relevant .o deps
---
 Makefile.in                | 58 ++++++++++++++++++++------------------
 builtins/pushd.def         |  7 ++---
 examples/loadables/necho.c |  2 +-
 3 files changed, 35 insertions(+), 32 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 2f863e86..c621cafc 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -438,7 +438,11 @@ BASHINCFILES =      $(BASHINCDIR)/posixstat.h 
$(BASHINCDIR)/ansi_stdlib.h \
                 $(BASHINCDIR)/posixtime.h $(BASHINCDIR)/systimes.h \
                 $(BASHINCDIR)/unionwait.h $(BASHINCDIR)/maxpath.h \
                 $(BASHINCDIR)/shtty.h $(BASHINCDIR)/typemax.h \
-                $(BASHINCDIR)/ocache.h
+                $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h \
+                $(BASHINCDIR)/gettext.h $(BASHINCDIR)/posixselect.h \
+                $(BASHINCDIR)/shmbchar.h $(BASHINCDIR)/shmbutil.h \
+                $(BASHINCDIR)/stat-time.h $(BASHINCDIR)/timer.h \
+                $(BASHINCDIR)/unlocked-io.h
 
 LIBRARIES = $(GLOB_LIB) $(SHLIB_LIB) $(READLINE_LIB) $(HISTORY_LIB) \
            $(TERMCAP_LIB) $(TILDE_LIB) $(MALLOC_LIB) $(INTL_LIB) $(LIBICONV) \
@@ -487,7 +491,7 @@ INSTALLED_BUILTINS_HEADERS = bashgetopt.h common.h getopt.h
 INSTALLED_INCFILES =    posixstat.h ansi_stdlib.h filecntl.h posixdir.h \
        memalloc.h stdc.h posixjmp.h posixwait.h posixtime.h systimes.h \
        unionwait.h maxpath.h shtty.h typemax.h ocache.h chartypes.h gettext.h \
-       posixstat.h shmbchar.h shmbutil.h stat-time.h
+       shmbchar.h shmbutil.h stat-time.h posixselect.h timer.h unlocked-io.h
 
 # header files chosen based on running of configure
 SIGNAMES_H = @SIGNAMES_H@
@@ -1076,13 +1080,13 @@ error.o: general.h xmalloc.h bashtypes.h variables.h 
arrayfunc.h conftypes.h arr
 error.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
 error.o: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.h
 error.o: input.h execute_cmd.h 
-error.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h assoc.h
+error.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h assoc.h 
$(BASHINCDIR)/unlocked-io.h
 eval.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h trap.h flags.h 
${DEFSRC}/common.h
 eval.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h 
${BASHINCDIR}/stdc.h error.h
 eval.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h 
array.h hashlib.h
 eval.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
 eval.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h
-eval.o: input.h execute_cmd.h 
+eval.o: input.h execute_cmd.h $(BASHINCDIR)/unlocked-io.h
 eval.o: bashhist.h assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h
 execute_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h 
${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
 execute_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h 
command.h ${BASHINCDIR}/stdc.h error.h
@@ -1093,7 +1097,7 @@ execute_cmd.o: ${BASHINCDIR}/memalloc.h ${GRAM_H} flags.h 
builtins.h jobs.h quit
 execute_cmd.o: execute_cmd.h findcmd.h redir.h trap.h test.h pathexp.h
 execute_cmd.o: $(DEFSRC)/common.h ${DEFDIR}/builtext.h 
${GLOB_LIBSRC}/strmatch.h
 execute_cmd.o: ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/chartypes.h
-execute_cmd.o: $(DEFSRC)/getopt.h
+execute_cmd.o: $(DEFSRC)/getopt.h $(BASHINCDIR)/unlocked-io.h
 execute_cmd.o: bashhist.h input.h ${GRAM_H} assoc.h hashcmd.h alias.h
 execute_cmd.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/posixwait.h
 expr.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h 
@@ -1152,7 +1156,7 @@ locale.o: make_cmd.h subst.h sig.h pathnames.h externs.h
 locale.o: ${BASHINCDIR}/chartypes.h
 locale.o: input.h assoc.h ${BASHINCDIR}/ocache.h
 mailcheck.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h 
${BASHINCDIR}/ansi_stdlib.h
-mailcheck.o: ${BASHINCDIR}/posixtime.h
+mailcheck.o: ${BASHINCDIR}/posixtime.h $(BASHINCDIR)/unlocked-io.h
 mailcheck.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h 
command.h ${BASHINCDIR}/stdc.h error.h
 mailcheck.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h 
conftypes.h array.h hashlib.h
 mailcheck.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
@@ -1174,7 +1178,7 @@ y.tab.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h 
dispose_cmd.h
 y.tab.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h execute_cmd.o
 y.tab.o: trap.h flags.h parser.h input.h mailcheck.h $(DEFSRC)/common.h
 y.tab.o: $(DEFDIR)/builtext.h bashline.h bashhist.h jobs.h siglist.h alias.h
-y.tab.o: ${BASHINCDIR}/typemax.h assoc.h ${BASHINCDIR}/ocache.h
+y.tab.o: ${BASHINCDIR}/typemax.h assoc.h ${BASHINCDIR}/ocache.h 
$(BASHINCDIR)/unlocked-io.h
 y.tab.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h 
${BASHINCDIR}/posixwait.h
 pathexp.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
 pathexp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h 
command.h ${BASHINCDIR}/stdc.h error.h
@@ -1191,7 +1195,7 @@ print_cmd.o: general.h xmalloc.h bashtypes.h variables.h 
arrayfunc.h conftypes.h
 print_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
 print_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h 
 print_cmd.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
-print_cmd.o: ${GRAM_H} $(DEFSRC)/common.h
+print_cmd.o: ${GRAM_H} $(DEFSRC)/common.h $(BASHINCDIR)/unlocked-io.h
 print_cmd.o: flags.h input.h assoc.h
 print_cmd.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h
 redir.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h 
${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h
@@ -1199,13 +1203,13 @@ redir.o: ${BASHINCDIR}/memalloc.h shell.h syntax.h 
bashjmp.h ${BASHINCDIR}/posix
 redir.o: general.h xmalloc.h variables.h arrayfunc.h conftypes.h array.h 
hashlib.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h
 redir.o: dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h 
 redir.o: flags.h execute_cmd.h redir.h input.h
-redir.o: ${DEFDIR}/pipesize.h
+redir.o: ${DEFDIR}/pipesize.h $(BASHINCDIR)/unlocked-io.h
 redir.o: trap.h assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h
 shell.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h 
${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h
 shell.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h 
command.h ${BASHINCDIR}/stdc.h error.h
 shell.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h 
array.h hashlib.h
 shell.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
-shell.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h
+shell.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h 
$(BASHINCDIR)/unlocked-io.h
 shell.o: flags.h trap.h mailcheck.h builtins.h $(DEFSRC)/common.h
 shell.o: jobs.h siglist.h input.h execute_cmd.h findcmd.h bashhist.h bashline.h
 shell.o: ${GLOB_LIBSRC}/strmatch.h ${BASHINCDIR}/posixtime.h 
${BASHINCDIR}/posixwait.h
@@ -1216,7 +1220,7 @@ sig.o: general.h xmalloc.h bashtypes.h variables.h 
arrayfunc.h conftypes.h array
 sig.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
 sig.o: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.h
 sig.o: jobs.h siglist.h trap.h $(DEFSRC)/common.h bashline.h bashhist.h
-sig.o: ${DEFDIR}/builtext.h
+sig.o: ${DEFDIR}/builtext.h $(BASHINCDIR)/unlocked-io.h
 siglist.o: config.h bashtypes.h siglist.h trap.h 
 stringlib.o: bashtypes.h ${BASHINCDIR}/chartypes.h
 stringlib.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h 
command.h ${BASHINCDIR}/stdc.h error.h
@@ -1235,7 +1239,7 @@ subst.o: mailcheck.h input.h $(DEFSRC)/getopt.h 
$(DEFSRC)/common.h
 subst.o: bashline.h bashhist.h ${GLOB_LIBSRC}/strmatch.h
 subst.o: ${BASHINCDIR}/chartypes.h
 subst.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
-subst.o: ${DEFDIR}/builtext.h
+subst.o: ${DEFDIR}/builtext.h $(BASHINCDIR)/unlocked-io.h
 test.o: bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
 test.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h 
${BASHINCDIR}/stdc.h error.h
 test.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h 
array.h hashlib.h
@@ -1278,7 +1282,7 @@ jobs.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h 
dispose_cmd.h parser.h
 jobs.o: execute_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h 
 jobs.o: jobs.h flags.h $(DEFSRC)/common.h $(DEFDIR)/builtext.h
 jobs.o: ${BASHINCDIR}/posixwait.h ${BASHINCDIR}/unionwait.h
-jobs.o: ${BASHINCDIR}/posixtime.h
+jobs.o: ${BASHINCDIR}/posixtime.h $(BASHINCDIR)/unlocked-io.h
 jobs.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h 
$(BASHINCDIR)/typemax.h
 nojobs.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h bashjmp.h 
${BASHINCDIR}/posixjmp.h
 nojobs.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h jobs.h quit.h 
siglist.h externs.h
@@ -1344,7 +1348,7 @@ pcomplete.o: config.h bashansi.h 
${BASHINCDIR}/ansi_stdlib.h bashtypes.h
 pcomplete.o: ${BASHINCDIR}/stdc.h hashlib.h pcomplete.h shell.h syntax.h
 pcomplete.o: bashjmp.h command.h general.h xmalloc.h error.h variables.h
 pcomplete.o: execute_cmd.h pathexp.h arrayfunc.h conftypes.h quit.h trap.h
-pcomplete.o: jobs.h siglist.h bashline.h alias.h
+pcomplete.o: jobs.h siglist.h bashline.h alias.h $(BASHINCDIR)/unlocked-io.h
 pcomplete.o: ${BASHINCDIR}/posixwait.h ${BASHINCDIR}/unionwait.h
 pcomplete.o: ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/posixstat.h
 pcomplete.o: unwind_prot.h dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h
@@ -1374,7 +1378,7 @@ bashline.o: trap.h flags.h assoc.h $(BASHINCDIR)/ocache.h
 bashline.o: $(DEFSRC)/common.h $(GLOB_LIBSRC)/glob.h alias.h
 bashline.o: pcomplete.h ${BASHINCDIR}/chartypes.h input.h
 bashline.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
-bashline.o: ${DEFDIR}/builtext.h
+bashline.o: ${DEFDIR}/builtext.h $(BASHINCDIR)/unlocked-io.h
 bracecomp.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
 bracecomp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h
 bracecomp.o: command.h ${BASHINCDIR}/stdc.h error.h
@@ -1488,7 +1492,7 @@ builtins/common.o: quit.h unwind_prot.h 
${BASHINCDIR}/maxpath.h jobs.h builtins.
 builtins/common.o: dispose_cmd.h make_cmd.h subst.h externs.h bashhist.h 
 builtins/common.o: execute_cmd.h ${BASHINCDIR}/stdc.h general.h xmalloc.h 
error.h pathnames.h
 builtins/common.o: ${DEFDIR}/builtext.h parser.h
-builtins/common.o: ${BASHINCDIR}/chartypes.h
+builtins/common.o: ${BASHINCDIR}/chartypes.h $(BASHINCDIR)/unlocked-io.h
 builtins/evalfile.o: bashtypes.h ${BASHINCDIR}/posixstat.h 
${BASHINCDIR}/filecntl.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
 builtins/evalfile.o: shell.h syntax.h config.h bashjmp.h command.h general.h 
xmalloc.h error.h
 builtins/evalfile.o: variables.h arrayfunc.h conftypes.h quit.h 
${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
@@ -1557,7 +1561,7 @@ builtins/echo.o: command.h config.h 
${BASHINCDIR}/memalloc.h error.h general.h x
 builtins/echo.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
 builtins/echo.o: dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
 builtins/echo.o: pathnames.h
-builtins/echo.o: $(DEFSRC)/common.h
+builtins/echo.o: $(DEFSRC)/common.h $(BASHINCDIR)/unlocked-io.h
 builtins/enable.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h 
general.h xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/enable.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
 builtins/enable.o: dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
@@ -1577,14 +1581,14 @@ builtins/exit.o: command.h config.h 
${BASHINCDIR}/memalloc.h error.h general.h x
 builtins/exit.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
 builtins/exit.o: dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
 builtins/exit.o: pathnames.h execute_cmd.h
-builtins/exit.o: ${DEFDIR}/builtext.h
+builtins/exit.o: ${DEFDIR}/builtext.h $(BASHINCDIR)/unlocked-io.h
 builtins/fc.o: bashtypes.h ${BASHINCDIR}/posixstat.h
 builtins/fc.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h builtins.h command.h 
${BASHINCDIR}/stdc.h 
 builtins/fc.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h 
xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/fc.o: flags.h unwind_prot.h variables.h arrayfunc.h conftypes.h 
shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
 builtins/fc.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h 
quit.h 
 builtins/fc.o: $(DEFSRC)/bashgetopt.h bashhist.h pathnames.h parser.h
-builtins/fc.o: ${BASHINCDIR}/chartypes.h
+builtins/fc.o: ${BASHINCDIR}/chartypes.h $(BASHINCDIR)/unlocked-io.h
 builtins/fg_bg.o: bashtypes.h $(DEFSRC)/bashgetopt.h 
 builtins/fg_bg.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h 
general.h xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/fg_bg.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
@@ -1598,17 +1602,17 @@ builtins/hash.o: bashtypes.h execute_cmd.h
 builtins/hash.o: builtins.h command.h findcmd.h ${BASHINCDIR}/stdc.h 
$(DEFSRC)/common.h
 builtins/hash.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h 
xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/hash.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h 
-builtins/hash.o: pathnames.h
+builtins/hash.o: pathnames.h $(BASHINCDIR)/unlocked-io.h
 builtins/help.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h 
xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/help.o: dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
 builtins/help.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h
-builtins/help.o: conftypes.h quit.h execute_cmd.h
+builtins/help.o: conftypes.h quit.h execute_cmd.h $(BASHINCDIR)/unlocked-io.h
 builtins/help.o: $(GLOB_LIBSRC)/glob.h pathnames.h
 builtins/history.o: bashtypes.h pathnames.h parser.h
 builtins/history.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h 
general.h xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/history.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
 builtins/history.o: ${BASHINCDIR}/filecntl.h shell.h syntax.h bashjmp.h 
${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h
-builtins/history.o: bashhist.h variables.h arrayfunc.h conftypes.h 
+builtins/history.o: bashhist.h variables.h arrayfunc.h conftypes.h 
$(BASHINCDIR)/unlocked-io.h
 builtins/inlib.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h 
general.h xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/inlib.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h 
 builtins/inlib.o: dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
@@ -1625,23 +1629,23 @@ builtins/kill.o: pathnames.h
 builtins/let.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h 
xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/let.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
 builtins/let.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h 
-builtins/let.o: pathnames.h
+builtins/let.o: pathnames.h $(BASHINCDIR)/unlocked-io.h
 builtins/printf.o: config.h ${BASHINCDIR}/memalloc.h bashjmp.h command.h 
error.h
 builtins/printf.o: general.h xmalloc.h quit.h dispose_cmd.h make_cmd.h subst.h
 builtins/printf.o: externs.h sig.h pathnames.h shell.h syntax.h unwind_prot.h
 builtins/printf.o: variables.h arrayfunc.h conftypes.h ${BASHINCDIR}/stdc.h 
$(DEFSRC)/bashgetopt.h
 builtins/printf.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
-builtins/printf.o: ${BASHINCDIR}/chartypes.h 
+builtins/printf.o: ${BASHINCDIR}/chartypes.h $(BASHINCDIR)/unlocked-io.h
 builtins/pushd.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h 
general.h xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/pushd.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
 builtins/pushd.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h
 builtins/pushd.o: $(DEFSRC)/common.h pathnames.h
-builtins/pushd.o: ${DEFDIR}/builtext.h
+builtins/pushd.o: ${DEFDIR}/builtext.h $(BASHINCDIR)/unlocked-io.h
 builtins/read.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h 
xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/read.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
 builtins/read.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h 
 builtins/read.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h
-builtins/read.o: pathnames.h
+builtins/read.o: pathnames.h $(BASHINCDIR)/unlocked-io.h
 builtins/return.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h 
general.h xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/return.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
 builtins/return.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h 
@@ -1681,7 +1685,7 @@ builtins/test.o: execute_cmd.h test.h pathnames.h
 builtins/times.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h 
general.h xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/times.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h 
${BASHINCDIR}/stdc.h
 builtins/times.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h 
-builtins/times.o: pathnames.h
+builtins/times.o: pathnames.h $(BASHINCDIR)/unlocked-io.h
 builtins/trap.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h 
xmalloc.h ${BASHINCDIR}/maxpath.h
 builtins/trap.o: quit.h $(DEFSRC)/common.h
 builtins/trap.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h 
unwind_prot.h variables.h arrayfunc.h conftypes.h 
diff --git a/builtins/pushd.def b/builtins/pushd.def
index d0625e3d..ece66b7f 100644
--- a/builtins/pushd.def
+++ b/builtins/pushd.def
@@ -116,6 +116,9 @@ $END
 #include <config.h>
 
 #if defined (PUSHD_AND_POPD)
+#ifdef LOADABLE_BUILTIN
+#  include "builtins.h"
+#endif
 #include <stdio.h>
 #if defined (HAVE_SYS_PARAM_H)
 #  include <sys/param.h>
@@ -140,10 +143,6 @@ $END
 #include "common.h"
 #include "builtext.h"
 
-#ifdef LOADABLE_BUILTIN
-#  include "builtins.h"
-#endif
-
 #if !defined (errno)
 extern int errno;
 #endif /* !errno */
diff --git a/examples/loadables/necho.c b/examples/loadables/necho.c
index 46386674..e59224f2 100644
--- a/examples/loadables/necho.c
+++ b/examples/loadables/necho.c
@@ -21,9 +21,9 @@
    along with Bash.  If not, see <http://www.gnu.org/licenses/>.
 */
 
-#include <stdio.h>
 #include "builtins.h"
 #include "shell.h"
+#include <stdio.h>
 
 int
 necho_builtin (WORD_LIST *list)
-- 
2.43.2




reply via email to

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