diff --git a/bash-5.1/.cargo/config.toml b/bash-5.1/.cargo/config.toml index 11bdee268c6482560d4bb54326142673fb3ff073..75e93c385bd56c7098600e76ed55f0e9128d965c 100644 --- a/bash-5.1/.cargo/config.toml +++ b/bash-5.1/.cargo/config.toml @@ -1,3 +1,4 @@ + [source.crates-io] replace-with = "vendored-sources" diff --git a/bash-5.1/1.sh b/bash-5.1/1.sh new file mode 100755 index 0000000000000000000000000000000000000000..bcc830c919ba01181ba3fec57fe993de260c3a29 --- /dev/null +++ b/bash-5.1/1.sh @@ -0,0 +1,21 @@ +cd /home/huan/gerrit/bash/ +git log --pretty=format:"%H $ %s" >2 +cat 2|tac >1 + +while read line ; do echo $line|awk -F'$' '{ +print " cd /home/huan/gerrit/utshell/ ; "; +print " git checkout master; git pull ;"; +print " git checkout -b " $1 " ; "; +print " cd /home/tong/src/bash/ ;"; +print "git reset --hard ",$1," ; "; +print "cp -r /home/huan/gerrit/bash/* /home/huan/gerrit/utshell/"; +print "cd /home/huan/gerrit/utshell/"; +print "echo \"" $1 "\" >> record.txt"; +print "git add .;" +print "git commit -m \"" , $2,"\""; +print "git push --set-upstream origin " $1; +print "git checkout master; "; +print "cd /home/huan/gerrit/bash "; +print "sleep 10"; +print "read" +}' ; done < ../1>./1.sh diff --git a/bash-5.1/Makefile b/bash-5.1/Makefile deleted file mode 100644 index 158066deeff8e7ea606953e70fbe550128e864b3..0000000000000000000000000000000000000000 --- a/bash-5.1/Makefile +++ /dev/null @@ -1,1754 +0,0 @@ -# Makefile for bash-5.0, version 4.30 -# -# Copyright (C) 1996-2018 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# Make sure the first target in the makefile is the right one -all: .made - -PACKAGE = rash -VERSION = 0.1-release - -PACKAGE_BUGREPORT = bug-rash@gnu.org -PACKAGE_NAME = rash -PACKAGE_STRING = rash 0.1-release -PACKAGE_VERSION = 0.1-release - -PACKAGE_TARNAME = rash - -# Include some boilerplate Gnu makefile definitions. -prefix = /usr/local - -exec_prefix = ${prefix} - -datarootdir = ${prefix}/share - -bindir = ${exec_prefix}/bin -libdir = ${exec_prefix}/lib -infodir = ${datarootdir}/info -includedir = ${prefix}/include -datadir = ${datarootdir} -localedir = ${datarootdir}/locale -pkgconfigdir = ${libdir}/pkgconfig - -loadablesdir = ${libdir}/bash -headersdir = $(includedir)/$(PACKAGE_NAME) - -docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} - -mandir = ${datarootdir}/man -manpfx = man - -man1ext = .1 -man1dir = $(mandir)/$(manpfx)1 -man3ext = .3 -man3dir = $(mandir)/$(manpfx)3 - -htmldir = ${docdir} - -# Support an alternate destination root directory for package building -DESTDIR = - -topdir = . -BUILD_DIR = /home/tong/src/bash/bash-5.1 -top_builddir = /home/tong/src/bash/bash-5.1 -srcdir = . - - - -CC = gcc -CC_FOR_BUILD = $(CC) -YACC = bison -y -SHELL = /bin/sh -CP = cp -RM = rm -f -AR = ar -ARFLAGS = cr -RANLIB = ranlib -SIZE = size -STRIP = strip - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 -INSTALLMODE= -m 0755 -INSTALLMODE2 = -m 0555 - -TESTSCRIPT = run-all - -DEBUGGER_START_FILE = ${datadir}/bashdb/bashdb-main.inc - -#If you have purify, and want to use it, run the make as `make PURIFY=purify' -#PURIFY = @PURIFY@ - -# Here is a rule for making .o files from .c files that does not -# force the type of the machine (like -M_MACHINE) into the flags. -.c.o: - $(RM) $@ - $(CC) $(CCFLAGS) -c $< - -EXEEXT = -OBJEXT = o - -# The name of this program and some version information. -VERSPROG = rashversion$(EXEEXT) -VERSOBJ = rashversion.$(OBJEXT) - -Program = rash$(EXEEXT) -Version = 0.1 -PatchLevel = `$(BUILD_DIR)/$(VERSPROG) -p` -RELSTATUS = release - -Machine = x86_64 -OS = linux-gnu -VENDOR = pc -MACHTYPE = x86_64-pc-linux-gnu - -# comment out for release -DEBUG = -MALLOC_DEBUG = - -THIS_SH = $(BUILD_DIR)/$(Program) - -# PROFILE_FLAGS is either -pg, to generate profiling info for use -# with gprof, or nothing (the default). -PROFILE_FLAGS= - -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -Wl,--copy-dt-needed-entries -CFLAGS_FOR_BUILD = -g -O2 -Wno-parentheses -Wno-format-security -CPPFLAGS = -CPPFLAGS_FOR_BUILD = -LOCAL_CFLAGS = ${DEBUG} ${MALLOC_DEBUG} -DEFS = -DHAVE_CONFIG_H -LOCAL_DEFS = -DSHELL - -LOCALE_DEFS = -DLOCALEDIR='"$(localedir)"' -DPACKAGE='"$(PACKAGE)"' - -LOCAL_LIBS = - -LIBS = $(BUILTINS_LIB) $(LIBRARIES) -ldl -lrt -lpthread -L./target/debug -lralias -lrbind -lrbreak -lrbuiltin -lrcaller -lrcd -lrcolon -lrcommon -lcommand -lrcomplete -lrdeclare -lrecho -lrenable -lreval -lrexec -lrexit -lrfc -lrfg_bg -lrgetopts -lrhash -lrexit -lrhelp -lrhistory -lrjobs -lrkill -lrmapfile -lrpushd -lrread -lrlet -lrreturn -lrset -lrsetattr -lrshift -lrshopt -lrsource -lrsuspend -lrtest -lrtimes -lrtrap -lrtype -lrulimit -lrumask -lrwait -lrprintf -lrexec_cmd -LIBS_FOR_BUILD = - -STATIC_LD = -LOCAL_LDFLAGS = -rdynamic - -SYSTEM_FLAGS = -DPROGRAM='"$(Program)"' -DCONF_HOSTTYPE='"$(Machine)"' -DCONF_OSTYPE='"$(OS)"' -DCONF_MACHTYPE='"$(MACHTYPE)"' -DCONF_VENDOR='"$(VENDOR)"' $(LOCALE_DEFS) - -BASE_CCFLAGS = $(SYSTEM_FLAGS) $(LOCAL_DEFS) \ - $(DEFS) $(LOCAL_CFLAGS) $(INCLUDES) - -CCFLAGS = $(ADDON_CFLAGS) $(BASE_CCFLAGS) ${PROFILE_FLAGS} $(CPPFLAGS) $(CFLAGS) -Wl,--copy-dt-needed-entries - -CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) - -BASE_LDFLAGS = $(LOCAL_LDFLAGS) $(CFLAGS) -LDFLAGS = ${ADDON_LDFLAGS} ${BASE_LDFLAGS} ${PROFILE_FLAGS} ${STATIC_LD} -LDFLAGS_FOR_BUILD = $(LDFLAGS) $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) - -ASAN_XCFLAGS = -fsanitize=address -fno-omit-frame-pointer -ASAN_XLDFLAGS = -fsanitize=address - -GCOV_XCFLAGS = -fprofile-arcs -ftest-coverage -GCOV_XLDFLAGS = -fprofile-arcs -ftest-coverage - -INCLUDES = -I. -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC) - -# Maybe add: -Wextra -GCC_LINT_FLAGS = -O -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wno-parentheses \ - -Wcast-align -Wstrict-prototypes -Wconversion -Wformat \ - -Wformat-nonliteral -Wmissing-braces -Wuninitialized \ - -Wmissing-declarations -Winline \ - -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic - -GCC_LINT_CFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(GCC_LINT_FLAGS) - -# -# Support libraries -# - -dot = . - -LIBSUBDIR = lib -LIBSRC = $(srcdir)/$(LIBSUBDIR) - -LIBBUILD = ${BUILD_DIR}/${LIBSUBDIR} - -SUBDIR_INCLUDES = -I. -I$(topdir) -I$(topdir)/$(LIBSUBDIR) - -BUILD_INCLUDED_LIBINTL = no -USE_INCLUDED_LIBINTL = no - -# the bash library -# the library is a mix of functions that the C library does not provide on -# some platforms and general shell utility functions -SH_LIBSRC = $(LIBSRC)/sh -SH_LIBDIR = $(dot)/${LIBSUBDIR}/sh -SH_ABSSRC = ${topdir}/${SH_LIBSRC} - -SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.c \ - ${SH_LIBSRC}/getenv.c ${SH_LIBSRC}/oslib.c \ - ${SH_LIBSRC}/setlinebuf.c ${SH_LIBSRC}/strchrnul.c \ - ${SH_LIBSRC}/strcasecmp.c ${SH_LIBSRC}/strdup.c \ - ${SH_LIBSRC}/strerror.c \ - ${SH_LIBSRC}/strtod.c ${SH_LIBSRC}/strtol.c \ - ${SH_LIBSRC}/strtoul.c ${SH_LIBSRC}/vprint.c \ - ${SH_LIBSRC}/itos.c ${SH_LIBSRC}/rename.c \ - ${SH_LIBSRC}/zread.c ${SH_LIBSRC}/zwrite.c \ - ${SH_LIBSRC}/shtty.c ${SH_LIBSRC}/inet_aton.c \ - ${SH_LIBSRC}/netopen.c ${SH_LIBSRC}/strpbrk.c \ - ${SH_LIBSRC}/timeval.c ${SH_LIBSRC}/clock.c \ - ${SH_LIBSRC}/makepath.c ${SH_LIBSRC}/pathcanon.c \ - ${SH_LIBSRC}/pathphys.c ${SH_LIBSRC}/stringlist.c \ - ${SH_LIBSRC}/stringvec.c ${SH_LIBSRC}/tmpfile.c \ - ${SH_LIBSRC}/spell.c ${SH_LIBSRC}/strtrans.c \ - ${SH_LIBSRC}/strcasestr.c ${SH_LIBSRC}/shquote.c \ - ${SH_LIBSRC}/snprintf.c ${SH_LIBSRC}/mailstat.c \ - ${SH_LIBSRC}/fmtulong.c ${SH_LIBSRC}/fmtullong.c \ - ${SH_LIBSRC}/strtoll.c ${SH_LIBSRC}/strtoull.c \ - ${SH_LIBSRC}/strtoimax.c ${SH_LIBSRC}/strtoumax.c \ - ${SH_LIBSRC}/fmtumax.c ${SH_LIBSRC}/netconn.c \ - ${SH_LIBSRC}/mktime.c ${SH_LIBSRC}/strftime.c \ - ${SH_LIBSRC}/memset.c ${SH_LIBSRC}/mbschr.c \ - ${SH_LIBSRC}/zcatfd.c ${SH_LIBSRC}/shmatch.c \ - ${SH_LIBSRC}/strnlen.c ${SH_LIBSRC}/winsize.c \ - ${SH_LIBSRC}/eaccess.c ${SH_LIBSRC}/wcsdup.c \ - ${SH_LIBSRC}/zmapfd.c ${SH_LIBSRC}/fpurge.c \ - ${SH_LIBSRC}/zgetline.c ${SH_LIBSRC}/mbscmp.c \ - ${SH_LIBSRC}/casemod.c ${SH_LIBSRC}/uconvert.c \ - ${SH_LIBSRC}/ufuncs.c ${SH_LIBSRC}/dprintf.c \ - ${SH_LIBSRC}/input_avail.c ${SH_LIBSRC}/mbscasecmp.c \ - ${SH_LIBSRC}/fnxform.c ${SH_LIBSRC}/unicode.c \ - ${SH_LIBSRC}/wcswidth.c ${SH_LIBSRC}/wcsnwidth.c \ - ${SH_LIBSRC}/shmbchar.c ${SH_LIBSRC}/utf8.c \ - ${SH_LIBSRC}/random.c ${SH_LIBSRC}/gettimeofday.c - -SHLIB_LIB = -lsh -SHLIB_LIBNAME = libsh.a -SHLIB_LIBRARY = ${SH_LIBDIR}/${SHLIB_LIBNAME} -SHLIB_LDFLAGS = -L${SH_LIBDIR} -SHLIB_DEP = ${SHLIB_LIBRARY} - -# we assume for now that readline source is being shipped with bash -RL_LIBSRC = $(LIBSRC)/readline -RL_LIBDOC = $(RL_LIBSRC)/doc -RL_LIBDIR = $(dot)/$(LIBSUBDIR)/readline -RL_ABSSRC = ${topdir}/$(RL_LIBDIR) - -RL_INCLUDEDIR = - -READLINE_LIB = -lreadline -READLINE_LIBRARY = $(RL_LIBDIR)/libreadline.a -READLINE_LDFLAGS = -L${RL_LIBDIR} -READLINE_DEP = $(READLINE_LIBRARY) - -# The source, object and documentation of the GNU Readline library. -READLINE_SOURCE = $(RL_LIBSRC)/rldefs.h $(RL_LIBSRC)/rlconf.h \ - $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/tcap.h \ - $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/keymaps.h \ - $(RL_LIBSRC)/history.h $(RL_LIBSRC)/histlib.h \ - $(RL_LIBSRC)/posixstat.h $(RL_LIBSRC)/tilde.h \ - $(RL_LIBSRC)/rlstdc.h ${RL_LIBSRC}/xmalloc.h \ - $(RL_LIBSRC)/rlshell.h ${RL_LIBSRC}/rlprivate.h \ - $(RL_LIBSRC)/colors.h $(RL_LIBSRC)/parse-colors.h \ - $(RL_LIBSRC)/funmap.c $(RL_LIBSRC)/emacs_keymap.c \ - $(RL_LIBSRC)/search.c $(RL_LIBSRC)/vi_keymap.c \ - $(RL_LIBSRC)/keymaps.c $(RL_LIBSRC)/parens.c \ - $(RL_LIBSRC)/vi_mode.c $(RL_LIBSRC)/callback.c \ - $(RL_LIBSRC)/readline.c $(RL_LIBSRC)/tilde.c \ - $(RL_LIBSRC)/rltty.c $(RL_LIBSRC)/complete.c \ - $(RL_LIBSRC)/bind.c $(RL_LIBSRC)/isearch.c \ - $(RL_LIBSRC)/display.c $(RL_LIBSRC)/signals.c \ - $(RL_LIBSRC)/util.c $(RL_LIBSRC)/kill.c $(RL_LIBSRC)/text.c \ - $(RL_LIBSRC)/undo.c $(RL_LIBSRC)/macro.c \ - $(RL_LIBSRC)/terminal.c $(RL_LIBSRC)/nls.c \ - $(RL_LIBSRC)/input.c $(RL_LIBSRC)/xmalloc.c \ - $(RL_LIBSRC)/shell.c $(RL_LIBSRC)/savestring.c \ - $(RL_LIBSRC)/colors.c $(RL_LIBSRC)/parse-colors.c \ - $(RL_LIBSRC)/misc.c $(RL_LIBSRC)/mbutil.c $(RL_LIBSRC)/compat.c \ - $(RL_LIBSRC)/histexpand.c $(RL_LIBSRC)/history.c \ - $(RL_LIBSRC)/histsearch.c $(RL_LIBSRC)/histfile.c - -READLINE_OBJ = $(RL_LIBDIR)/readline.o $(RL_LIBDIR)/funmap.o \ - $(RL_LIBDIR)/parens.o $(RL_LIBDIR)/search.o \ - $(RL_LIBDIR)/keymaps.o $(RL_LIBDIR)/xmalloc.o \ - $(RL_LIBDIR)/rltty.o $(RL_LIBDIR)/complete.o \ - $(RL_LIBDIR)/bind.o $(RL_LIBDIR)/isearch.o \ - $(RL_LIBDIR)/display.o $(RL_LIBDIR)/signals.o \ - $(RL_LIBDIR)/tilde.o $(RL_LIBDIR)/util.o \ - $(RL_LIBDIR)/kill.o $(RL_LIBDIR)/undo.o $(RL_LIBDIR)/nls.o \ - $(RL_LIBDIR)/macro.o $(RL_LIBDIR)/input.o \ - $(RL_LIBDIR)/terminal.o $(RL_LIBDIR)/callback.o \ - $(RL_LIBDIR)/shell.o $(RL_LIBDIR)/savestring.o \ - $(RL_LIBDIR)/mbutil.o $(RL_LIBDIR)/compat.o \ - $(RL_LIBDIR)/history.o $(RL_LIBDIR)/histexpand.o \ - $(RL_LIBDIR)/histsearch.o $(RL_LIBDIR)/histfile.o \ - $(RL_LIBDIR)/colors.o $(RL_LIBDIR)/parse-colors.o - -HIST_LIBSRC = $(LIBSRC)/readline -HIST_LIBDIR = $(dot)/$(LIBSUBDIR)/readline -HIST_ABSSRC = ${topdir}/$(HIST_LIBDIR) - -HISTORY_LIB = -lhistory -HISTORY_LIBRARY = $(HIST_LIBDIR)/libhistory.a -HISTORY_LDFLAGS = -L$(HIST_LIBDIR) -HISTORY_DEP = $(HISTORY_LIBRARY) - -# The source, object and documentation of the history library. -HISTORY_SOURCE = $(HIST_LIBSRC)/history.c $(HIST_LIBSRC)/histexpand.c \ - $(HIST_LIBSRC)/histsearch.c $(HIST_LIBSRC)/histfile.c \ - $(HIST_LIBSRC)/shell.c \ - $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/histlib.h -HISTORY_OBJ = $(HIST_LIBDIR)/history.o $(HIST_LIBDIR)/histexpand.o \ - $(HIST_LIBDIR)/histsearch.o $(HIST_LIBDIR)/histfile.o \ - $(HIST_LIBDIR)/shell.o - -# You only need termcap (or curses) if you are linking with GNU Readline. -TERM_LIBSRC = $(LIBSRC)/termcap -TERM_LIBDIR = $(dot)/$(LIBSUBDIR)/termcap -TERM_ABSSRC = ${topdir}/$(TERM_LIBDIR) - -TERMCAP_LIB = -ltermcap -TERMCAP_LIBRARY = $(TERM_LIBDIR)/libtermcap.a -TERMCAP_LDFLAGS = -L$(TERM_LIBDIR) -TERMCAP_DEP = - -TERMCAP_SOURCE = $(TERM_LIBSRC)/termcap.c $(TERM_LIBSRC)/tparam.c -TERMCAP_OBJ = $(TERM_LIBDIR)/termcap.o $(TERM_LIBDIR)/tparam.o - -GLOB_LIBSRC = $(LIBSRC)/glob -GLOB_LIBDIR = $(dot)/$(LIBSUBDIR)/glob -GLOB_ABSSRC = ${topdir}/$(GLOB_LIBDIR) - -GLOB_LIB = -lglob -GLOB_LIBRARY = $(GLOB_LIBDIR)/libglob.a -GLOB_LDFLAGS = -L$(GLOB_LIBDIR) -GLOB_DEP = $(GLOB_LIBRARY) - -GLOB_SOURCE = $(GLOB_LIBSRC)/glob.c $(GLOB_LIBSRC)/strmatch.c \ - $(GLOB_LIBSRC)/smatch.c $(GLOB_LIBSRC)/xmbsrtowcs.c \ - $(GLOB_LIBSRC)/glob_loop.c $(GLOB_LIBSRC)/sm_loop.c \ - $(GLOB_LIBSRC)/gmisc.c \ - $(GLOB_LIBSRC)/glob.h $(GLOB_LIBSRC)/strmatch.h -GLOB_OBJ = $(GLOB_LIBDIR)/glob.o $(GLOB_LIBDIR)/strmatch.o \ - $(GLOB_LIBDIR)/smatch.o $(GLOB_LIBDIR)/xmbsrtowcs.o \ - $(GLOB_LIBDIR)/gmisc.o - -# The source, object and documentation for the GNU Tilde library. -TILDE_LIBSRC = $(LIBSRC)/tilde -TILDE_LIBDIR = $(dot)/$(LIBSUBDIR)/tilde -TILDE_ABSSRC = ${topdir}/$(TILDE_LIBDIR) - -TILDE_LIB = -ltilde -TILDE_LIBRARY = $(TILDE_LIBDIR)/libtilde.a -TILDE_LDFLAGS = -L$(TILDE_LIBDIR) -TILDE_DEP = $(TILDE_LIBRARY) - -TILDE_SOURCE = $(TILDE_LIBSRC)/tilde.c $(TILDE_LIBSRC)/tilde.h -TILDE_OBJ = $(TILDE_LIBDIR)/tilde.o - -# libintl -INTL_LIBSRC = $(LIBSRC)/intl -INTL_LIBDIR = $(dot)/$(LIBSUBDIR)/intl -INTL_ABSSRC = ${topdir}/$(INTL_LIB) -INTL_BUILDDIR = ${LIBBUILD}/intl - -INTL_LIB = -INTL_LIBRARY = $(INTL_LIBDIR)/libintl.a -INTL_DEP = -INTL_INC = - -LIBINTL_H = - -# libiconv -LIBICONV = - -# tests -LIBINTL = -LTLIBINTL = -INTLLIBS = -INTLOBJS = - -# Our malloc. -MALLOC_TARGET = malloc - -# set to alloca.o if we are using the C alloca in lib/malloc -ALLOCA = - -ALLOC_LIBSRC = $(LIBSRC)/malloc -ALLOC_LIBDIR = $(dot)/$(LIBSUBDIR)/malloc -ALLOC_ABSSRC = ${topdir}/$(ALLOC_LIBDIR) - -MALLOC_SRC = malloc.c -MALLOC_OTHERSRC = ${ALLOC_LIBSRC}/trace.c ${ALLOC_LIBSRC}/stats.c \ - ${ALLOC_LIBSRC}/table.c ${ALLOC_LIBSRC}/watch.c -MALLOC_SOURCE = ${ALLOC_LIBSRC}/${MALLOC_SRC} ${MALLOC_OTHERSRC} -MALLOC_CFLAGS = -DRCHECK -Dbotch=programming_error ${MALLOC_DEBUG} - -MALLOC_LIB = -lmalloc -MALLOC_LIBRARY = $(ALLOC_LIBDIR)/libmalloc.a -MALLOC_LDFLAGS = -L$(ALLOC_LIBDIR) -MALLOC_DEP = $(MALLOC_LIBRARY) - -ALLOC_HEADERS = $(ALLOC_LIBSRC)/getpagesize.h $(ALLOC_LIBSRC)/shmalloc.h \ - $(ALLOC_LIBSRC)/imalloc.h $(ALLOC_LIBSRC)/mstats.h \ - $(ALLOC_LIBSRC)/table.h $(ALLOC_LIBSRC)/watch.h - -$(MALLOC_LIBRARY): ${MALLOC_SOURCE} ${ALLOC_HEADERS} config.h - @(cd $(ALLOC_LIBDIR) && \ - $(MAKE) $(MFLAGS) \ - MALLOC_CFLAGS="$(MALLOC_CFLAGS)" ${MALLOC_TARGET} ) || exit 1 - -BASHINCDIR = ${srcdir}/include -BASHINCFILES = $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/ansi_stdlib.h \ - $(BASHINCDIR)/filecntl.h $(BASHINCDIR)/posixdir.h \ - $(BASHINCDIR)/memalloc.h $(BASHINCDIR)/stdc.h \ - $(BASHINCDIR)/posixjmp.h $(BASHINCDIR)/posixwait.h \ - $(BASHINCDIR)/posixtime.h $(BASHINCDIR)/systimes.h \ - $(BASHINCDIR)/unionwait.h $(BASHINCDIR)/maxpath.h \ - $(BASHINCDIR)/shtty.h $(BASHINCDIR)/typemax.h \ - $(BASHINCDIR)/ocache.h - -LIBRARIES = $(GLOB_LIB) $(SHLIB_LIB) $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) \ - $(TILDE_LIB) $(MALLOC_LIB) $(INTL_LIB) $(LIBICONV) $(LOCAL_LIBS) - -LIBDEP = $(GLOB_DEP) $(SHLIB_DEP) $(INTL_DEP) $(READLINE_DEP) $(HISTORY_DEP) $(TERMCAP_DEP) \ - $(TILDE_DEP) $(MALLOC_DEP) - -LIBRARY_LDFLAGS = $(READLINE_LDFLAGS) $(HISTORY_LDFLAGS) $(GLOB_LDFLAGS) \ - $(TILDE_LDFLAGS) $(MALLOC_LDFLAGS) $(SHLIB_LDFLAGS) - -# -# The shell itself -# - -# The main source code for the Bourne Again SHell. -CSOURCES = shell.c eval.c parse.y general.c make_cmd.c print_cmd.c y.tab.c \ - dispose_cmd.c execute_cmd.c variables.c $(GLOBC) version.c \ - expr.c copy_cmd.c flags.c subst.c hashcmd.c hashlib.c mailcheck.c \ - test.c trap.c alias.c jobs.c nojobs.c $(ALLOC_FILES) braces.c \ - input.c bashhist.c array.c arrayfunc.c assoc.c sig.c pathexp.c \ - unwind_prot.c siglist.c bashline.c bracecomp.c error.c \ - list.c stringlib.c locale.c findcmd.c redir.c \ - pcomplete.c pcomplib.c syntax.c xmalloc.c - -HSOURCES = shell.h flags.h trap.h hashcmd.h hashlib.h jobs.h builtins.h \ - general.h variables.h config.h $(ALLOC_HEADERS) alias.h \ - quit.h unwind_prot.h syntax.h ${GRAM_H} \ - command.h input.h error.h bashansi.h dispose_cmd.h make_cmd.h \ - subst.h externs.h siglist.h bashhist.h bashline.h bashtypes.h \ - array.h arrayfunc.h sig.h mailcheck.h bashintl.h bashjmp.h \ - execute_cmd.h parser.h pathexp.h pathnames.h pcomplete.h assoc.h \ - $(BASHINCFILES) - -SOURCES = $(CSOURCES) $(HSOURCES) $(BUILTIN_DEFS) - -# headers in top-level source directory that get installed by install-headers -INSTALLED_HEADERS = shell.h bashjmp.h command.h syntax.h general.h error.h \ - variables.h array.h assoc.h arrayfunc.h quit.h dispose_cmd.h \ - make_cmd.h subst.h sig.h externs.h builtins.h \ - bashtypes.h xmalloc.h config-top.h config-bot.h \ - bashintl.h bashansi.h bashjmp.h alias.h hashlib.h \ - conftypes.h unwind_prot.h jobs.h siglist.h -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 - -# header files chosen based on running of configure -SIGNAMES_H = lsignames.h - -# object files chosen based on running of configure -JOBS_O = jobs.o -SIGLIST_O = -SIGNAMES_O = - -# Matching object files. -OBJECTS = shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO) \ - dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o \ - expr.o flags.o $(JOBS_O) subst.o hashcmd.o hashlib.o mailcheck.o \ - trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o \ - alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o \ - bashline.o $(SIGLIST_O) list.o stringlib.o locale.o findcmd.o redir.o \ - pcomplete.o pcomplib.o syntax.o xmalloc.o $(SIGNAMES_O) - -# Where the source code of the shell builtins resides. -BUILTIN_SRCDIR=$(srcdir)/builtins -DEFSRC=$(BUILTIN_SRCDIR) -BUILTIN_ABSSRC=${topdir}/builtins -DEFDIR = $(dot)/builtins -DEBUGGER_DIR = $(dot)/debugger - -BUILTIN_DEFS = $(DEFSRC)/alias.def $(DEFSRC)/bind.def $(DEFSRC)/break.def \ - $(DEFSRC)/builtin.def $(DEFSRC)/cd.def $(DEFSRC)/colon.def \ - $(DEFSRC)/command.def ${DEFSRC}/complete.def \ - $(DEFSRC)/caller.def $(DEFSRC)/declare.def \ - $(DEFSRC)/echo.def $(DEFSRC)/enable.def $(DEFSRC)/eval.def \ - $(DEFSRC)/exec.def $(DEFSRC)/exit.def $(DEFSRC)/fc.def \ - $(DEFSRC)/fg_bg.def $(DEFSRC)/hash.def $(DEFSRC)/help.def \ - $(DEFSRC)/history.def $(DEFSRC)/jobs.def $(DEFSRC)/kill.def \ - $(DEFSRC)/let.def $(DEFSRC)/read.def $(DEFSRC)/return.def \ - $(DEFSRC)/set.def $(DEFSRC)/setattr.def $(DEFSRC)/shift.def \ - $(DEFSRC)/source.def $(DEFSRC)/suspend.def $(DEFSRC)/test.def \ - $(DEFSRC)/times.def $(DEFSRC)/trap.def $(DEFSRC)/type.def \ - $(DEFSRC)/ulimit.def $(DEFSRC)/umask.def $(DEFSRC)/wait.def \ - $(DEFSRC)/getopts.def $(DEFSRC)/reserved.def \ - $(DEFSRC)/pushd.def $(DEFSRC)/shopt.def $(DEFSRC)/printf.def \ - $(DEFSRC)/mapfile.def -BUILTIN_C_SRC = $(DEFSRC)/mkbuiltins.c $(DEFSRC)/common.c \ - $(DEFSRC)/evalstring.c $(DEFSRC)/evalfile.c \ - $(DEFSRC)/bashgetopt.c $(GETOPT_SOURCE) -BUILTIN_C_OBJ = $(DEFDIR)/common.o $(DEFDIR)/evalstring.o \ - $(DEFDIR)/evalfile.o $(DEFDIR)/bashgetopt.o -BUILTIN_OBJS = $(DEFDIR)/alias.o $(DEFDIR)/bind.o $(DEFDIR)/break.o \ - $(DEFDIR)/builtin.o $(DEFDIR)/cd.o $(DEFDIR)/colon.o \ - $(DEFDIR)/command.o $(DEFDIR)/caller.o $(DEFDIR)/declare.o \ - $(DEFDIR)/echo.o $(DEFDIR)/enable.o $(DEFDIR)/eval.o \ - $(DEFDIR)/exec.o $(DEFDIR)/exit.o $(DEFDIR)/fc.o \ - $(DEFDIR)/fg_bg.o $(DEFDIR)/hash.o $(DEFDIR)/help.o \ - $(DEFDIR)/history.o $(DEFDIR)/jobs.o $(DEFDIR)/kill.o \ - $(DEFDIR)/let.o $(DEFDIR)/pushd.o $(DEFDIR)/read.o \ - $(DEFDIR)/return.o $(DEFDIR)/shopt.o $(DEFDIR)/printf.o \ - $(DEFDIR)/set.o $(DEFDIR)/setattr.o $(DEFDIR)/shift.o \ - $(DEFDIR)/source.o $(DEFDIR)/suspend.o $(DEFDIR)/test.o \ - $(DEFDIR)/times.o $(DEFDIR)/trap.o $(DEFDIR)/type.o \ - $(DEFDIR)/ulimit.o $(DEFDIR)/umask.o $(DEFDIR)/wait.o \ - $(DEFDIR)/getopts.o $(DEFDIR)/mapfile.o $(BUILTIN_C_OBJ) -GETOPT_SOURCE = $(DEFSRC)/getopt.c $(DEFSRC)/getopt.h -PSIZE_SOURCE = $(DEFSRC)/psize.sh $(DEFSRC)/psize.c - -BUILTINS_LIBRARY = $(DEFDIR)/libbuiltins.a -BUILTINS_LIB = -lbuiltins -BUILTINS_LDFLAGS = -L$(DEFDIR) -BUILTINS_DEP = $(BUILTINS_LIBRARY) - -# Documentation for the shell. -DOCSRC = $(srcdir)/doc -DOCDIR = $(dot)/doc - -# Translations and other i18n support files -PO_SRC = $(srcdir)/po/ -PO_DIR = $(dot)/po/ - -SIGNAMES_SUPPORT = $(SUPPORT_SRC)mksignames.c - -SUPPORT_SRC = $(srcdir)/support/ -SDIR = $(dot)/support - -TESTS_SUPPORT = recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) xcase$(EXEEXT) -CREATED_SUPPORT = signames.h recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) \ - tests/recho$(EXEEXT) tests/zecho$(EXEEXT) \ - tests/printenv$(EXEEXT) xcase$(EXEEXT) tests/xcase$(EXEEXT) \ - mksignames$(EXEEXT) lsignames.h \ - mksyntax${EXEEXT} syntax.c $(VERSPROG) $(VERSOBJ) \ - buildversion.o mksignames.o signames.o buildsignames.o -CREATED_CONFIGURE = config.h config.cache config.status config.log \ - stamp-h po/POTFILES config.status.lineno -CREATED_MAKEFILES = Makefile builtins/Makefile doc/Makefile \ - lib/readline/Makefile lib/glob/Makefile \ - lib/sh/Makefile lib/tilde/Makefile lib/malloc/Makefile \ - lib/termcap/Makefile examples/loadables/Makefile \ - examples/loadables/Makefile.inc \ - examples/loadables/perl/Makefile support/Makefile \ - lib/intl/Makefile po/Makefile po/Makefile.in -CREATED_HEADERS = signames.h config.h pathnames.h version.h y.tab.h \ - ${DEFDIR}/builtext.h - -OTHER_DOCS = $(srcdir)/CHANGES $(srcdir)/COMPAT $(srcdir)/NEWS $(srcdir)/POSIX \ - $(srcdir)/RBASH $(srcdir)/README -OTHER_INSTALLED_DOCS = CHANGES COMPAT NEWS POSIX RBASH README - -LOADABLES_DIR = ${top_builddir}/examples/loadables - -RUST_DIR = $(top_builddir)/builtins_rust -#RUST_TARGET_LIB = $(top_builddir)/target/debug/librjobs.a $(top_builddir)/target/debug/librread.a -RUST_BUILTINS_DIRS = $(RUST_DIR)/alias $(RUST_DIR)/bind $(RUST_DIR)/break_1 $(RUST_DIR)/builtin $(RUST_DIR)/caller $(RUST_DIR)/cd $(RUST_DIR)/colon $(RUST_DIR)/command $(RUST_DIR)/common $(RUST_DIR)/complete $(RUST_DIR)/declare $(RUST_DIR)/echo $(RUST_DIR)/enable $(RUST_DIR)/eval $(RUST_DIR)/exit $(RUST_DIR)/fc $(RUST_DIR)/fg_bg $(RUST_DIR)/getopts $(RUST_DIR)/hash $(RUST_DIR)/help $(RUST_DIR)/history $(RUST_DIR)/jobs $(RUST_DIR)/kill $(RUST_DIR)/mapfile $(RUST_DIR)/printf $(RUST_DIR)/pushd $(RUST_DIR)/read $(RUST_DIR)/rlet $(RUST_DIR)/rreturn $(RUST_DIR)/set $(RUST_DIR)/setattr $(RUST_DIR)/shift $(RUST_DIR)/shopt $(RUST_DIR)/source $(RUST_DIR)/suspend $(RUST_DIR)/test $(RUST_DIR)/times $(RUST_DIR)/trap $(RUST_DIR)/type $(RUST_DIR)/ulimit $(RUST_DIR)/umask $(RUST_DIR)/wait $(RUST_DIR)/exec $(RUST_DIR)/exec_cmd - - -# Keep GNU Make from exporting the entire environment for small machines. -.NOEXPORT: - -.made: $(Program) rashbug $(SDIR)/man2html$(EXEEXT) - @echo "$(Program) last made for a $(Machine) running $(OS)" >.made - -$(Program): .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP) rust_builtins_lib - $(RM) $@ - $(PURIFY) $(CC) $(BUILTINS_LDFLAGS) $(LIBRARY_LDFLAGS) $(LDFLAGS) -o $(Program) $(OBJECTS) $(LIBS) - ls -l $(Program) - -$(SIZE) $(Program) - -.build: $(SOURCES) config.h Makefile version.h $(VERSPROG) - @echo - @echo " ***********************************************************" - @echo " * *" - @echo " * `$(BUILD_DIR)/$(VERSPROG) -l`" - @echo " * *" - @echo " ***********************************************************" - @echo - -rust_builtins_lib: - @for it in $(RUST_BUILTINS_DIRS); do cd $$it ; cargo build; cd -; done - - -rashbug: $(SDIR)/rashbug.sh $(VERSPROG) - @sed -e "s%!PATCHLEVEL!%$(PatchLevel)%" \ - $(SDIR)/rashbug.sh > $@ - @chmod a+rx rashbug - -strip: $(Program) .made - $(STRIP) $(Program) - ls -l $(Program) - -$(SIZE) $(Program) - -lint: - ${MAKE} ${MFLAGS} CFLAGS='${GCC_LINT_FLAGS}' .made - -asan: - ${MAKE} ${MFLAGS} ADDON_CFLAGS='${ASAN_XCFLAGS}' ADDON_LDFLAGS='${ASAN_XLDFLAGS}' .made - -# cheating -gcov: - ${MAKE} ${MFLAGS} CFLAGS=-g ADDON_CFLAGS='${GCOV_XCFLAGS}' ADDON_LDFLAGS='${GCOV_XLDFLAGS}' .made - - -# have to make this separate because making tests depend on $(PROGRAM) -asan-tests: asan $(TESTS_SUPPORT) - @-test -d tests || mkdir tests - @cp $(TESTS_SUPPORT) tests - @( cd $(srcdir)/tests && \ - BUILD_DIR=$(BUILD_DIR) PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) - -profiling-tests: ${PROGRAM} - @test "X$$PROFILE_FLAGS" == "X" && { echo "profiling-tests: must be built with profiling enabled" >&2; exit 1; } - @${MAKE} ${MFLAGS} tests TESTSCRIPT=run-gprof - -version.h: $(SOURCES) config.h Makefile patchlevel.h - $(SHELL) $(SUPPORT_SRC)mkversion.sh -b -S ${topdir} -s $(RELSTATUS) -d $(Version) -o newversion.h \ - && mv newversion.h version.h - -rashversion$(EXEEXT): buildversion.o $(SUPPORT_SRC)rashversion.c - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)rashversion.c buildversion.o ${LIBS_FOR_BUILD} - -buildversion.o: $(srcdir)/version.c - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c -o $@ $(srcdir)/version.c - -buildversion.o: bashintl.h $(BASHINCDIR)/gettext.h -buildversion.o: version.h patchlevel.h conftypes.h - -# old rules -GRAM_H = parser-built -y.tab.o: y.tab.h y.tab.c ${GRAM_H} command.h ${BASHINCDIR}/stdc.h input.h -${GRAM_H}: y.tab.h - @-if test -f y.tab.h ; then \ - cmp -s $@ y.tab.h 2>/dev/null || cp -p y.tab.h $@; \ - fi - -y.tab.c: parse.y -# -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi - $(YACC) -d $(srcdir)/parse.y - touch parser-built -# -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; else cp -p y.tab.h ${GRAM_H}; fi - -y.tab.h: y.tab.c - @true - - -# Subdirs will often times want version.h, so they'll change back up to -# the top level and try to create it. This causes parallel build issues -# so just force top level sanity before we descend. -$(LIBDEP): .build -#$(LIBDEP): version.h - -$(READLINE_LIBRARY): config.h $(READLINE_SOURCE) - @echo making $@ in ${RL_LIBDIR} - @( { test "${RL_LIBDIR}" = "${libdir}" && exit 0; } || \ - cd ${RL_LIBDIR} && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libreadline.a) || exit 1 - -$(HISTORY_LIBRARY): config.h $(HISTORY_SOURCE) $(READLINE_DEP) - @echo making $@ in ${HIST_LIBDIR} - @( { test "${HIST_LIBDIR}" = "${libdir}" && exit 0; } || \ - cd ${HIST_LIBDIR} && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libhistory.a) || exit 1 - -$(GLOB_LIBRARY): config.h $(GLOB_SOURCE) - @echo making $@ in ${GLOB_LIBDIR} - @(cd ${GLOB_LIBDIR} && \ - $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libglob.a) || exit 1 - -$(TILDE_LIBRARY): config.h $(TILDE_SOURCE) - @echo making $@ in ${TILDE_LIBDIR} - @(cd ${TILDE_LIBDIR} && \ - $(MAKE) $(MFLAGS) libtilde.a) || exit 1 - -$(TERMCAP_LIBRARY): config.h ${TERMCAP_SOURCE} - @echo making $@ in ${TERM_LIBDIR} - @(cd ${TERM_LIBDIR} && \ - $(MAKE) $(MFLAGS) libtermcap.a) || exit 1 - -$(SHLIB_LIBRARY): config.h ${SHLIB_SOURCE} - @echo making $@ in ${SH_LIBDIR} - @(cd ${SH_LIBDIR} && \ - $(MAKE) $(MFLAGS) DEBUG=${DEBUG} ${SHLIB_LIBNAME}) || exit 1 - -${INTL_LIBRARY}: config.h ${INTL_LIBDIR}/Makefile - @echo making $@ in ${INTL_LIBDIR} - @(cd ${INTL_LIBDIR} && \ - $(MAKE) $(MFLAGS) XCFLAGS="${LOCAL_CFLAGS}" all) || exit 1 - -${LIBINTL_H}: ${INTL_DEP} - -signames.o: $(SUPPORT_SRC)signames.c - $(RM) $@ - $(CC) $(CCFLAGS) -c $(SUPPORT_SRC)signames.c - -buildsignames.o: $(SUPPORT_SRC)signames.c - $(RM) $@ - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -o $@ -c $(SUPPORT_SRC)signames.c - -mksignames.o: $(SUPPORT_SRC)mksignames.c - $(RM) $@ - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c $(SUPPORT_SRC)mksignames.c - -mksignames$(EXEEXT): mksignames.o buildsignames.o - $(RM) $@ - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ mksignames.o buildsignames.o ${LIBS_FOR_BUILD} - -mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartypes.h bashansi.h - $(RM) $@ - ${CC_FOR_BUILD} ${CCFLAGS_FOR_BUILD} ${LDFLAGS_FOR_BUILD} -o $@ ${srcdir}/mksyntax.c ${LIBS_FOR_BUILD} - -# make a list of signals for the local system -- this is done when we're -# *not* cross-compiling -lsignames.h: mksignames$(EXEEXT) - $(RM) $@ - ./mksignames$(EXEEXT) $@ - -# copy the correct signames header file to signames.h -signames.h: $(SIGNAMES_H) - -if cmp -s $(SIGNAMES_H) $@ ; then :; else $(RM) $@ ; $(CP) $(SIGNAMES_H) $@ ; fi - -syntax.c: mksyntax${EXEEXT} $(srcdir)/syntax.h - $(RM) $@ - ./mksyntax$(EXEEXT) -o $@ - -$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h $(DEFDIR)/builtext.h version.h - @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} targets ) || exit 1 - -# these require special rules to circumvent make builtin rules -${DEFDIR}/common.o: $(BUILTIN_SRCDIR)/common.c - @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} common.o) || exit 1 - -${DEFDIR}/bashgetopt.o: $(BUILTIN_SRCDIR)/bashgetopt.c - @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} bashgetopt.o) || exit 1 - -${DEFDIR}/builtext.h: $(BUILTIN_DEFS) - @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) builtext.h ) || exit 1 - -${DEFDIR}/pipesize.h: - @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) pipesize.h ) || exit 1 - -$(SDIR)/man2html$(EXEEXT): ${SUPPORT_SRC}/man2html.c - @(cd $(SDIR) && $(MAKE) $(MFLAGS) all ) || exit 1 - -# For the justification of the following Makefile rules, see node -# `Automatic Remaking' in GNU Autoconf documentation. - -Makefile makefile: config.status $(srcdir)/Makefile.in - CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status - -Makefiles makefiles: config.status $(srcdir)/Makefile.in - @for mf in $(CREATED_MAKEFILES); do \ - CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status || exit 1; \ - done - -config.h: stamp-h - -stamp-h: config.status $(srcdir)/config.h.in $(srcdir)/config-top.h $(srcdir)/config-bot.h - CONFIG_FILES= CONFIG_HEADERS=config.h $(SHELL) ./config.status - -config.status: $(srcdir)/configure - $(SHELL) ./config.status --recheck - -pathnames.h: Makefile $(srcdir)/pathnames.h.in - @sed -e 's|@DEBUGGER_START_FILE\@|${DEBUGGER_START_FILE}|g' $(srcdir)/pathnames.h.in > pathnames.tmp - @if test -f $@; then \ - cmp -s pathnames.tmp $@ || mv pathnames.tmp $@; \ - else \ - mv pathnames.tmp $@; \ - fi - @${RM} pathnames.tmp - -# comment out for distribution -$(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4 $(srcdir)/config.h.in - cd $(srcdir) && autoconf - -# for chet -reconfig: force - sh $(srcdir)/configure -C - -loadables: - cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) all - -#newversion: mkversion -# $(RM) .build -# ./mkversion -dir $(srcdir) -dist -# mv -f newversion.h version.h -# $(MAKE) -f $(srcdir)/Makefile $(MFLAGS) srcdir=$(srcdir) - -doc documentation: force - @(cd $(DOCDIR) ; $(MAKE) $(MFLAGS) ) - -info dvi ps: force - @(cd $(DOCDIR) ; $(MAKE) $(MFLAGS) CFLAGS='$(CCFLAGS)' $@ ) - -force: - -# unused -TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) - etags $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) - -tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) - ctags -x $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) > $@ - -# Targets that actually do things not part of the build - -installdirs: - @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(bindir) - @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(man1dir) - @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(infodir) - @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(docdir) - -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - -install: .made installdirs - $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/$(Program) - $(INSTALL_SCRIPT) $(INSTALLMODE2) rashbug $(DESTDIR)$(bindir)/rashbug - $(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir) - -( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \ - man1dir=$(man1dir) man1ext=$(man1ext) \ - man3dir=$(man3dir) man3ext=$(man3ext) \ - infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ ) - -( cd $(DEFDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - -install-strip: - $(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \ - prefix=${prefix} exec_prefix=${exec_prefix} \ - DESTDIR=$(DESTDIR) install - -install-headers-dirs: - @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(headersdir) - @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(headersdir)/builtins - @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(headersdir)/include - @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(pkgconfigdir) - -install-headers: install-headers-dirs - @for hf in $(INSTALLED_HEADERS) ; do \ - ${INSTALL_DATA} $(srcdir)/"$$hf" $(DESTDIR)$(headersdir)/$$hf || exit 1; \ - done - @for hf in $(INSTALLED_INCFILES) ; do \ - ${INSTALL_DATA} $(BASHINCDIR)/"$$hf" $(DESTDIR)$(headersdir)/include/$$hf || exit 1; \ - done - @for hf in $(INSTALLED_BUILTINS_HEADERS) ; do \ - ${INSTALL_DATA} $(BUILTIN_SRCDIR)/"$$hf" $(DESTDIR)$(headersdir)/builtins/$$hf || exit 1; \ - done - @for hf in $(CREATED_HEADERS) ; do \ - if test -f $(BUILD_DIR)/"$$hf" ; then \ - ${INSTALL_DATA} $(BUILD_DIR)/"$$hf" $(DESTDIR)$(headersdir)/$$hf || exit 1; \ - else \ - ${INSTALL_DATA} $(srcdir)/"$$hf" $(DESTDIR)$(headersdir)/$$hf || exit 1; \ - fi ; \ - done - -$(INSTALL_DATA) $(SDIR)/bash.pc $(DESTDIR)$(pkgconfigdir)/bash.pc - -uninstall-headers: - -( cd $(DESTDIR)$(headersdir) && $(RM) $(INSTALLED_HEADERS) ) - -( cd $(DESTDIR)$(headersdir)/include && $(RM) $(INSTALLED_INCFILES) ) - -( cd $(DESTDIR)$(headersdir)/builtins && $(RM) $(INSTALLED_BUILTINS_HEADERS) ) - -( cd $(DESTDIR)$(headersdir) && $(RM) $(CREATED_HEADERS) ) - -( $(RM) $(DESTDIR)$(pkgconfigdir)/bash.pc ) - -uninstall: .made - $(RM) $(DESTDIR)$(bindir)/$(Program) $(DESTDIR)$(bindir)/rashbug - -( cd $(DESTDIR)$(docdir) && ${RM} ${OTHER_INSTALLED_DOCS} ) - -( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \ - man1dir=$(man1dir) man1ext=$(man1ext) \ - man3dir=$(man3dir) man3ext=$(man3ext) \ - infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ ) - -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - -.PHONY: basic-clean clean realclean maintainer-clean distclean mostlyclean maybe-clean - -LIB_SUBDIRS = ${RL_LIBDIR} ${HIST_LIBDIR} ${TERM_LIBDIR} ${GLOB_LIBDIR} \ - ${INTL_LIBDIR} ${TILDE_LIBDIR} ${ALLOC_LIBDIR} ${SH_LIBDIR} - -basic-clean: - $(RM) $(OBJECTS) $(Program) rashbug - $(RM) .build .made version.h - cargo clean - -clean: basic-clean - ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) - ( cd builtins && $(MAKE) $(MFLAGS) $@ ) - -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) - -for libdir in ${LIB_SUBDIRS}; do \ - (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ - done - -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - $(RM) $(CREATED_SUPPORT) - cargo clean - -mostlyclean: basic-clean - ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) - ( cd builtins && $(MAKE) $(MFLAGS) $@ ) - -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) - -for libdir in ${LIB_SUBDIRS}; do \ - (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ - done - -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - -distclean: basic-clean maybe-clean - ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) - ( cd builtins && $(MAKE) $(MFLAGS) $@ ) - -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) - -for libdir in ${LIB_SUBDIRS}; do \ - (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ - done - -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - $(RM) $(CREATED_CONFIGURE) tags TAGS - $(RM) $(CREATED_SUPPORT) Makefile $(CREATED_MAKEFILES) pathnames.h - -maintainer-clean: basic-clean - @echo This command is intended for maintainers to use. - @echo It deletes files that may require special tools to rebuild. - $(RM) y.tab.c y.tab.h parser-built tags TAGS - ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) - ( cd builtins && $(MAKE) $(MFLAGS) $@ ) - ( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ ) - -for libdir in ${LIB_SUBDIRS}; do \ - (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\ - done - -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - -( cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ ) - $(RM) $(CREATED_CONFIGURE) $(CREATED_MAKEFILES) - $(RM) $(CREATED_SUPPORT) Makefile pathnames.h - -maybe-clean: - -if test X"`cd $(topdir) && pwd -P`" != X"`cd $(BUILD_DIR) && pwd -P`" ; then \ - $(RM) parser-built y.tab.c y.tab.h ; \ - fi - -recho$(EXEEXT): $(SUPPORT_SRC)recho.c - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD} - -zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD} - -printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD} - -xcase$(EXEEXT): $(SUPPORT_SRC)xcase.c - @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(SUPPORT_SRC)xcase.c ${LIBS_FOR_BUILD} - -test tests check: force $(Program) $(TESTS_SUPPORT) - @-test -d tests || mkdir tests - @cp $(TESTS_SUPPORT) tests - @( cd $(srcdir)/tests && \ - BUILD_DIR=$(BUILD_DIR) PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} ) - -symlinks: - $(SHELL) $(SUPPORT_SRC)fixlinks -s $(srcdir) - -dist: force - @echo Bash distributions are created using $(srcdir)/support/mkdist. - @echo Here is a sample of the necessary commands: - @echo $(Program) $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r ${PACKAGE} -t $(PACKAGE_VERSION) - -xdist: force - ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ ) - ( cd po && $(MAKE) $(MFLAGS) $@ ) - -depend: depends - -depends: force - $(Program) $(SUPPORT_SRC)mkdep -c ${CC} -- ${CCFLAGS} ${CSOURCES} - -#### PRIVATE TARGETS #### -hashtest: hashlib.c - $(CC) -DTEST_HASHING $(CCFLAGS) $(TEST_NBUCKETS) -o $@ $(srcdir)/hashlib.c xmalloc.o $(INTL_LIB) $(MALLOC_LIBRARY) - -############################ DEPENDENCIES ############################### - -# Files that depend on the definitions in config-top.h, which are not meant -# to be changed -array.o: $(srcdir)/config-top.h -bashhist.o: $(srcdir)/config-top.h -shell.o: $(srcdir)/config-top.h -input.o: $(srcdir)/config-top.h -y.tab.o: $(srcdir)/config-top.h -jobs.o: $(srcdir)/config-top.h -nojobs.o: $(srcdir)/config-top.h -execute_cmd.o: $(srcdir)/config-top.h -variables.o: $(srcdir)/config-top.h -findcmd.o: $(srcdir)/config-top.h -subst.o: $(srcdir)/config-top.h -builtins/cd.o: $(srcdir)/config-top.h -builtins/command.o: $(srcdir)/config-top.h -builtins/common.o: $(srcdir)/config-top.h -builtins/declare.o: $(srcdir)/config-top.h -builtins/break.o: $(srcdir)/config-top.h -builtins/echo.o: $(srcdir)/config-top.h -builtins/evalstring.o: $(srcdir)/config-top.h -builtins/exit.o: $(srcdir)/config-top.h -builtins/kill.o: $(srcdir)/config-top.h -builtins/shopt.o: $(srcdir)/config-top.h - -# XXX -${SH_LIBDIR}/tmpfile.o: $(srcdir)/config-top.h - -# shell basics -copy_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -copy_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -copy_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -copy_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h -copy_cmd.o: bashansi.h assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h -dispose_cmd.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h -dispose_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h -dispose_cmd.o: error.h general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -dispose_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -dispose_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h -dispose_cmd.o: ${BASHINCDIR}/ocache.h -dispose_cmd.o: assoc.h ${BASHINCDIR}/chartypes.h -error.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h flags.h ${BASHINCDIR}/stdc.h error.h -error.o: command.h general.h xmalloc.h externs.h input.h bashhist.h -error.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -error.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -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 -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: 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 -execute_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -execute_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -execute_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h -execute_cmd.o: ${BASHINCDIR}/memalloc.h ${GRAM_H} flags.h builtins.h jobs.h quit.h siglist.h -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: 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 -expr.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -expr.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -expr.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -expr.o: make_cmd.h subst.h sig.h pathnames.h externs.h flags.h execute_cmd.h -expr.o: ${BASHINCDIR}/chartypes.h -expr.o: assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/typemax.h -findcmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h -findcmd.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/memalloc.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h -findcmd.o: ${BASHINCDIR}/stdc.h error.h general.h xmalloc.h variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h -findcmd.o: dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h -findcmd.o: flags.h hashlib.h pathexp.h hashcmd.h execute_cmd.h -findcmd.o: ${BASHINCDIR}/chartypes.h -flags.o: config.h flags.h -flags.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -flags.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -flags.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h execute_cmd.h -flags.o: make_cmd.h subst.h sig.h pathnames.h externs.h bashhist.h -flags.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashansi.h assoc.h -general.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -general.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -general.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -general.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -general.o: make_cmd.h subst.h sig.h pathnames.h externs.h flags.h parser.h -general.o: pathexp.h -general.o: ${BASHINCDIR}/maxpath.h ${BASHINCDIR}/posixtime.h -general.o: ${BASHINCDIR}/chartypes.h -general.o: trap.h input.h assoc.h test.h findcmd.h -general.o: ${BASHINCDIR}/ocache.h $(DEFSRC)/common.h -hashcmd.o: config.h ${BASHINCDIR}/posixstat.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -hashcmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -hashcmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashcmd.h -hashcmd.o: execute_cmd.h findcmd.h ${BASHINCDIR}/stdc.h pathnames.h hashlib.h -hashcmd.o: quit.h sig.h flags.h -hashlib.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -hashlib.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -hashlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -hashlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -hashlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h -hashlib.o: assoc.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h -input.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -input.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h input.h error.h externs.h -input.o: quit.h shell.h pathnames.h -list.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -list.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -list.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -list.o: make_cmd.h subst.h sig.h pathnames.h externs.h -list.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashansi.h assoc.h -locale.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -locale.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -locale.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -locale.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -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: 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 -mailcheck.o: make_cmd.h subst.h sig.h pathnames.h externs.h -mailcheck.o: execute_cmd.h mailcheck.h -mailcheck.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.h -make_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h bashansi.h -make_cmd.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h flags.h make_cmd.h -make_cmd.o: variables.h arrayfunc.h conftypes.h array.h hashlib.h subst.h input.h externs.h -make_cmd.o: jobs.h quit.h sig.h siglist.h syntax.h dispose_cmd.h parser.h -make_cmd.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h ${BASHINCDIR}/ocache.h -make_cmd.o: shell.h execute_cmd.h pathnames.h -make_cmd.o: $(BASHINCDIR)/maxpath.h make_cmd.c assoc.h $(BASHINCDIR)/chartypes.h -make_cmd.o: unwind_prot.h $(BASHINCDIR)/posixjmp.h bashjmp.h $(BASHINCDIR)/posixwait.h -y.tab.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/memalloc.h -y.tab.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -y.tab.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -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}/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 -pathexp.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -pathexp.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -pathexp.o: make_cmd.h subst.h sig.h pathnames.h externs.h -pathexp.o: pathexp.h flags.h -pathexp.o: $(GLOB_LIBSRC)/glob.h $(GLOB_LIBSRC)/strmatch.h -pathexp.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h -pathexp.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.h -print_cmd.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -print_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -print_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.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: 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 -redir.o: ${BASHINCDIR}/memalloc.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -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: 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: 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 -shell.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h assoc.h alias.h -sig.o: config.h bashtypes.h -sig.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -sig.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -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 -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 -stringlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -stringlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -stringlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h -stringlib.o: bashansi.h pathexp.h assoc.h $(BASHINCDIR)/ocache.h -stringlib.o: ${GLOB_LIBSRC}/glob.h ${GLOB_LIBSRC}/strmatch.h -subst.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/posixstat.h -subst.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -subst.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -subst.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -subst.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h -subst.o: flags.h jobs.h siglist.h execute_cmd.h ${BASHINCDIR}/filecntl.h trap.h pathexp.h -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 -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 -test.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -test.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h -test.o: ${BASHINCDIR}/stat-time.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h -test.o: $(GLOB_LIBSRC)/strmatch.h bashansi.h pathexp.h assoc.h -test.o: ${DEFSRC}/common.h -trap.o: config.h bashtypes.h trap.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -trap.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -trap.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -trap.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h parser.h -trap.o: make_cmd.h subst.h sig.h pathnames.h externs.h execute_cmd.h -trap.o: signames.h $(DEFSRC)/common.h -trap.o: ${DEFDIR}/builtext.h jobs.h -unwind_prot.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h -unwind_prot.o: general.h xmalloc.h unwind_prot.h quit.h sig.h -unwind_prot.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h error.h -variables.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -variables.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -variables.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -variables.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -variables.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h -variables.o: flags.h execute_cmd.h mailcheck.h input.h $(DEFSRC)/common.h -variables.o: findcmd.h bashhist.h hashcmd.h pathexp.h -variables.o: pcomplete.h ${BASHINCDIR}/chartypes.h -variables.o: ${BASHINCDIR}/posixtime.h assoc.h ${DEFSRC}/getopt.h -variables.o: version.h $(DEFDIR)/builtext.h -version.o: conftypes.h patchlevel.h version.h -xmalloc.o: config.h bashtypes.h ${BASHINCDIR}/ansi_stdlib.h error.h -xmalloc.o: ${BASHINCDIR}/stdc.h $(ALLOC_LIBSRC)/shmalloc.h - -# job control - -jobs.o: config.h bashtypes.h trap.h ${BASHINCDIR}/filecntl.h input.h ${BASHINCDIR}/shtty.h -jobs.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h assoc.h -jobs.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -jobs.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -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)/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 -nojobs.o: sig.h error.h ${BASHINCDIR}/shtty.h input.h parser.h -nojobs.o: $(DEFDIR)/builtext.h -nojobs.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h $(BASHINCDIR)/typemax.h - -# shell features that may be compiled in - -array.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -array.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -array.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -array.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -array.o: make_cmd.h subst.h sig.h pathnames.h externs.h -array.o: $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h -array.o: $(DEFSRC)/common.h -arrayfunc.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -arrayfunc.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -arrayfunc.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -arrayfunc.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -arrayfunc.o: make_cmd.h subst.h sig.h pathnames.h externs.h pathexp.h -arrayfunc.o: execute_cmd.h -arrayfunc.o: assoc.h $(BASHINCDIR)/ocache.h $(BASHINCDIR)/chartypes.h -arrayfunc.o: $(DEFSRC)/common.h -arrayfunc.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h -assoc.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -assoc.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h -assoc.o: command.h ${BASHINCDIR}/stdc.h error.h -assoc.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h -assoc.o: assoc.h hashlib.h -assoc.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -assoc.o: make_cmd.h subst.h sig.h pathnames.h externs.h -assoc.o: array.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h -assoc.o: $(DEFSRC)/common.h -braces.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -braces.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -braces.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -braces.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -braces.o: make_cmd.h subst.h sig.h pathnames.h externs.h -braces.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h -braces.o: ${BASHINCDIR}/typemax.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h -alias.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h -alias.o: general.h xmalloc.h bashtypes.h externs.h alias.h -alias.o: pcomplete.h hashlib.h -alias.o: ${BASHINCDIR}/chartypes.h - -pcomplib.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h bashtypes.h -pcomplib.o: ${BASHINCDIR}/stdc.h hashlib.h pcomplete.h shell.h syntax.h -pcomplib.o: bashjmp.h command.h general.h xmalloc.h error.h variables.h arrayfunc.h conftypes.h quit.h -pcomplib.o: unwind_prot.h dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h -pcomplib.o: externs.h ${BASHINCDIR}/maxpath.h assoc.h array.h -pcomplib.o: ${BASHINCDIR}/posixjmp.h ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h - -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 arrayfunc.h conftypes.h quit.h -pcomplete.o: unwind_prot.h dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h -pcomplete.o: externs.h ${BASHINCDIR}/maxpath.h execute_cmd.h -pcomplete.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h -pcomplete.o: ${DEFDIR}/builtext.h - -# library support files - -bashhist.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/posixstat.h -bashhist.o: ${BASHINCDIR}/filecntl.h -bashhist.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -bashhist.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -bashhist.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -bashhist.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h -bashhist.o: flags.h input.h parser.h pathexp.h $(DEFSRC)/common.h bashline.h -bashhist.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashhist.h assoc.h -bashhist.o: $(GLOB_LIBSRC)/strmatch.h ${GLOB_LIBSRC}/glob.h -bashline.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -bashline.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h -bashline.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h -bashline.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -bashline.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h -bashline.o: builtins.h bashhist.h bashline.h execute_cmd.h findcmd.h pathexp.h -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 -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 -bracecomp.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h -bracecomp.o: array.h hashlib.h alias.h builtins.h -bracecomp.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -bracecomp.o: make_cmd.h subst.h sig.h pathnames.h externs.h -bracecomp.o: ${BASHINCDIR}/ocache.h ${BASHINCDIR}/chartypes.h bashhist.h assoc.h -bracecomp.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h - -# library dependencies - -bashhist.o: $(RL_LIBSRC)/rltypedefs.h -bashline.o: $(RL_LIBSRC)/rlconf.h -bashline.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/rlstdc.h -bashline.o: $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/readline.h -bashline.o: $(RL_LIBSRC)/rltypedefs.h ${RL_LIBSRC}/rlmbutil.h -bracecomp.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h -bracecomp.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h -bracecomp.o: $(RL_LIBSRC)/rltypedefs.h -y.tab.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h -y.tab.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h -y.tab.o: $(RL_LIBSRC)/rltypedefs.h -subst.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h -subst.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h -shell.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h -shell.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h -shell.o: $(RL_LIBSRC)/rltypedefs.h -variables.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h -variables.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h -variables.o: $(RL_LIBSRC)/rltypedefs.h -jobs.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h -jobs.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h -jobs.o: $(RL_LIBSRC)/rltypedefs.h - -shell.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h -variables.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h -subst.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h -bashline.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h -bashhist.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h -y.tab.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h - -bashline.o: $(TILDE_LIBSRC)/tilde.h -bracecomp.o: $(TILDE_LIBSRC)/tilde.h -execute_cmd.o: $(TILDE_LIBSRC)/tilde.h -general.o: $(TILDE_LIBSRC)/tilde.h -mailcheck.o: $(TILDE_LIBSRC)/tilde.h -shell.o: $(TILDE_LIBSRC)/tilde.h -subst.o: $(TILDE_LIBSRC)/tilde.h -variables.o: $(TILDE_LIBSRC)/tilde.h -jobs.o: $(TILDE_LIBSRC)/tilde.h -y.tab.o: $(TILDE_LIBSRC)/tilde.h - -# libintl dependencies -arrayfunc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -bashhist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -bashline.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -braces.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -error.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -eval.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -execute_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -expr.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -general.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -input.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -jobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -locale.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -mailcheck.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -make_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -nojobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -y.tab.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -pathexp.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -pcomplete.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -pcomplib.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -print_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -redir.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -shell.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -sig.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -siglist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -subst.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -test.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -trap.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -variables.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -version.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -xmalloc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h - -# XXX -$(MALLOC_SOURCE): bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h - -signames.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h - -# XXX - dependencies checked through here - -# builtin c sources -builtins/bashgetopt.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -builtins/bashgetopt.o: shell.h syntax.h config.h bashjmp.h command.h general.h xmalloc.h error.h -builtins/bashgetopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -builtins/bashgetopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h -builtins/bashgetopt.o: $(DEFSRC)/common.h -builtins/bashgetopt.o: ${BASHINCDIR}/chartypes.h -builtins/common.o: bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -builtins/common.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h -builtins/common.o: ${BASHINCDIR}/memalloc.h variables.h arrayfunc.h conftypes.h input.h siglist.h -builtins/common.o: quit.h unwind_prot.h ${BASHINCDIR}/maxpath.h jobs.h builtins.h -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/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 -builtins/evalfile.o: make_cmd.h subst.h sig.h pathnames.h externs.h parser.h -builtins/evalfile.o: jobs.h builtins.h flags.h input.h execute_cmd.h -builtins/evalfile.o: bashhist.h $(DEFSRC)/common.h -builtins/evalstring.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -builtins/evalstring.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h siglist.h -builtins/evalstring.o: ${BASHINCDIR}/memalloc.h variables.h arrayfunc.h conftypes.h input.h -builtins/evalstring.o: quit.h unwind_prot.h ${BASHINCDIR}/maxpath.h jobs.h builtins.h -builtins/evalstring.o: dispose_cmd.h make_cmd.h subst.h externs.h -builtins/evalstring.o: jobs.h builtins.h flags.h input.h execute_cmd.h -builtins/evalstring.o: bashhist.h $(DEFSRC)/common.h pathnames.h -builtins/evalstring.o: ${DEFDIR}/builtext.h -builtins/getopt.o: config.h ${BASHINCDIR}/memalloc.h -builtins/getopt.o: shell.h syntax.h bashjmp.h command.h general.h xmalloc.h error.h -builtins/getopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h -builtins/getopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h -builtins/getopt.o: $(DEFSRC)/getopt.h -builtins/mkbuiltins.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h -builtins/mkbuiltins.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h -builtins/mkbuiltins.o: $(BASHINCDIR)/stdc.h - -# builtin def files -builtins/alias.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/alias.o: quit.h $(DEFSRC)/common.h pathnames.h -builtins/alias.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h ${BASHINCDIR}/stdc.h unwind_prot.h -builtins/alias.o: dispose_cmd.h make_cmd.h subst.h externs.h variables.h arrayfunc.h conftypes.h -builtins/bind.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/bind.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/bind.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h -builtins/bind.o: $(DEFSRC)/bashgetopt.h pathnames.h -builtins/break.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/break.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h -builtins/break.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/break.o: pathnames.h execute_cmd.h -builtins/builtin.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/builtin.o: quit.h $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h -builtins/builtin.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/builtin.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/builtin.o: pathnames.h execute_cmd.h -builtins/caller.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/caller.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/caller.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/caller.o: $(DEFSRC)/common.h quit.h -builtins/caller.o: ${BASHINCDIR}/chartypes.h bashtypes.h -builtins/caller.o: ${DEFDIR}/builtext.h pathnames.h -builtins/cd.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/cd.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/cd.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/cd.o: $(DEFSRC)/common.h quit.h pathnames.h -builtins/colon.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/colon.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h -builtins/colon.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/colon.o: pathnames.h -builtins/command.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/command.o: quit.h $(DEFSRC)/bashgetopt.h -builtins/command.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/command.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h pathnames.h -builtins/declare.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/declare.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h -builtins/declare.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/declare.o: $(DEFSRC)/bashgetopt.h pathnames.h flags.h -builtins/echo.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -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/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 -builtins/enable.o: pcomplete.h pathnames.h -builtins/eval.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/eval.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h -builtins/eval.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/eval.o: pathnames.h -builtins/exec.o: bashtypes.h pathnames.h -builtins/exec.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/exec.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/exec.o: dispose_cmd.h make_cmd.h subst.h externs.h execute_cmd.h -builtins/exec.o: findcmd.h flags.h quit.h $(DEFSRC)/common.h ${BASHINCDIR}/stdc.h -builtins/exec.o: pathnames.h -builtins/exit.o: bashtypes.h -builtins/exit.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -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/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/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 -builtins/fg_bg.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/fg_bg.o: pathnames.h execute_cmd.h -builtins/getopts.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/getopts.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h -builtins/getopts.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/getopts.o: pathnames.h execute_cmd.h -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/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: $(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/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 -builtins/inlib.o: pathnames.h -builtins/jobs.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/jobs.o: quit.h $(DEFSRC)/bashgetopt.h -builtins/jobs.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/jobs.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/jobs.o: pathnames.h -builtins/kill.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/kill.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/kill.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h trap.h unwind_prot.h variables.h arrayfunc.h conftypes.h -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/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/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/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/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 -builtins/return.o: pathnames.h execute_cmd.h -builtins/set.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/set.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/set.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h flags.h -builtins/set.o: pathnames.h parser.h -builtins/setattr.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/setattr.o: quit.h $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h -builtins/setattr.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/setattr.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/setattr.o: pathnames.h flags.h execute_cmd.h -builtins/shift.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/shift.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/shift.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/shift.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/shift.o: pathnames.h -builtins/shopt.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h -builtins/shopt.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h -builtins/shopt.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h unwind_prot.h variables.h arrayfunc.h conftypes.h ${BASHINCDIR}/maxpath.h -builtins/shopt.o: $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h pathnames.h -builtins/shopt.o: bashhist.h bashline.h -builtins/source.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/source.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/source.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/source.o: findcmd.h $(DEFSRC)/bashgetopt.h flags.h trap.h -builtins/source.o: pathnames.h execute_cmd.h -builtins/suspend.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/suspend.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/suspend.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/suspend.o: pathnames.h -builtins/test.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/test.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/test.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -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/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 -builtins/trap.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/trap.o: pathnames.h -builtins/type.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/type.o: quit.h $(DEFSRC)/common.h findcmd.h -builtins/type.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/type.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/type.o: pathnames.h execute_cmd.h parser.h -builtins/ulimit.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/ulimit.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/ulimit.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/ulimit.o: pathnames.h -builtins/umask.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/umask.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/umask.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/umask.o: ${BASHINCDIR}/chartypes.h pathnames.h -builtins/wait.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/wait.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/wait.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/wait.o: execute_cmd.h -builtins/wait.o: ${BASHINCDIR}/chartypes.h pathnames.h - -builtins/complete.o: config.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h -builtins/complete.o: unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/complete.o: bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h -builtins/complete.o: builtins.h pathnames.h general.h -builtins/complete.o: bashtypes.h ${BASHINCDIR}/chartypes.h xmalloc.h -builtins/complete.o: pcomplete.h -builtins/complete.o: ${DEFSRC}/common.h ${DEFSRC}/bashgetopt.h -builtins/mapfile.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h -builtins/mapfile.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h -builtins/mapfile.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h -builtins/mapfile.o: pathnames.h - -# libintl dependencies -builtins/bind.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/break.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/caller.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/cd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/common.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/complete.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/declare.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/enable.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/evalfile.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/exec.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/exit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/fc.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/fg_bg.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/getopt.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/hash.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/help.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/history.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/inlib.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/jobs.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/kill.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/let.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/mapfile.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/mkbuiltins.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/printf.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/pushd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/read.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/return.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/set.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/setattr.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/shift.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/shopt.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/source.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/suspend.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/type.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/ulimit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -builtins/umask.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h - -# builtin library dependencies -builtins/bind.o: $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/readline.h -builtins/bind.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/rlstdc.h - -builtins/bind.o: $(HIST_LIBSRC)/history.h $(RL_LIBSRC)/rlstdc.h -builtins/fc.o: $(HIST_LIBSRC)/history.h $(RL_LIBSRC)/rlstdc.h -builtins/history.o: $(HIST_LIBSRC)/history.h $(RL_LIBSRC)/rlstdc.h - -builtins/common.o: $(TILDE_LIBSRC)/tilde.h -builtins/cd.o: $(TILDE_LIBSRC)/tilde.h - -builtins/alias.o: $(DEFSRC)/alias.def -builtins/bind.o: $(DEFSRC)/bind.def -builtins/break.o: $(DEFSRC)/break.def -builtins/builtin.o: $(DEFSRC)/builtin.def -builtins/caller.o: $(DEFSRC)/caller.def -builtins/cd.o: $(DEFSRC)/cd.def -builtins/colon.o: $(DEFSRC)/colon.def -builtins/command.o: $(DEFSRC)/command.def -builtins/complete.o: $(DEFSRC)/complete.def -builtins/declare.o: $(DEFSRC)/declare.def -builtins/echo.o: $(DEFSRC)/echo.def -builtins/enable.o: $(DEFSRC)/enable.def -builtins/eval.o: $(DEFSRC)/eval.def -builtins/exec.o: $(DEFSRC)/exec.def -builtins/exit.o: $(DEFSRC)/exit.def -builtins/fc.o: $(DEFSRC)/fc.def -builtins/fg_bg.o: $(DEFSRC)/fg_bg.def -builtins/getopts.o: $(DEFSRC)/getopts.def -builtins/hash.o: $(DEFSRC)/hash.def -builtins/help.o: $(DEFSRC)/help.def -builtins/history.o: $(DEFSRC)/history.def -builtins/inlib.o: $(DEFSRC)/inlib.def -builtins/jobs.o: $(DEFSRC)/jobs.def -builtins/kill.o: $(DEFSRC)/kill.def -builtins/let.o: $(DEFSRC)/let.def -builtins/mapfile.o: $(DEFSRC)/mapfile.def -builtins/pushd.o: $(DEFSRC)/pushd.def -builtins/read.o: $(DEFSRC)/read.def -builtins/reserved.o: $(DEFSRC)/reserved.def -builtins/return.o: $(DEFSRC)/return.def -builtins/set.o: $(DEFSRC)/set.def -builtins/setattr.o: $(DEFSRC)/setattr.def -builtins/shift.o: $(DEFSRC)/shift.def -builtins/shopt.o: $(DEFSRC)/shopt.def -builtins/source.o: $(DEFSRC)/source.def -builtins/suspend.o: $(DEFSRC)/suspend.def -builtins/test.o: $(DEFSRC)/test.def -builtins/times.o: $(DEFSRC)/times.def -builtins/trap.o: $(DEFSRC)/trap.def -builtins/type.o: $(DEFSRC)/type.def -builtins/ulimit.o: $(DEFSRC)/ulimit.def -builtins/umask.o: $(DEFSRC)/umask.def -builtins/wait.o: $(DEFSRC)/wait.def diff --git a/bash-5.1/bashhist.c b/bash-5.1/bashhist.c index 4c0247235b64385ef4ecf2a233da05981c892dd4..f80cc0f1977ea89e7da430f840a0bdcb09bce559 100644 --- a/bash-5.1/bashhist.c +++ b/bash-5.1/bashhist.c @@ -875,7 +875,7 @@ bash_add_history (line) add_it = 1; if (command_oriented_history && current_command_line_count > 1) { - is_comment = (parser_state & PST_HEREDOC) ? 0 : shell_comment (line); + is_comment = (parser_state & PST_HEREDOC) ? 0 : shell_comment (line); //开头是返回1,后面有返回2,没有返回0 /* The second and subsequent lines of a here document have the trailing newline preserved. We don't want to add extra newlines here, but we @@ -888,7 +888,7 @@ bash_add_history (line) (current_command_line_count > 2) don't add a newline here. This will also take care of the literal_history case if the other conditions are met. */ - if ((parser_state & PST_HEREDOC) && current_command_line_count > 2 && line[strlen (line) - 1] == '\n') + if ((parser_state & PST_HEREDOC) && current_command_line_count > 2 && line[strlen (line) - 1] == '\n') //判断HEREDOC? chars_to_add = ""; else if (current_command_line_count == current_command_line_comment+1) chars_to_add = "\n"; @@ -930,7 +930,7 @@ bash_add_history (line) + strlen (chars_to_add)); sprintf (new_line, "%s%s%s", current->line, chars_to_add, line); offset = where_history (); - old = replace_history_entry (offset, new_line, current->data); + old = replace_history_entry (offset, new_line, current->data); //把history entry最后一项替换? free (new_line); if (old) diff --git a/bash-5.1/builtins/Makefile b/bash-5.1/builtins/Makefile deleted file mode 100644 index 0810901b0bd6b1d81a2c4fe9520ded47bcc73115..0000000000000000000000000000000000000000 --- a/bash-5.1/builtins/Makefile +++ /dev/null @@ -1,708 +0,0 @@ -# This Makefile for building libbuiltins.a is in -*- text -*- for Emacs. -# -# Copyright (C) 1996-2017 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -PACKAGE = rash -PACKAGE_BUGREPORT = bug-rash@gnu.org -PACKAGE_NAME = rash -PACKAGE_STRING = rash 0.1-release -PACKAGE_VERSION = 0.1-release - -# -SHELL = /bin/sh -RANLIB = ranlib -CC = gcc -CC_FOR_BUILD = $(CC) -AR = ar -ARFLAGS = cr -RM = rm -f -CP = cp - -EXEEXT = - -prefix = /usr/local - -srcdir = . - -topdir = .. - -datarootdir = ${prefix}/share - -includedir = ${prefix}/include -datadir = ${datarootdir} -localedir = ${datarootdir}/locale - -loadablesdir = ${libdir}/bash - -# Support an alternate destination root directory for package building -DESTDIR = - -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -LIBBUILD = ${BUILD_DIR}/lib - -PROFILE_FLAGS = -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -CFLAGS_FOR_BUILD = -g -O2 -Wno-parentheses -Wno-format-security -CPPFLAGS = -CPPFLAGS_FOR_BUILD = -LOCAL_CFLAGS = ${DEBUG} -DEFS = -DHAVE_CONFIG_H -LOCAL_DEFS = -DSHELL - -LIBS = -ldl -LDFLAGS = $(LOCAL_LDFLAGS) $(CFLAGS) -LDFLAGS_FOR_BUILD = $(LDFLAGS) $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) -LOCAL_LDFLAGS = -rdynamic -LIBS_FOR_BUILD = $(LIBS) -#LIBS_FOR_BUILD = $(LIBS) - -BASHINCDIR = ${topdir}/include - -RL_INCLUDEDIR = - -INTL_LIBSRC = ${topdir}/lib/intl -INTL_BUILDDIR = ${LIBBUILD}/intl -INTL_LIBDIR = ${INTL_BUILDDIR} -INTL_LIBRARY = ${INTL_BUILDDIR}/libintl.a -INTL_INC = -INTL_DEP = -LIBINTL_H = - -HELPDIR = -MKDIRS = ${topdir}/support/mkdirs - -HELPFILES_TARGET = - -INCLUDES = -I. -I.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib -I$(srcdir) ${INTL_INC} - -BASE_CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) \ - ${INCLUDES} $(LOCAL_CFLAGS) - -CCFLAGS = ${ADDON_CFLAGS} $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS) - -CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) - -GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ - -Wcast-align -Wstrict-prototypes -Wconversion \ - -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic - -MKBUILTINS = mkbuiltins$(EXEEXT) -DIRECTDEFINE = -D $(srcdir) -HELPDIRDEFINE = -HELPSTRINGS = - -# xxx this is bad style -RL_LIBSRC = $(topdir)/lib/readline - -.SUFFIXES: -.SUFFIXES: .def .c .o -# How to make a .o file from a .def file. -.def.o: - $(RM) $@ - ./$(MKBUILTINS) $(DIRECTDEFINE) $< - $(CC) -c $(CCFLAGS) $*.c || ( $(RM) $*.c ; exit 1 ) - -# How to make a .c file from a .def file. -.def.c: - $(RM) $@ - ./$(MKBUILTINS) $(DIRECTDEFINE) $< - -# default rule for making a .o file from a .c file -.c.o: - $(RM) $@ - $(CC) -c $(CCFLAGS) $< - -DEFSRC = $(srcdir)/alias.def $(srcdir)/bind.def $(srcdir)/break.def \ - $(srcdir)/builtin.def $(srcdir)/caller.def \ - $(srcdir)/cd.def $(srcdir)/colon.def \ - $(srcdir)/command.def $(srcdir)/declare.def $(srcdir)/echo.def \ - $(srcdir)/enable.def $(srcdir)/eval.def $(srcdir)/getopts.def \ - $(srcdir)/exec.def $(srcdir)/exit.def $(srcdir)/fc.def \ - $(srcdir)/fg_bg.def $(srcdir)/hash.def $(srcdir)/help.def \ - $(srcdir)/history.def $(srcdir)/jobs.def $(srcdir)/kill.def \ - $(srcdir)/let.def $(srcdir)/read.def $(srcdir)/return.def \ - $(srcdir)/set.def $(srcdir)/setattr.def $(srcdir)/shift.def \ - $(srcdir)/source.def $(srcdir)/suspend.def $(srcdir)/test.def \ - $(srcdir)/times.def $(srcdir)/trap.def $(srcdir)/type.def \ - $(srcdir)/ulimit.def $(srcdir)/umask.def $(srcdir)/wait.def \ - $(srcdir)/reserved.def $(srcdir)/pushd.def $(srcdir)/shopt.def \ - $(srcdir)/printf.def $(srcdir)/complete.def $(srcdir)/mapfile.def - -STATIC_SOURCE = common.c evalstring.c evalfile.c getopt.c bashgetopt.c \ - getopt.h - -OFILES = builtins.o \ - alias.o bind.o break.o builtin.o caller.o cd.o colon.o command.o \ - common.o declare.o echo.o enable.o eval.o evalfile.o \ - evalstring.o exec.o exit.o fc.o fg_bg.o hash.o help.o history.o \ - jobs.o kill.o let.o mapfile.o \ - pushd.o read.o return.o set.o setattr.o shift.o source.o \ - suspend.o test.o times.o trap.o type.o ulimit.o umask.o \ - wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o complete.o - -CREATED_FILES = builtext.h builtins.c psize.aux pipesize.h tmpbuiltins.c \ - tmpbuiltins.h -CREATED_OBJECTS = tmpbuiltins.o gen-helpfiles.o mkbuiltins.o - -all: $(MKBUILTINS) libbuiltins.a $(HELPFILES_TARGET) -targets: libbuiltins.a $(HELPFILES_TARGET) - -libbuiltins.a: $(MKBUILTINS) $(OFILES) builtins.o - $(RM) $@ - $(AR) $(ARFLAGS) $@ $(OFILES) - -$(RANLIB) $@ - -tmpbuiltins.c: $(MKBUILTINS) $(DEFSRC) - ./$(MKBUILTINS) -externfile tmpbuiltins.h -structfile $@ \ - -noproduction -nofunctions \ - $(DIRECTDEFINE) $(HELPSTRINGS) $(DEFSRC) - -tmpbuiltins.h: tmpbuiltins.c - -gen-helpfiles.o: ../config.h -gen-helpfiles.o: gen-helpfiles.c - $(RM) $@ - $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $< - -gen-helpfiles: tmpbuiltins.o gen-helpfiles.o - $(CC_FOR_BUILD) ${CCFLAGS_FOR_BUILD} $(LDFLAGS_FOR_BUILD) -o $@ gen-helpfiles.o tmpbuiltins.o $(LIBS_FOR_BUILD) - -builtext.h builtins.c: $(MKBUILTINS) $(DEFSRC) - @-if test -f builtins.c; then mv -f builtins.c old-builtins.c; fi - @-if test -f builtext.h; then mv -f builtext.h old-builtext.h; fi - ./$(MKBUILTINS) -externfile builtext.h -structfile builtins.c \ - -noproduction $(DIRECTDEFINE) $(HELPDIRDEFINE) $(HELPSTRINGS) $(DEFSRC) - @-if cmp -s old-builtext.h builtext.h 2>/dev/null; then \ - mv old-builtext.h builtext.h; \ - else \ - $(RM) old-builtext.h; \ - fi - @-if cmp -s old-builtins.c builtins.c 2>/dev/null; then \ - mv old-builtins.c builtins.c; \ - else \ - $(RM) old-builtins.c; \ - fi - -helpdoc: gen-helpfiles - ./gen-helpfiles ${HELPDIRDEFINE} - -install-help: - @-if test -n "${HELPDIR}" && test -d helpfiles ; then \ - test -d $(DESTDIR)${HELPDIR} || ${SHELL} ${MKDIRS} $(DESTDIR)$(HELPDIR) ;\ - ( for f in helpfiles/*; do \ - echo installing $$f; \ - ${INSTALL_DATA} $$f $(DESTDIR)$(HELPDIR); \ - done; ) ; \ - fi - -install: - -mkbuiltins.o: ../config.h -mkbuiltins.o: mkbuiltins.c - $(RM) $@ - $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $< - -mkbuiltins$(EXEEXT): mkbuiltins.o - $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $(MKBUILTINS) mkbuiltins.o $(LIBS_FOR_BUILD) - -# rules for deficient makes, like SunOS -mkbuiltins.o: mkbuiltins.c -builtins.o: builtins.c -common.o: common.c -bashgetopt.o: bashgetopt.c -getopt.o: getopt.c -evalstring.o: evalstring.c -evalfile.o: evalfile.c - -tmpbuiltins.o: tmpbuiltins.c -gen-helpfiles.o: gen-helpfiles.c - -ulimit.o: pipesize.h - -pipesize.h: psize.aux - $(SHELL) $(srcdir)/psize.sh > $@ - -# Technically this is wrong; the pipe size should be for the target system, -# not the build host. -psize.aux: psize.c - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) ${LDFLAGS_FOR_BUILD} -o $@ $(srcdir)/psize.c - -documentation: builtins.texi - -builtins.texi: $(MKBUILTINS) - ./$(MKBUILTINS) -documentonly $(DEFSRC) - -clean: - $(RM) $(OFILES) $(CREATED_FILES) libbuiltins.a - $(RM) $(MKBUILTINS) gen-helpfiles $(CREATED_OBJECTS) - -test -d helpfiles && $(RM) -r helpfiles - -mostlyclean: - $(RM) $(OFILES) libbuiltins.a - -distclean maintainer-clean: clean - $(RM) Makefile - -$(OFILES): $(MKBUILTINS) ../config.h - -../version.h: ../config.h ../Makefile Makefile - -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h ) - -# maintainer special - for now -po: builtins.c - xgettext -L C -o $(topdir)/po/builtins.pot --keyword='N_' builtins.c 2>/dev/null - -${LIBINTL_H}: - @echo making $@ in ${INTL_BUILDDIR} - @(cd ${INTL_BUILDDIR} && \ - $(MAKE) $(MFLAGS) libintl.h) || exit 1 - -# dependencies - -alias.o: alias.def -bind.o: bind.def -break.o: break.def -builtin.o: builtin.def -caller.o: caller.def -cd.o: cd.def -colon.o: colon.def -command.o: command.def -declare.o: declare.def -echo.o: echo.def -enable.o: enable.def -eval.o: eval.def -exec.o: exec.def -exit.o: exit.def -fc.o: fc.def -fg_bg.o: fg_bg.def -hash.o: hash.def -help.o: help.def -history.o: history.def -jobs.o: jobs.def -kill.o: kill.def -let.o: let.def -mapfile.o: mapfile.def -printf.o: printf.def -pushd.o: pushd.def -read.o: read.def -return.o: return.def -set.o: set.def -setattr.o: setattr.def -shift.o: shift.def -shopt.o: shopt.def -source.o: source.def -suspend.o: suspend.def -test.o: test.def -times.o: times.def -trap.o: trap.def -type.o: type.def -ulimit.o: ulimit.def -umask.o: umask.def -wait.o: wait.def -getopts.o: getopts.def -reserved.o: reserved.def -complete.o: complete.def - -# C files -bashgetopt.o: ../config.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h -bashgetopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h -bashgetopt.o: $(topdir)/command.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/error.h -bashgetopt.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/quit.h $(BASHINCDIR)/maxpath.h -bashgetopt.o: $(topdir)/unwind_prot.h $(topdir)/dispose_cmd.h -bashgetopt.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/sig.h -bashgetopt.o: ../pathnames.h $(topdir)/externs.h $(srcdir)/common.h -bashgetopt.o: $(BASHINCDIR)/chartypes.h -common.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h -common.o: $(topdir)/shell.h $(topdir)/syntax.h ../config.h $(topdir)/bashjmp.h $(BASHINCDIR)/posixjmp.h -common.o: $(topdir)/sig.h $(topdir)/command.h $(topdir)/parser.h -common.o: $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/stdc.h $(BASHINCDIR)/memalloc.h -common.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/input.h -common.o: $(topdir)/siglist.h $(topdir)/bashhist.h $(topdir)/quit.h -common.o: $(topdir)/unwind_prot.h $(BASHINCDIR)/maxpath.h $(topdir)/jobs.h -common.o: $(topdir)/builtins.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -common.o: $(topdir)/subst.h $(topdir)/execute_cmd.h $(topdir)/error.h -common.o: $(topdir)/externs.h ../pathnames.h ./builtext.h -common.o: $(BASHINCDIR)/chartypes.h -evalfile.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h ${BASHINCDIR}/filecntl.h -evalfile.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h -evalfile.o: $(topdir)/shell.h $(topdir)/syntax.h ../config.h $(topdir)/bashjmp.h -evalfile.o: $(topdir)/command.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/error.h -evalfile.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/quit.h $(BASHINCDIR)/maxpath.h -evalfile.o: $(topdir)/unwind_prot.h $(topdir)/dispose_cmd.h -evalfile.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/sig.h -evalfile.o: ../pathnames.h $(topdir)/externs.h $(topdir)/parser.h -evalfile.o: $(topdir)/jobs.h $(topdir)/builtins.h $(topdir)/flags.h -evalfile.o: $(topdir)/input.h $(topdir)/execute_cmd.h -evalfile.o: $(topdir)/bashhist.h $(srcdir)/common.h -evalstring.o: ../config.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h -evalstring.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h $(BASHINCDIR)/posixjmp.h -evalstring.o: $(topdir)/sig.h $(topdir)/command.h $(topdir)/siglist.h -evalstring.o: $(BASHINCDIR)/memalloc.h $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/input.h -evalstring.o: $(topdir)/quit.h $(topdir)/unwind_prot.h -evalstring.o: $(BASHINCDIR)/maxpath.h $(topdir)/jobs.h $(topdir)/builtins.h -evalstring.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h -evalstring.o: $(topdir)/externs.h $(topdir)/jobs.h $(topdir)/builtins.h -evalstring.o: $(topdir)/flags.h $(topdir)/input.h $(topdir)/execute_cmd.h -evalstring.o: $(topdir)/bashhist.h $(srcdir)/common.h -evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h ./builtext.h -#evalstring.o: $(topdir)/y.tab.h -getopt.o: ../config.h $(BASHINCDIR)/memalloc.h -getopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h $(topdir)/command.h -getopt.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/error.h $(topdir)/variables.h $(topdir)/conftypes.h -getopt.o: $(topdir)/quit.h $(BASHINCDIR)/maxpath.h $(topdir)/unwind_prot.h -getopt.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h -getopt.o: $(topdir)/sig.h ../pathnames.h $(topdir)/externs.h -getopt.o: $(srcdir)/getopt.h -mkbuiltins.o: ../config.h $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h -mkbuiltins.o: ${BASHINCDIR}/filecntl.h -mkbuiltins.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h - -# def files -alias.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -alias.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h -alias.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -alias.o: $(topdir)/subst.h $(topdir)/externs.h $(srcdir)/common.h -alias.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -alias.o: ../pathnames.h -bind.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h -bind.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -bind.o: $(topdir)/subst.h $(topdir)/externs.h $(srcdir)/bashgetopt.h -bind.o: $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h $(topdir)/bashline.h -bind.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -break.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -break.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -break.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -break.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -break.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -break.o: ../pathnames.h $(topdir)/execute_cmd.h -builtin.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -builtin.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/externs.h -builtin.o: $(topdir)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h $(topdir)/sig.h -builtin.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h -builtin.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -builtin.o: $(srcdir)/bashgetopt.h ../pathnames.h $(topdir)/execute_cmd.h -caller.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h -caller.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(topdir)/dispose_cmd.h -caller.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h -caller.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -caller.o: $(srcdir)/common.h $(BASHINCDIR)/maxpath.h ./builtext.h -caller.o: ${BASHINCDIR}/chartypes.h $(topdir)/bashtypes.h ../pathnames.h -cd.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h -cd.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(topdir)/dispose_cmd.h -cd.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/externs.h -cd.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -cd.o: $(srcdir)/common.h $(BASHINCDIR)/maxpath.h ../pathnames.h -cd.o: $(topdir)/sig.h -colon.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h -colon.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h -colon.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -colon.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -colon.o: $(BASHINCDIR)/maxpath.h ../pathnames.h -colon.o: $(srcdir)/common.h -command.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -command.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/externs.h -command.o: $(topdir)/quit.h $(srcdir)/bashgetopt.h $(BASHINCDIR)/maxpath.h -command.o: $(topdir)/sig.h -command.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h -command.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -command.o: ../pathnames.h -declare.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -declare.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -declare.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -declare.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -declare.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -declare.o: $(topdir)/arrayfunc.h $(srcdir)/bashgetopt.h $(topdir)/flags.h -declare.o: ./builtext.h ../pathnames.h -echo.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h -echo.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h -echo.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -echo.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -echo.o: $(BASHINCDIR)/maxpath.h ../pathnames.h -echo.o: $(srcdir)/common.h -enable.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -enable.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -enable.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -enable.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h -enable.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -enable.o: $(BASHINCDIR)/maxpath.h ../pathnames.h -enable.o: $(topdir)/pcomplete.h -eval.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -eval.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -eval.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -eval.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h -eval.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -eval.o: $(BASHINCDIR)/maxpath.h ../pathnames.h -exec.o: $(topdir)/bashtypes.h -exec.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -exec.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -exec.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -exec.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/flags.h -exec.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -exec.o: $(srcdir)/common.h $(topdir)/execute_cmd.h $(BASHINCDIR)/maxpath.h -exec.o: $(topdir)/findcmd.h $(topdir)/jobs.h ../pathnames.h -exit.o: $(topdir)/bashtypes.h -exit.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -exit.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -exit.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -exit.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/jobs.h -exit.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -exit.o: $(topdir)/execute_cmd.h -exit.o: $(BASHINCDIR)/maxpath.h ./builtext.h ../pathnames.h -fc.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h -fc.o: $(topdir)/builtins.h $(topdir)/command.h $(srcdir)/bashgetopt.h -fc.o: $(topdir)/bashhist.h $(topdir)/parser.h -fc.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h -fc.o: $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h -fc.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -fc.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/shell.h $(topdir)/syntax.h -fc.o: $(topdir)/flags.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -fc.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h $(BASHINCDIR)/chartypes.h -fc.o: ../pathnames.h -fg_bg.o: $(topdir)/bashtypes.h $(srcdir)/bashgetopt.h -fg_bg.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -fg_bg.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -fg_bg.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -fg_bg.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -fg_bg.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -fg_bg.o: $(topdir)/execute_cmd.h -fg_bg.o: $(topdir)/jobs.h ../pathnames.h -getopts.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -getopts.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -getopts.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -getopts.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -getopts.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -getopts.o: $(topdir)/execute_cmd.h -getopts.o: ../pathnames.h -hash.o: $(topdir)/builtins.h $(topdir)/command.h $(topdir)/quit.h -hash.o: $(topdir)/findcmd.h $(topdir)/hashlib.h $(topdir)/sig.h -hash.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -hash.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -hash.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h -hash.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.h -hash.o: $(srcdir)/common.h $(BASHINCDIR)/maxpath.h ../pathnames.h -help.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -help.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -help.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -help.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -help.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h -help.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.h -help.o: ${srcdir}/common.h $(topdir)/sig.h ../pathnames.h -history.o: $(topdir)/bashtypes.h -history.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -history.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -history.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -history.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h $(topdir)/parser.h -history.o: ${BASHINCDIR}/filecntl.h $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h -history.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/bashhist.h $(BASHINCDIR)/maxpath.h -history.o: ../pathnames.h -inlib.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -inlib.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -inlib.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -inlib.o: $(BASHINCDIR)/maxpath.h $(topdir)/subst.h $(topdir)/externs.h -inlib.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ../pathnames.h -jobs.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h -jobs.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(srcdir)/bashgetopt.h -jobs.o: $(BASHINCDIR)/maxpath.h $(topdir)/externs.h $(topdir)/jobs.h -jobs.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h -jobs.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -jobs.o: $(topdir)/sig.h ../pathnames.h -kill.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h -kill.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h -kill.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -kill.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/trap.h $(topdir)/unwind_prot.h -kill.o: $(topdir)/variables.h $(topdir)/conftypes.h $(BASHINCDIR)/maxpath.h -kill.o: $(topdir)/jobs.h ../pathnames.h -let.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -let.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -let.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -let.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -let.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -let.o: ../pathnames.h -printf.o: ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/bashjmp.h -printf.o: $(topdir)/command.h $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -printf.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -printf.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h -printf.o: ../pathnames.h $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h -printf.o: $(topdir)/variables.h $(topdir)/conftypes.h $(BASHINCDIR)/stdc.h $(srcdir)/bashgetopt.h -printf.o: $(topdir)/bashtypes.h ${srcdir}/common.h $(BASHINCDIR)/chartypes.h -printf.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h -printf.o: ../pathnames.h -pushd.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -pushd.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -pushd.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -pushd.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h -pushd.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -pushd.o: $(BASHINCDIR)/maxpath.h $(srcdir)/common.h ./builtext.h -pushd.o: ../pathnames.h -read.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -read.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -read.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -read.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -read.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -read.o: $(BASHINCDIR)/shtty.h $(topdir)/sig.h -read.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h -read.o: $(topdir)/arrayfunc.h ../pathnames.h -return.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -return.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -return.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -return.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -return.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h -return.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.h -return.o: ../pathnames.h -set.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -set.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h -set.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -set.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -set.o: $(BASHINCDIR)/maxpath.h $(topdir)/error.h $(topdir)/sig.h -set.o: $(topdir)/arrayfunc.h ../pathnames.h $(topdir)/parser.h -setattr.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -setattr.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h -setattr.o: $(topdir)/quit.h $(srcdir)/common.h $(srcdir)/bashgetopt.h -setattr.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h -setattr.o: $(topdir)/externs.h $(topdir)/flags.h $(topdir)/sig.h -setattr.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h -setattr.o: $(topdir)/conftypes.h $(topdir)/execute_cmd.h -setattr.o: $(topdir)/arrayfunc.h ../pathnames.h -shift.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -shift.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -shift.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -shift.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -shift.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -shift.o: ../pathnames.h -shopt.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -shopt.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -shopt.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -shopt.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -shopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -shopt.o: $(srcdir)/common.h $(srcdir)/bashgetopt.h ../pathnames.h -shopt.o: $(topdir)/bashhist.h $(topdir)/bashline.h $(topdir)/sig.h -source.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -source.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/findcmd.h -source.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -source.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -source.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -source.o: $(srcdir)/bashgetopt.h $(topdir)/flags.h $(topdir)/trap.h -source.o: $(topdir)/execute_cmd.h -source.o: ../pathnames.h -suspend.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -suspend.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -suspend.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -suspend.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -suspend.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -suspend.o: $(topdir)/jobs.h ../pathnames.h -test.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -test.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -test.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -test.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -test.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -test.o: $(topdir)/execute_cmd.h $(topdir)/test.h ../pathnames.h -times.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -times.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -times.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -times.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -times.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -times.o: $(BASHINCDIR)/posixtime.h ../pathnames.h -trap.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -trap.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/externs.h -trap.o: $(topdir)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h $(topdir)/sig.h -trap.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h -trap.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -trap.o: $(topdir)/findcmd.h ../pathnames.h -type.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -type.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -type.o: $(topdir)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h $(topdir)/sig.h -type.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h -type.o: $(topdir)/execute_cmd.h $(topdir)/parser.h -type.o: $(topdir)/externs.h $(topdir)/hashcmd.h ../pathnames.h -type.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -ulimit.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -ulimit.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -ulimit.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -ulimit.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -ulimit.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -ulimit.o: ../pathnames.h -umask.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -umask.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -umask.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -umask.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -umask.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -umask.o: $(BASHINCDIR)/chartypes.h ../pathnames.h -wait.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -wait.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -wait.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h -wait.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -wait.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h -wait.o: $(topdir)/jobs.h $(topdir)/sig.h $(topdir)/execute_cmd.h -wait.o: $(BASHINCDIR)/chartypes.h ../pathnames.h - -complete.o: ../config.h ../pathnames.h -complete.o: ${topdir}/shell.h $(topdir)/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h ${topdir}/sig.h -complete.o: ${topdir}/unwind_prot.h ${topdir}/variables.h -complete.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -complete.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -complete.o: ${topdir}/builtins.h ${topdir}/general.h -complete.o: ${topdir}/bashtypes.h ${BASHINCDIR}/chartypes.h ${topdir}/xmalloc.h -complete.o: ${topdir}/pcomplete.h -complete.o: ${srcdir}/common.h ${srcdir}/bashgetopt.h -mapfile.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h -mapfile.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h -mapfile.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/sig.h -mapfile.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h -mapfile.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/variables.h $(topdir)/conftypes.h -mapfile.o: $(topdir)/arrayfunc.h ../pathnames.h - -#bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h - -# libintl dependencies -bind.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -break.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -caller.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -cd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -common.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -complete.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -declare.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -enable.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -evalfile.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -exec.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -exit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -fc.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -fg_bg.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -getopt.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -hash.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -help.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -history.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -inlib.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -jobs.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -kill.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -let.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -mapfile.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -mkbuiltins.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -printf.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -pushd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -read.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -return.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -set.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -setattr.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -shift.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -shopt.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -source.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -suspend.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -type.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -ulimit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -umask.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h diff --git a/bash-5.1/builtins/common.c b/bash-5.1/builtins/common.c index 3c9ac49de174891d6e79b68e04077ec134ee5b64..f4a823cac437d27a8e55a5e971ac1722484d1a22 100644 --- a/bash-5.1/builtins/common.c +++ b/bash-5.1/builtins/common.c @@ -613,6 +613,7 @@ read_octal (string) FOR_WHOM is the name of the caller for error printing. */ char *the_current_working_directory = (char *)NULL; +// job.c : dir = get_working_directory ("job-working-directory"); char * get_working_directory (for_whom) char *for_whom; diff --git a/bash-5.1/builtins/read.def b/bash-5.1/builtins/read.def index b28ed06f60a416864445ca94643617a18b9cce69..6279564cd1b974d9ed3f2f559f8381c4c03f225e 100644 --- a/bash-5.1/builtins/read.def +++ b/bash-5.1/builtins/read.def @@ -135,7 +135,7 @@ static sighandler sigalrm PARAMS((int)); static void reset_alarm PARAMS((void)); /* Try this to see what the rest of the shell can do with the information. */ -procenv_t alrmbuf; +extern procenv_t alrmbuf; int sigalrm_seen; static int reading, tty_modified; diff --git a/bash-5.1/builtins/wait.def b/bash-5.1/builtins/wait.def index c55204ef08b7a2f24b54d4bd19b9e9195a604912..7c843e20bdf6d88fe85327c9f8ad995ac1ed005f 100644 --- a/bash-5.1/builtins/wait.def +++ b/bash-5.1/builtins/wait.def @@ -88,7 +88,7 @@ $END extern int wait_signal_received; extern procenv_t wait_intr_buf; -int wait_intr_flag; +extern int wait_intr_flag; static int set_waitlist PARAMS((WORD_LIST *)); static void unset_waitlist PARAMS((void)); diff --git a/bash-5.1/builtins_rust/alias/src/lib.rs b/bash-5.1/builtins_rust/alias/src/lib.rs index ed6eea91d8d859eb777dccc6045fbe5268e6768f..4f45bf50aa58a17926153b4f22990fdfe5c3ac70 100644 --- a/bash-5.1/builtins_rust/alias/src/lib.rs +++ b/bash-5.1/builtins_rust/alias/src/lib.rs @@ -1,11 +1,13 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later use std::ffi::CStr; //extern crate rcommon; -use rcommon::r_sh_notfound; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE,r_builtin_usage,SHELL_VAR}; + +use rcommon::{ + r_builtin_usage, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE, SHELL_VAR, +}; use rhelp::r_builtin_help; use std::ffi::CString; extern "C" { @@ -31,9 +33,9 @@ extern "C" { fn sh_chkwrite(_: libc::c_int) -> libc::c_int; static mut loptend: *mut WordList; fn internal_getopt(_: *mut WordList, _: *mut libc::c_char) -> libc::c_int; - fn find_user_command(name:*const libc::c_char)->*mut libc::c_char; + fn find_user_command(name: *const libc::c_char) -> *mut libc::c_char; fn find_shell_builtin(builtin: *mut libc::c_char) -> *mut libc::c_char; - fn find_function (name:* const libc::c_char)-> *mut SHELL_VAR; + fn find_function(name: *const libc::c_char) -> *mut SHELL_VAR; fn reset_internal_getopt(); } pub type SizeT = libc::c_ulong; @@ -63,18 +65,22 @@ pub struct alias { pub flags: libc::c_char, } pub type AliasT = alias; -pub static AL_REUSABLE:i32 = 0x01; +pub static AL_REUSABLE: i32 = 0x01; #[no_mangle] pub unsafe extern "C" fn r_alias_builtin(mut list: *mut WordList) -> libc::c_int { let mut any_failed; let mut offset; - let mut pflag ; - let mut dflags ; - let alias_list: *mut *mut AliasT; + let mut pflag; + let mut dflags; + let alias_list: *mut *mut AliasT; let mut t: *mut AliasT; let mut name: *mut libc::c_char; let mut value: *mut libc::c_char; - dflags = if posixly_correct != 0 { 0 as libc::c_int } else { 0x1 as libc::c_int }; + dflags = if posixly_correct != 0 { + 0 as libc::c_int + } else { + 0x1 as libc::c_int + }; pflag = 0 as libc::c_int; reset_internal_getopt(); loop { @@ -87,7 +93,7 @@ pub unsafe extern "C" fn r_alias_builtin(mut list: *mut WordList) -> libc::c_int } match offset as u8 { b'p' => { - pflag = 1 ; + pflag = 1; dflags |= AL_REUSABLE; } _ => { @@ -130,23 +136,24 @@ pub unsafe extern "C" fn r_alias_builtin(mut list: *mut WordList) -> libc::c_int } if offset != 0 && *name.offset(offset as isize) as libc::c_int == '=' as i32 { *name.offset(offset as isize) = '\u{0}' as i32 as libc::c_char; - value = name.offset(offset as isize).offset(1 as libc::c_int as isize); + value = name + .offset(offset as isize) + .offset(1 as libc::c_int as isize); if legal_alias_name(name, 0) == 0 { builtin_error( dcgettext( 0 as *const libc::c_char, - b"`%s': invalid alias name\0" as *const u8 - as *const libc::c_char, + b"`%s': invalid alias name\0" as *const u8 as *const libc::c_char, 5 as libc::c_int, ), name, ); any_failed += 1; } else { - let slice= CStr::from_ptr(value); - let mut r_str=slice.to_str().unwrap().to_owned(); - let new_str = CString::new(r_str).unwrap(); - if legal_alias_rust(name,new_str.as_ptr() as *mut libc::c_char) == 0 { + let slice = CStr::from_ptr(value); + let r_str = slice.to_str().unwrap().to_owned(); + let new_str = CString::new(r_str).unwrap(); + if legal_alias_rust(name, new_str.as_ptr() as *mut libc::c_char) == 0 { add_alias(name, value); } } @@ -161,7 +168,11 @@ pub unsafe extern "C" fn r_alias_builtin(mut list: *mut WordList) -> libc::c_int } list = (*list).next; } - return if any_failed != 0 {EXECUTION_FAILURE!()} else { EXECUTION_SUCCESS!()}; + return if any_failed != 0 { + EXECUTION_FAILURE!() + } else { + EXECUTION_SUCCESS!() + }; } #[no_mangle] pub unsafe extern "C" fn r_unalias_builtin(mut list: *mut WordList) -> libc::c_int { @@ -212,94 +223,125 @@ pub unsafe extern "C" fn r_unalias_builtin(mut list: *mut WordList) -> libc::c_i } list = (*list).next; } - return if aflag != 0 { 1 as libc::c_int } else { 0 as libc::c_int }; + return if aflag != 0 { + 1 as libc::c_int + } else { + 0 as libc::c_int + }; } -unsafe extern "C" fn print_alias( alias: *mut AliasT, flags: libc::c_int) { +unsafe extern "C" fn print_alias(alias: *mut AliasT, flags: libc::c_int) { let value: *mut libc::c_char; value = sh_single_quote((*alias).value); if flags & 0x1 as libc::c_int != 0 { print!("alias "); //printf( // b"alias %s\0" as *const u8 as *const libc::c_char, - if !((*alias).name).is_null() - && *((*alias).name).offset(0 as libc::c_int as isize) as libc::c_int - == '-' as i32 - { - // b"-- \0" as *const u8 as *const libc::c_char - print!("-- "); - } else { - // b"\0" as *const u8 as *const libc::c_char - print!(" "); - } + if !((*alias).name).is_null() + && *((*alias).name).offset(0 as libc::c_int as isize) as libc::c_int == '-' as i32 + { + // b"-- \0" as *const u8 as *const libc::c_char + print!("-- "); + } else { + // b"\0" as *const u8 as *const libc::c_char + print!(" "); + } //); } - println!("{}={}", CStr::from_ptr((*alias).name).to_string_lossy().into_owned(), CStr::from_ptr(value).to_string_lossy().into_owned()); + println!( + "{}={}", + CStr::from_ptr((*alias).name).to_string_lossy().into_owned(), + CStr::from_ptr(value).to_string_lossy().into_owned() + ); free(value as *mut libc::c_void); } -unsafe fn legal_alias_rust(name :*mut libc::c_char,value :*mut libc::c_char ) -> libc::c_int { - - let mut name_w:*mut libc::c_char; - let mut value_w:*mut libc::c_char; - let mut new_value:*mut libc::c_char; - let mut new_value_2:*mut libc::c_char; - let mut shell_bui : *mut libc::c_char; +unsafe fn legal_alias_rust(name: *mut libc::c_char, value: *mut libc::c_char) -> libc::c_int { + let name_w: *mut libc::c_char; + let value_w: *mut libc::c_char; + let new_value: *mut libc::c_char; + let mut new_value_2: *mut libc::c_char; + let mut _shell_bui: *mut libc::c_char; let mut t: *mut AliasT; - let mut dflags ; - dflags = if posixly_correct != 0 { 0 as libc::c_int } else { 0x1 as libc::c_int }; - - if libc::strstr(value,CString::new(";").unwrap().as_ptr() as *mut libc::c_char) != std::ptr::null_mut() { + let dflags; + dflags = if posixly_correct != 0 { + 0 as libc::c_int + } else { + 0x1 as libc::c_int + }; + + if libc::strstr( + value, + CString::new(";").unwrap().as_ptr() as *mut libc::c_char, + ) != std::ptr::null_mut() + { println!("; is not allow in alias"); - return 1; + return 1; } t = find_alias(name); if !t.is_null() { - println!("{} is already in alias", CStr::from_ptr(name).to_string_lossy().into_owned()); + println!( + "{} is already in alias", + CStr::from_ptr(name).to_string_lossy().into_owned() + ); print_alias(t, dflags); - return 1; + return 1; } name_w = find_user_command(name); new_value = sh_single_quote(value); // 按照空格区分 - new_value_2 = libc::strtok(value, CString::new(" ").unwrap().as_ptr() as *mut libc::c_char) ; + new_value_2 = libc::strtok( + value, + CString::new(" ").unwrap().as_ptr() as *mut libc::c_char, + ); t = find_alias(new_value_2); while t != std::ptr::null_mut() { - new_value_2 = libc::strtok((*t).value, CString::new(" ").unwrap().as_ptr() as *mut libc::c_char) ; - if libc::strcmp((*t).name,new_value_2) == 0 { + new_value_2 = libc::strtok( + (*t).value, + CString::new(" ").unwrap().as_ptr() as *mut libc::c_char, + ); + if libc::strcmp((*t).name, new_value_2) == 0 { break; } t = find_alias(new_value_2); } - let arr:[ *mut libc::c_char;7] = [CString::new("exec").unwrap().into_raw() as *mut libc::c_char, - CString::new("eval").unwrap().into_raw() as *mut libc::c_char, - CString::new("builtin").unwrap().into_raw() as *mut libc::c_char, - CString::new("command").unwrap().into_raw() as *mut libc::c_char, - CString::new("function").unwrap().into_raw() as *mut libc::c_char, - CString::new("source").unwrap().into_raw() as *mut libc::c_char, - CString::new(".").unwrap().into_raw() as *mut libc::c_char ]; - + let arr: [*mut libc::c_char; 7] = [ + CString::new("exec").unwrap().into_raw() as *mut libc::c_char, + CString::new("eval").unwrap().into_raw() as *mut libc::c_char, + CString::new("builtin").unwrap().into_raw() as *mut libc::c_char, + CString::new("command").unwrap().into_raw() as *mut libc::c_char, + CString::new("function").unwrap().into_raw() as *mut libc::c_char, + CString::new("source").unwrap().into_raw() as *mut libc::c_char, + CString::new(".").unwrap().into_raw() as *mut libc::c_char, + ]; + for index in 0..7 { if libc::strcmp(new_value_2, arr[index]) == 0 { - println!("command {} will raise an unsafe operation",CStr::from_ptr(arr[index]).to_string_lossy().into_owned()); - return 1; + println!( + "command {} will raise an unsafe operation", + CStr::from_ptr(arr[index]).to_string_lossy().into_owned() + ); + return 1; } } value_w = find_user_command(new_value_2); - if name_w != std::ptr::null_mut(){ - if value_w != std::ptr::null_mut() && libc::strcmp(name_w, value_w) == 0 { + if name_w != std::ptr::null_mut() { + if value_w != std::ptr::null_mut() && libc::strcmp(name_w, value_w) == 0 { return 0; - } - else { + } else { println!("The name and value point to different executable files"); - return 1 ; - } - } - else { - if find_shell_builtin(name) != std::ptr::null_mut() { - println!("name {} is shell builtin",CStr::from_ptr(name).to_string_lossy().into_owned()); return 1; } - else if find_function(name) != std::ptr::null_mut() { - println!("name {} is function",CStr::from_ptr(name).to_string_lossy().into_owned()); + } else { + if find_shell_builtin(name) != std::ptr::null_mut() { + println!( + "name {} is shell builtin", + CStr::from_ptr(name).to_string_lossy().into_owned() + ); + return 1; + } else if find_function(name) != std::ptr::null_mut() { + println!( + "name {} is function", + CStr::from_ptr(name).to_string_lossy().into_owned() + ); return 1; } } diff --git a/bash-5.1/builtins_rust/bind/src/lib.rs b/bash-5.1/builtins_rust/bind/src/lib.rs index 45246a3e4de25f426c884bb403e9f994ab6052ce..d1fd07a273826614722607b43cd0573b6b0530a9 100644 --- a/bash-5.1/builtins_rust/bind/src/lib.rs +++ b/bash-5.1/builtins_rust/bind/src/lib.rs @@ -1,179 +1,213 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later extern crate libc; extern crate nix; extern crate rcommon; -use libc::{c_char,c_int,strerror,free, c_void, strlen, size_t,}; -use std::{ffi::{CString,CStr}}; -use std::fs::File; +use libc::{c_char, c_int, c_void, free, size_t, strerror, strlen}; use nix::errno::errno; -use rcommon::{r_builtin_usage,r_sh_chkwrite,err_translate_fn,translate_fn}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; +use rcommon::{err_translate_fn, r_builtin_usage, r_sh_chkwrite, translate_fn}; +use rcommon::{WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; +use std::ffi::{CStr, CString}; +use std::fs::File; -#[repr (C)] -pub struct _keymap_entry{ - pub Type:c_char, - pub function:rl_command_func_t, +#[repr(C)] +pub struct _keymap_entry { + pub Type: c_char, + pub function: rl_command_func_t, } type KEYMAP_ENTRY = _keymap_entry; type Keymap = *mut KEYMAP_ENTRY; -type rl_command_func_t = extern fn(c_int,c_int)->c_int; +type rl_command_func_t = extern "C" fn(c_int, c_int) -> c_int; //emun #[macro_export] macro_rules! LFLAG { - () => { 0x0001 } + () => { + 0x0001 + }; } #[macro_export] macro_rules! PFLAG { - () => { 0x0002 } + () => { + 0x0002 + }; } #[macro_export] macro_rules! FFLAG { - () => { 0x0004 } + () => { + 0x0004 + }; } #[macro_export] macro_rules! VFLAG { - () => { 0x0008 } + () => { + 0x0008 + }; } #[macro_export] macro_rules! QFLAG { - () => { 0x0010 } + () => { + 0x0010 + }; } #[macro_export] macro_rules! MFLAG { - () => { 0x0020 } + () => { + 0x0020 + }; } #[macro_export] macro_rules! RFLAG { - () => { 0x0040 } + () => { + 0x0040 + }; } #[macro_export] macro_rules! PPFLAG { - () => { 0x0080 } + () => { + 0x0080 + }; } #[macro_export] macro_rules! VVFLAG { - () => { 0x0100 } + () => { + 0x0100 + }; } #[macro_export] macro_rules! SFLAG { - () => { 0x0200 } + () => { + 0x0200 + }; } #[macro_export] macro_rules! SSFLAG { - () => { 0x0400 } + () => { + 0x0400 + }; } #[macro_export] macro_rules! UFLAG { - () => { 0x0800 } + () => { + 0x0800 + }; } #[macro_export] macro_rules! XFLAG { - () => { 0x1000 } + () => { + 0x1000 + }; } #[macro_export] macro_rules! XXFLAG { - () => { 0x2000 } + () => { + 0x2000 + }; } #[macro_export] macro_rules! ISKMAP { - () => { 1 } + () => { + 1 + }; } #[macro_export] -macro_rules! KEYMAP_SIZE{ - () => { 257 } +macro_rules! KEYMAP_SIZE { + () => { + 257 + }; } #[macro_export] -macro_rules! ANYOTHERKEY{ - () => { KEYMAP_SIZE!() - 1} +macro_rules! ANYOTHERKEY { + () => { + KEYMAP_SIZE!() - 1 + }; } - -extern "C"{ +extern "C" { fn dcgettext( __domainname: *const libc::c_char, __msgid: *const libc::c_char, __category: libc::c_int, ) -> *mut libc::c_char; - static no_line_editing:i32; - static bash_readline_initialized:i32; - static mut rl_outstream:*mut File; - static stdout:*mut File; - static list_optarg:*mut c_char; - static loptend:*mut WordList; - - fn builtin_warning(format:*const c_char,...); + static no_line_editing: i32; + static bash_readline_initialized: i32; + static mut rl_outstream: *mut File; + static stdout: *mut File; + static list_optarg: *mut c_char; + static loptend: *mut WordList; + + fn builtin_warning(format: *const c_char, ...); fn initialize_readline(); - fn begin_unwind_frame(tar:*mut c_char); - fn run_unwind_frame(tag:*mut c_char); - fn unwind_protect_mem(var:*mut c_char,size:i32); + fn begin_unwind_frame(tar: *mut c_char); + fn run_unwind_frame(tag: *mut c_char); + fn unwind_protect_mem(var: *mut c_char, size: i32); fn reset_internal_getopt(); - fn internal_getopt(list:*mut WordList,opts:*mut c_char)->i32; + fn internal_getopt(list: *mut WordList, opts: *mut c_char) -> i32; // fn builtin_usage(); - fn rl_set_keymap(map:Keymap); + fn rl_set_keymap(map: Keymap); // fn sh_chkwrite(s:i32)->i32; - fn builtin_error(format:*const c_char,...); - fn rl_named_function(string:*const c_char)->*mut rl_command_func_t; - fn rl_invoking_keyseqs(function:*mut rl_command_func_t)->*mut *mut c_char; - fn strvec_dispose(array:*mut *mut c_char); - fn rl_unbind_function_in_map(func:*mut rl_command_func_t,map:Keymap)->i32; - fn rl_get_keymap()->Keymap; - fn unbind_unix_command(kseq:*mut c_char)->i32; - fn bash_execute_unix_command(count:i32,key:i32)->i32; - fn rl_bind_keyseq(keyseq:*const c_char,function:*mut rl_command_func_t)->i32; - fn rl_function_of_keyseq_len(keyseq:*const c_char,len:size_t,map:Keymap,Type:*mut i32)->*mut rl_command_func_t; - fn rl_translate_keyseq(seq:*const c_char,array:*mut c_char,len:*mut i32)->i32; - fn xmalloc(n:size_t)->*mut c_void; - fn rl_get_keymap_by_name(name:*const c_char)->Keymap; + fn builtin_error(format: *const c_char, ...); + fn rl_named_function(string: *const c_char) -> *mut rl_command_func_t; + fn rl_invoking_keyseqs(function: *mut rl_command_func_t) -> *mut *mut c_char; + fn strvec_dispose(array: *mut *mut c_char); + fn rl_unbind_function_in_map(func: *mut rl_command_func_t, map: Keymap) -> i32; + fn rl_get_keymap() -> Keymap; + fn unbind_unix_command(kseq: *mut c_char) -> i32; + fn bash_execute_unix_command(count: i32, key: i32) -> i32; + fn rl_bind_keyseq(keyseq: *const c_char, function: *mut rl_command_func_t) -> i32; + fn rl_function_of_keyseq_len( + keyseq: *const c_char, + len: size_t, + map: Keymap, + Type: *mut i32, + ) -> *mut rl_command_func_t; + fn rl_translate_keyseq(seq: *const c_char, array: *mut c_char, len: *mut i32) -> i32; + fn xmalloc(n: size_t) -> *mut c_void; + fn rl_get_keymap_by_name(name: *const c_char) -> Keymap; fn rl_list_funmap_names(); - fn rl_function_dumper(print_readably:i32); - fn rl_macro_dumper(print_readably:i32); - fn rl_variable_dumper(print_readably:i32); - fn rl_read_init_file(filename:*const c_char)->i32; - fn printable_filename(Fn:*mut c_char,flags:i32)->*mut c_char; + fn rl_function_dumper(print_readably: i32); + fn rl_macro_dumper(print_readably: i32); + fn rl_variable_dumper(print_readably: i32); + fn rl_read_init_file(filename: *const c_char) -> i32; + fn printable_filename(Fn: *mut c_char, flags: i32) -> *mut c_char; // fn query_bindings(name:*mut c_char)->i32; // fn unbind_command(name:*mut c_char)->i32; // fn unbind_keyseq(seq:*mut c_char)->i32; - fn bind_keyseq_to_unix_command(line:*mut c_char)->i32; - fn print_unix_command_map()->i32; - fn strvec_len(array:*mut *mut c_char)->i32; - fn rl_parse_and_bind(string:*mut c_char)->i32; - fn strvec_search(array:*mut *mut c_char,name:*mut c_char)->i32; + fn bind_keyseq_to_unix_command(line: *mut c_char) -> i32; + fn print_unix_command_map() -> i32; + fn strvec_len(array: *mut *mut c_char) -> i32; + fn rl_parse_and_bind(string: *mut c_char) -> i32; + fn strvec_search(array: *mut *mut c_char, name: *mut c_char) -> i32; } - #[no_mangle] -pub extern "C" fn r_bind_builtin(mut list:*mut WordList)->i32{ - let mut return_code:i32; - let mut kmap:Keymap; - let mut saved_keymap:Keymap; - let mut flags:i32; - let mut opt:i32; - let mut initfile:*mut c_char; - let mut map_name:*mut c_char; - let mut fun_name:*mut c_char; - let mut unbind_name:*mut c_char; - let mut remove_seq:*mut c_char; - let mut cmd_seq:*mut c_char; - let t:*mut c_char; - - unsafe{ - if no_line_editing != 0{ - builtin_warning( - dcgettext( +pub extern "C" fn r_bind_builtin(mut list: *mut WordList) -> i32 { + let mut return_code: i32; + let mut kmap: Keymap; + let mut saved_keymap: Keymap; + let mut flags: i32; + let mut opt: i32; + let mut initfile: *mut c_char; + let mut map_name: *mut c_char; + let mut fun_name: *mut c_char; + let mut unbind_name: *mut c_char; + let mut remove_seq: *mut c_char; + let mut cmd_seq: *mut c_char; + let t: *mut c_char; + + unsafe { + if no_line_editing != 0 { + builtin_warning(dcgettext( 0 as *const libc::c_char, CString::new("line editing not enabled").unwrap().as_ptr() as *const libc::c_char, 5 as libc::c_int, - ), - ); - + )); } kmap = std::ptr::null_mut(); diff --git a/bash-5.1/builtins_rust/break_1/src/lib.rs b/bash-5.1/builtins_rust/break_1/src/lib.rs index 1b81ba00acb29994253a36efaf8bd539ea74eeb8..9da3f71b7731e0049b5b0ca84d80c51945cc1a23 100644 --- a/bash-5.1/builtins_rust/break_1/src/lib.rs +++ b/bash-5.1/builtins_rust/break_1/src/lib.rs @@ -1,18 +1,17 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later #[macro_use] #[warn(temporary_cstring_as_ptr)] -extern crate libc; +extern crate libc; extern crate nix; -use std::ffi::CString; use libc::c_long; +use std::ffi::CString; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; +use rcommon::{WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; - type intmax_t = c_long; /* #[macro_export] @@ -32,100 +31,103 @@ macro_rules! CHECK_HELPOPT { } } */ -fn checkhelp(l: *mut WordList) -> i32{ +fn checkhelp(l: *mut WordList) -> i32 { unsafe { - let tmp=CString::new("--help").unwrap(); - if l!=std::ptr::null_mut() && (*l).word !=std::ptr::null_mut() && - libc::strcmp((*((*l).word)).word, tmp.as_ptr()) == 0 { + let tmp = CString::new("--help").unwrap(); + if l != std::ptr::null_mut() + && (*l).word != std::ptr::null_mut() + && libc::strcmp((*((*l).word)).word, tmp.as_ptr()) == 0 + { r_builtin_help(); } - return EX_USAGE; + return EX_USAGE; } } extern "C" { - fn get_numeric_arg(list :*mut WordList, i: i32 , intmax :*mut intmax_t) -> i32; - // fn get_loop_level() -> i32; + fn get_numeric_arg(list: *mut WordList, i: i32, intmax: *mut intmax_t) -> i32; + // fn get_loop_level() -> i32; //fn set_continuing(cont : i32); //fn set_breaking(breaking : i32); - fn sh_erange (s:* mut libc::c_char, desc:* mut libc::c_char); + fn sh_erange(s: *mut libc::c_char, desc: *mut libc::c_char); //pub static fn check_loop_level () -> i64; /* Non-zero when a "break" instruction is encountered. */ - pub static posixly_correct :i32; - static mut breaking : i32; - static mut continuing : i32; - static mut loop_level : i32; - fn builtin_error(err:*const libc::c_char,...); + pub static posixly_correct: i32; + static mut breaking: i32; + static mut continuing: i32; + static mut loop_level: i32; + fn builtin_error(err: *const libc::c_char, ...); } #[no_mangle] -pub extern "C" fn r_break_builtin(mut list :*mut WordList) -> i32 { +pub extern "C" fn r_break_builtin(list: *mut WordList) -> i32 { //println!("enter r_break_builtin"); - let mut newbreak : intmax_t = 1 as intmax_t; + let mut newbreak: intmax_t = 1 as intmax_t; unsafe { checkhelp(list); //CHECK_HELPOPT! (list); - if check_loop_level() == 0 { - return EXECUTION_SUCCESS!(); - } + if check_loop_level() == 0 { + return EXECUTION_SUCCESS!(); + } get_numeric_arg(list, 1, &mut newbreak as *mut intmax_t); - if newbreak <= 0{ - let mut tmp = CString::new("loop count ").unwrap(); - sh_erange ((*(*list).word).word, tmp.as_ptr() as * mut libc::c_char); + if newbreak <= 0 { + let tmp = CString::new("loop count ").unwrap(); + sh_erange((*(*list).word).word, tmp.as_ptr() as *mut libc::c_char); //set_breaking (get_loop_level()); - breaking = loop_level; - return EXECUTION_FAILURE!(); - } + breaking = loop_level; + return EXECUTION_FAILURE!(); + } - if newbreak > loop_level as libc::c_long{ - newbreak = loop_level as i64; - } - breaking = newbreak as i32; - // set_breaking(newbreak as i32); - } - return (EXECUTION_SUCCESS!()); + if newbreak > loop_level as libc::c_long { + newbreak = loop_level as i64; + } + breaking = newbreak as i32; + // set_breaking(newbreak as i32); + } + return EXECUTION_SUCCESS!(); } #[no_mangle] -pub extern "C" fn r_continue_builtin (mut list :*mut WordList) -> i32 { - let mut newcont : intmax_t = 0 as intmax_t; +pub extern "C" fn r_continue_builtin(list: *mut WordList) -> i32 { + let mut newcont: intmax_t = 0 as intmax_t; unsafe { //CHECK_HELPOPT! (list); checkhelp(list); } if check_loop_level() == 0 { - return (EXECUTION_SUCCESS!()); + return EXECUTION_SUCCESS!(); } unsafe { - get_numeric_arg(list, 1, &mut newcont as *mut intmax_t); + get_numeric_arg(list, 1, &mut newcont as *mut intmax_t); } unsafe { - if newcont <= 0{ - let mut tmp = CString::new("loop count ").unwrap(); - sh_erange ((*(*list).word).word, tmp.as_ptr() as * mut libc::c_char); - //set_breaking(get_loop_level()); - breaking = loop_level; - return (EXECUTION_FAILURE!()); - } - if newcont > loop_level.into(){ - newcont = loop_level as i64; - } - continuing = newcont as i32; - //set_continuing(newcont as i32); - + if newcont <= 0 { + let tmp = CString::new("loop count ").unwrap(); + sh_erange((*(*list).word).word, tmp.as_ptr() as *mut libc::c_char); + //set_breaking(get_loop_level()); + breaking = loop_level; + return EXECUTION_FAILURE!(); + } + if newcont > loop_level.into() { + newcont = loop_level as i64; + } + continuing = newcont as i32; + //set_continuing(newcont as i32); } - return (EXECUTION_SUCCESS!()); + return EXECUTION_SUCCESS!(); } #[no_mangle] -pub extern "C" fn check_loop_level () -> i32 { -unsafe { - if loop_level == 0 && posixly_correct == 0 { - builtin_error (b"only meaningful in a `for`, `while`, or until `loop` \0" as *const u8 as *const libc::c_char); - return 0; - } - loop_level -} +pub extern "C" fn check_loop_level() -> i32 { + unsafe { + if loop_level == 0 && posixly_correct == 0 { + builtin_error( + b"only meaningful in a `for`, `while`, or until `loop` \0" as *const u8 + as *const libc::c_char, + ); + return 0; + } + loop_level + } } - diff --git a/bash-5.1/builtins_rust/build.rs b/bash-5.1/builtins_rust/build.rs index ef4e40582b2ab1f45428e5ec56fc7ea28c399942..f17036b088d6a3e757652ca6cb1aaaef12b2e36f 100644 --- a/bash-5.1/builtins_rust/build.rs +++ b/bash-5.1/builtins_rust/build.rs @@ -1,24 +1,29 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later +use std::env; - use std::{env}; - - fn main() { - - let library_dir = "/opt/rsbash/builtins"; - let libsh_dir = "./lib/sh/"; - let exe_dir = "/opt/rsbash/"; - - println!("cargo:rustc-link-search=native={}", env::join_paths(&[library_dir ]).unwrap().to_str().unwrap()); - println!("cargo:rustc-link-search=native={}", env::join_paths(&[ exe_dir]).unwrap().to_str().unwrap()); - println!("cargo:rustc-link-search=native={}", env::join_paths(&[ libsh_dir]).unwrap().to_str().unwrap()); - - println!("cargo:rustc-link-args=-Wl,--copy-dt-needed-entries -fpic"); - - println!("cargo:rustc-flags=-l static=sh"); - println!("cargo:rustc-flags=-l dylib=rt"); +fn main() { + let library_dir = "/opt/rsbash/builtins"; + let libsh_dir = "./lib/sh/"; + let exe_dir = "/opt/rsbash/"; - - } + println!( + "cargo:rustc-link-search=native={}", + env::join_paths(&[library_dir]).unwrap().to_str().unwrap() + ); + println!( + "cargo:rustc-link-search=native={}", + env::join_paths(&[exe_dir]).unwrap().to_str().unwrap() + ); + println!( + "cargo:rustc-link-search=native={}", + env::join_paths(&[libsh_dir]).unwrap().to_str().unwrap() + ); + + println!("cargo:rustc-link-args=-Wl,--copy-dt-needed-entries -fpic"); + + println!("cargo:rustc-flags=-l static=sh"); + println!("cargo:rustc-flags=-l dylib=rt"); +} diff --git a/bash-5.1/builtins_rust/builtin.rs b/bash-5.1/builtins_rust/builtin.rs new file mode 100644 index 0000000000000000000000000000000000000000..dbbe28c1c20d9798c26e68f445fa95fab203c92a --- /dev/null +++ b/bash-5.1/builtins_rust/builtin.rs @@ -0,0 +1,19 @@ + + use std::{env}; + + fn main() { + + let library_dir = "/opt/rsbash/builtins"; + let libsh_dir = "./lib/sh/"; + let exe_dir = "/opt/rsbash/"; + + println!("cargo:rustc-link-search=native={}", env::join_paths(&[library_dir ]).unwrap().to_str().unwrap()); + println!("cargo:rustc-link-search=native={}", env::join_paths(&[ exe_dir]).unwrap().to_str().unwrap()); + println!("cargo:rustc-link-search=native={}", env::join_paths(&[ libsh_dir]).unwrap().to_str().unwrap()); + + println!("cargo:rustc-link-args=-Wl,--copy-dt-needed-entries -fpic"); + + println!("cargo:rustc-flags=-l static=sh"); + println!("cargo:rustc-flags=-l dylib=rt"); + + } diff --git a/bash-5.1/builtins_rust/builtin/src/intercdep.rs b/bash-5.1/builtins_rust/builtin/src/intercdep.rs index c7accbf57aa4d91e6f7ff0b01a893ffff57e9451..8cb09f10be32791bf233ca3a70e737f3f5e297cf 100644 --- a/bash-5.1/builtins_rust/builtin/src/intercdep.rs +++ b/bash-5.1/builtins_rust/builtin/src/intercdep.rs @@ -2,7 +2,7 @@ //# SPDX-License-Identifier: GPL-3.0-or-later -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; +use rcommon::{WordList, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; extern "C" { static mut loption :*mut WordList; diff --git a/bash-5.1/builtins_rust/builtin/src/lib.rs b/bash-5.1/builtins_rust/builtin/src/lib.rs index c386304a3754241e2f8a23823a9d5f2a91549ca3..9d48413667af578ab80b40e530f9c422d3267023 100644 --- a/bash-5.1/builtins_rust/builtin/src/lib.rs +++ b/bash-5.1/builtins_rust/builtin/src/lib.rs @@ -1,14 +1,14 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use libc::{c_int, c_char}; +use libc::{c_char, c_int}; use std::ffi::CStr; include!(concat!("intercdep.rs")); #[no_mangle] pub extern "C" fn r_builtin_builtin(mut list: *mut WordList) -> i32 { - unsafe{ - let mut function: Option:: = None; + unsafe { + let mut function: Option = None; if no_options(list) != 0 { return EX_USAGE; } @@ -16,7 +16,7 @@ pub extern "C" fn r_builtin_builtin(mut list: *mut WordList) -> i32 { if list == std::ptr::null_mut() { return EXECUTION_SUCCESS!(); } - let mut command: &CStr = CStr::from_ptr((*(*list).word).word as *mut c_char); + let command: &CStr = CStr::from_ptr((*(*list).word).word as *mut c_char); function = find_shell_builtin(command.as_ptr() as *mut c_char); if function.is_none() { sh_notbuiltin(command.as_ptr() as *mut c_char); @@ -30,4 +30,3 @@ pub extern "C" fn r_builtin_builtin(mut list: *mut WordList) -> i32 { }; } } - diff --git a/bash-5.1/builtins_rust/caller/src/lib.rs b/bash-5.1/builtins_rust/caller/src/lib.rs index 03f9a64c30da77716ddd8aea780ee2d259804808..dd7c4ae29af334e3b435c6b13ee31791c8b01b0f 100644 --- a/bash-5.1/builtins_rust/caller/src/lib.rs +++ b/bash-5.1/builtins_rust/caller/src/lib.rs @@ -1,33 +1,33 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later extern crate libc; extern crate rread; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; -use libc::{c_char,c_int,PT_NULL,c_long,}; -use std::ffi::{CStr,CString}; +use libc::{c_char, c_int, c_long, PT_NULL}; +use rcommon::{WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; +use std::ffi::{CStr, CString}; -use rread::{SHELL_VAR,ARRAY,intmax_t,}; use rhelp::r_builtin_help; +use rread::{intmax_t, ARRAY, SHELL_VAR}; #[macro_export] macro_rules! att_array { - () => { - 0x0000004 /* value is an array */ - } + () => { + 0x0000004 /* value is an array */ + }; } #[macro_export] macro_rules! att_cell { - ($var:expr) => { - return (*($var).value) as *mut ARRAY; - } + ($var:expr) => { + return (*($var).value) as *mut ARRAY; + }; } // #[macro_export] // macro_rules! array_empty { -// ($a:expr) => { +// ($a:expr) => { // if (*($a)).num_elements == 0{ // return true; // } @@ -41,7 +41,6 @@ macro_rules! att_cell { macro_rules! array_cell { ($var:expr) => { (*($var)).value as *mut ARRAY - }; } @@ -49,21 +48,21 @@ macro_rules! array_cell { macro_rules! GET_ARRAY_FROM_VAR { ($n:expr,$v:expr,$a:expr) => { $v = find_variable($n); - if ($v) != std::ptr::null_mut() && array_p($v) != 0{ + if ($v) != std::ptr::null_mut() && array_p($v) != 0 { $a = array_cell!($v); - } - else{ + } else { $a = 0 as *mut ARRAY; } - } + }; } - - #[macro_export] macro_rules! CHECK_HELPOPT { ($l:expr) => { - if $l != std::ptr::null_mut() && (*($l)).word != std::ptr::null_mut() && ISHELP((*(*($l)).word).word) == true{ + if $l != std::ptr::null_mut() + && (*($l)).word != std::ptr::null_mut() + && ISHELP((*(*($l)).word).word) == true + { r_builtin_help(); return EX_USAGE; } @@ -73,129 +72,125 @@ macro_rules! CHECK_HELPOPT { type arrayind_t = intmax_t; extern "C" { - static loptend:*mut WordList; + static loptend: *mut WordList; - fn find_variable(str:*const c_char)->*mut SHELL_VAR; - fn array_reference(a:*mut ARRAY,i:arrayind_t)->*mut c_char; + fn find_variable(str: *const c_char) -> *mut SHELL_VAR; + fn array_reference(a: *mut ARRAY, i: arrayind_t) -> *mut c_char; fn builtin_usage(); - fn no_options(list:*mut WordList)->i32; - fn legal_number(string:*mut c_char,result:*mut c_long)->i32; - fn sh_invalidnum(s:*mut c_char); + fn no_options(list: *mut WordList) -> i32; + fn legal_number(string: *mut c_char, result: *mut c_long) -> i32; + fn sh_invalidnum(s: *mut c_char); } - -unsafe fn STREQ(a:*const c_char,b:*const c_char)->bool{ - return *a == *b && libc::strcmp(a,b) == 0; +unsafe fn STREQ(a: *const c_char, b: *const c_char) -> bool { + return *a == *b && libc::strcmp(a, b) == 0; } -unsafe fn ISHELP(s:*const c_char)->bool{ +unsafe fn ISHELP(s: *const c_char) -> bool { // let s_str = CString::new("--help").unwrap().as_ptr(); - return STREQ( s,CString::new("--help").unwrap().as_ptr()); + return STREQ(s, CString::new("--help").unwrap().as_ptr()); } -unsafe fn array_p(var:*mut SHELL_VAR) ->i32 { +unsafe fn array_p(var: *mut SHELL_VAR) -> i32 { return (*var).attributes & att_array!(); } -unsafe fn array_empty(a:*mut ARRAY)->bool{ - - if (*a).num_elements == 0{ +unsafe fn array_empty(a: *mut ARRAY) -> bool { + if (*a).num_elements == 0 { return true; + } else { + return false; } - else{ - return false ; - } - } //rust #[no_mangle] -pub extern "C" fn r_caller_builtin(mut list:*mut WordList)->i32{ - let funcname_v:*mut SHELL_VAR ; - let bash_source_v:*mut SHELL_VAR; - let bash_lineno_v:*mut SHELL_VAR; - let funcname_a:*mut ARRAY; - let bash_source_a:*mut ARRAY; - let bash_lineno_a:*mut ARRAY; - let funcname_s:*mut c_char; - let mut source_s:*mut c_char; - let mut lineno_s:*mut c_char; - let mut num:intmax_t = 0; - - let mut c_str :CString; - - unsafe{ +pub extern "C" fn r_caller_builtin(mut list: *mut WordList) -> i32 { + let funcname_v: *mut SHELL_VAR; + let bash_source_v: *mut SHELL_VAR; + let bash_lineno_v: *mut SHELL_VAR; + let funcname_a: *mut ARRAY; + let bash_source_a: *mut ARRAY; + let bash_lineno_a: *mut ARRAY; + let funcname_s: *mut c_char; + let mut source_s: *mut c_char; + let mut lineno_s: *mut c_char; + let mut num: intmax_t = 0; + + let mut c_str: CString; + + unsafe { CHECK_HELPOPT!(list); let c_str1 = CString::new("FUNCNAME").unwrap(); let c_ptr1 = c_str1.as_ptr(); - GET_ARRAY_FROM_VAR!(c_ptr1,funcname_v,funcname_a); + GET_ARRAY_FROM_VAR!(c_ptr1, funcname_v, funcname_a); // GET_ARRAY_FROM_VAR!(CString::new("FUNCNAME").unwrap().as_ptr(),funcname_v,funcname_a); let c_str1 = CString::new("BASH_SOURCE").unwrap(); let c_ptr1 = c_str1.as_ptr(); - GET_ARRAY_FROM_VAR!(c_ptr1,bash_source_v,bash_source_a); + GET_ARRAY_FROM_VAR!(c_ptr1, bash_source_v, bash_source_a); // GET_ARRAY_FROM_VAR!(CString::new("BASH_SOURCE").unwrap().as_ptr(),bash_source_v,bash_source_a); let c_str1 = CString::new("BASH_LINENO").unwrap(); let c_ptr1 = c_str1.as_ptr(); - GET_ARRAY_FROM_VAR!(c_ptr1,bash_lineno_v,bash_lineno_a); + GET_ARRAY_FROM_VAR!(c_ptr1, bash_lineno_v, bash_lineno_a); // GET_ARRAY_FROM_VAR!(CString::new("BASH_LINENO").unwrap().as_ptr(),bash_lineno_v,bash_lineno_a); - if bash_lineno_a.is_null() || array_empty(bash_lineno_a){ + if bash_lineno_a.is_null() || array_empty(bash_lineno_a) { return EXECUTION_FAILURE!(); } - - if bash_source_a.is_null() || array_empty(bash_source_a){ + + if bash_source_a.is_null() || array_empty(bash_source_a) { return EXECUTION_FAILURE!(); } - - if no_options(list) != 0{ + + if no_options(list) != 0 { return EX_USAGE; } - list = loptend; /* skip over possible `--' */ + list = loptend; /* skip over possible `--' */ /* If there is no argument list, then give short form: line filename. */ if list.is_null() { - lineno_s = array_reference(bash_lineno_a,0); - source_s = array_reference(bash_source_a,1); - - if !lineno_s.is_null(){ + lineno_s = array_reference(bash_lineno_a, 0); + source_s = array_reference(bash_source_a, 1); + + if !lineno_s.is_null() { lineno_s = lineno_s; - } - else{ + } else { c_str = CString::new("NULL").unwrap(); lineno_s = c_str.as_ptr() as *mut c_char; } - if !source_s.is_null(){ + if !source_s.is_null() { source_s = source_s; - } - else{ + } else { c_str = CString::new("NULL").unwrap(); source_s = c_str.as_ptr() as *mut c_char; } let lineno_s_str = CStr::from_ptr(lineno_s).to_str().unwrap().to_owned(); let source_s_str = CStr::from_ptr(source_s).to_str().unwrap().to_owned(); - println!("{} {}",lineno_s_str,source_s_str); + println!("{} {}", lineno_s_str, source_s_str); - return EXECUTION_SUCCESS!(); + return EXECUTION_SUCCESS!(); } if funcname_a.is_null() || array_empty(funcname_a) { return EXECUTION_FAILURE!(); } - if legal_number((*(*list).word).word,&mut num) != 0{ - lineno_s = array_reference(bash_lineno_a,num); - source_s = array_reference(bash_source_a,num+1); - funcname_s = array_reference(funcname_a,num+1); - - if lineno_s == PT_NULL as *mut c_char || source_s == PT_NULL as *mut c_char || funcname_s == PT_NULL as *mut c_char{ + if legal_number((*(*list).word).word, &mut num) != 0 { + lineno_s = array_reference(bash_lineno_a, num); + source_s = array_reference(bash_source_a, num + 1); + funcname_s = array_reference(funcname_a, num + 1); + + if lineno_s == PT_NULL as *mut c_char + || source_s == PT_NULL as *mut c_char + || funcname_s == PT_NULL as *mut c_char + { return EXECUTION_FAILURE!(); } let lineno_s_str = CStr::from_ptr(lineno_s).to_str().unwrap().to_owned(); let funcname_s_str = CStr::from_ptr(funcname_s).to_str().unwrap().to_owned(); let source_s_str = CStr::from_ptr(source_s).to_str().unwrap().to_owned(); - println!("{} {} {}",lineno_s_str,funcname_s_str,source_s_str); - } - else{ + println!("{} {} {}", lineno_s_str, funcname_s_str, source_s_str); + } else { sh_invalidnum((*(*list).word).word); builtin_usage(); return EX_USAGE; @@ -204,5 +199,3 @@ pub extern "C" fn r_caller_builtin(mut list:*mut WordList)->i32{ return EXECUTION_SUCCESS!(); } } - - diff --git a/bash-5.1/builtins_rust/cd/src/lib.rs b/bash-5.1/builtins_rust/cd/src/lib.rs index d36749360275337daed7f970b1f81a6c40cb1632..f7ccfe3fd8b2075add0f314b4394a5abd846faa0 100644 --- a/bash-5.1/builtins_rust/cd/src/lib.rs +++ b/bash-5.1/builtins_rust/cd/src/lib.rs @@ -1,13 +1,13 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -extern crate libc; +extern crate libc; extern crate nix; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; +use rcommon::{WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use libc::{c_char, c_long, c_void}; -use std::{ffi::{CString, CStr}}; use rhelp::r_builtin_help; +use std::ffi::{CStr, CString}; #[repr(i8)] pub enum JOB_STATE { @@ -15,826 +15,914 @@ pub enum JOB_STATE { JRUNNING = 1, JSTOPPED = 2, JDEAD = 4, - JMIXED = 8 + JMIXED = 8, } #[repr(u8)] -enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, - cm_connection, cm_function_def, cm_until, cm_group, - cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc +enum command_type { + cm_for, + cm_case, + cm_while, + cm_if, + cm_simple, + cm_select, + cm_connection, + cm_function_def, + cm_until, + cm_group, + cm_arith, + cm_cond, + cm_arith_for, + cm_subshell, + cm_coproc, } #[repr(u8)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] enum r_instruction { - r_output_direction, r_input_direction, r_inputa_direction, - r_appending_to, r_reading_until, r_reading_string, - r_duplicating_input, r_duplicating_output, r_deblank_reading_until, - r_close_this, r_err_and_out, r_input_output, r_output_force, - r_duplicating_input_word, r_duplicating_output_word, - r_move_input, r_move_output, r_move_input_word, r_move_output_word, - r_append_err_and_out + r_output_direction, + r_input_direction, + r_inputa_direction, + r_appending_to, + r_reading_until, + r_reading_string, + r_duplicating_input, + r_duplicating_output, + r_deblank_reading_until, + r_close_this, + r_err_and_out, + r_input_output, + r_output_force, + r_duplicating_input_word, + r_duplicating_output_word, + r_move_input, + r_move_output, + r_move_input_word, + r_move_output_word, + r_append_err_and_out, } #[repr(C)] pub struct PROCESS { next: *mut PROCESS, - pid:libc::c_int, - status:libc::c_int, - running:libc::c_int, - command:*mut c_char + pid: libc::c_int, + status: libc::c_int, + running: libc::c_int, + command: *mut c_char, } #[repr(C)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] pub union REDIRECTEE { - dest:libc::c_int, - filename:* mut WordDesc + dest: libc::c_int, + filename: *mut WordDesc, } #[repr(C)] pub union REDIRECT { - next:*mut REDIRECT, /* Next element, or NULL. */ - redirector:REDIRECTEE, /* Descriptor or varname to be redirected. */ - rflags:libc::c_int, /* Private flags for this redirection */ - flags:libc::c_int, /* Flag value for `open'. */ - instruction:r_instruction, /* What to do with the information. */ - redirectee:REDIRECTEE, /* File descriptor or filename */ - here_doc_eof:*mut c_char /* The word that appeared in <*mut SHELL_VAR, /* Function called to return a `dynamic' - value for a variable, like $SECONDS - or $RANDOM. */ - assign_func:* mut fn(v:* mut SHELL_VAR,str1:* mut c_char,t:c_long,str2:* mut c_char)->*mut SHELL_VAR, /* Function called when this `special - variable' is assigned a value in - bind_variable. */ - attributes:i32, /* export, readonly, array, invisible... */ - context:i32 /* Which context this variable belongs to. */ + name: *mut c_char, /* Symbol that the user types. */ + value: *mut c_char, /* Value that is returned. */ + exportstr: *mut c_char, /* String for the environment. */ + dynamic_value: *mut fn(v: *mut SHELL_VAR) -> *mut SHELL_VAR, /* Function called to return a `dynamic' + value for a variable, like $SECONDS + or $RANDOM. */ + assign_func: *mut fn( + v: *mut SHELL_VAR, + str1: *mut c_char, + t: c_long, + str2: *mut c_char, + ) -> *mut SHELL_VAR, /* Function called when this `special + variable' is assigned a value in + bind_variable. */ + attributes: i32, /* export, readonly, array, invisible... */ + context: i32, /* Which context this variable belongs to. */ } - #[macro_export] macro_rules! DUP_JOB { - () => {-2} + () => { + -2 + }; } #[macro_export] macro_rules! readonly_p { - ($var:expr) => { - (*$var).attributes & 0x0000002 - } + ($var:expr) => { + (*$var).attributes & 0x0000002 + }; } #[macro_export] macro_rules! exported_p { - ($var:expr) => { - (*$var).attributes & 0x0000001 - } + ($var:expr) => { + (*$var).attributes & 0x0000001 + }; } #[macro_export] macro_rules! LCD_DOVARS { - () => { - 0x001 - } + () => { + 0x001 + }; } #[macro_export] macro_rules! LCD_DOSPELL { - () => { - 0x002 - } + () => { + 0x002 + }; } #[macro_export] macro_rules! LCD_PRINTPATH { - () => { - 0x004 - } + () => { + 0x004 + }; } #[macro_export] macro_rules! LCD_FREEDIRNAME { - () => { - 0x008 - } + () => { + 0x008 + }; } #[macro_export] macro_rules! MP_DOTILDE { - () => { - 0x01 - } + () => { + 0x01 + }; } #[macro_export] macro_rules! PATH_CHECKDOTDOT { - () => { - 0x0001 - } + () => { + 0x0001 + }; } #[macro_export] macro_rules! PATH_CHECKEXISTS { - () => { - 0x0002 - } + () => { + 0x0002 + }; } #[macro_export] macro_rules! errno { - () => { - *libc::__errno_location() - } + () => { + *libc::__errno_location() + }; } extern "C" { - fn builtin_error(err:*const c_char,...); - - static mut loptend:*mut WordList; - - static mut array_needs_making:i32; - fn bind_variable ( lhs:*const c_char, rhs:* mut c_char, i:i32)->* mut SHELL_VAR; - fn update_export_env_inplace (env_prefix:* mut c_char, preflen:i32, value:* mut c_char); - static mut the_current_working_directory:* mut c_char; - fn get_working_directory (for_whom:* mut c_char)->* mut c_char; - fn sh_physpath (path:*mut c_char, flags:i32)->* mut c_char; - fn sh_chkwrite (s:i32)->i32; - fn get_string_value (var_name:*const c_char)->* mut c_char; - - static mut restricted:i32; - fn sh_restricted (s:*mut c_char); - static no_symbolic_links:i32; - + fn builtin_error(err: *const c_char, ...); + + static mut loptend: *mut WordList; + + static mut array_needs_making: i32; + fn bind_variable(lhs: *const c_char, rhs: *mut c_char, i: i32) -> *mut SHELL_VAR; + fn update_export_env_inplace(env_prefix: *mut c_char, preflen: i32, value: *mut c_char); + static mut the_current_working_directory: *mut c_char; + fn get_working_directory(for_whom: *mut c_char) -> *mut c_char; + fn sh_physpath(path: *mut c_char, flags: i32) -> *mut c_char; + fn sh_chkwrite(s: i32) -> i32; + fn get_string_value(var_name: *const c_char) -> *mut c_char; + + static mut restricted: i32; + fn sh_restricted(s: *mut c_char); + static no_symbolic_links: i32; + fn reset_internal_getopt(); - fn internal_getopt (list:*mut WordList , opts:*mut c_char)->i32; + fn internal_getopt(list: *mut WordList, opts: *mut c_char) -> i32; fn builtin_usage(); - static cdable_vars:i32; - static interactive:i32; - static cdspelling:i32; - fn absolute_pathname (str:*const c_char)->i32; - fn extract_colon_unit (string:*mut c_char, p_index:*mut i32)->* mut c_char; - fn sh_makepath (path:*const c_char, dir:*const c_char, flags:i32)->* mut c_char; - static privileged_mode:i32; - fn dirspell (dirname:* mut c_char)->* mut c_char; - fn printable_filename (fnc:* mut c_char, flags:i32)->* mut c_char; - - static posixly_correct:i32; - fn same_file (path1:*const c_char, path2:*const c_char, stp1:*mut libc::stat, stp2:*mut libc::stat)->i32; - fn make_absolute (str1:*const c_char, dot_path:*const c_char)->* mut c_char; - fn sh_canonpath (path:* mut c_char, flags:i32)->* mut c_char; - fn set_working_directory (path:* mut c_char); - -} - -pub static mut xattrfd:i32=-1; -pub static mut xattrflag:i32=0; -pub static mut verbatim_pwd:i32=0; -pub static mut eflag:i32=0; + static cdable_vars: i32; + static interactive: i32; + static cdspelling: i32; + fn absolute_pathname(str: *const c_char) -> i32; + fn extract_colon_unit(string: *mut c_char, p_index: *mut i32) -> *mut c_char; + fn sh_makepath(path: *const c_char, dir: *const c_char, flags: i32) -> *mut c_char; + static privileged_mode: i32; + fn dirspell(dirname: *mut c_char) -> *mut c_char; + fn printable_filename(fnc: *mut c_char, flags: i32) -> *mut c_char; + + static posixly_correct: i32; + fn same_file( + path1: *const c_char, + path2: *const c_char, + stp1: *mut libc::stat, + stp2: *mut libc::stat, + ) -> i32; + fn make_absolute(str1: *const c_char, dot_path: *const c_char) -> *mut c_char; + fn sh_canonpath(path: *mut c_char, flags: i32) -> *mut c_char; + fn set_working_directory(path: *mut c_char); + +} + +pub static mut xattrfd: i32 = -1; +pub static mut xattrflag: i32 = 0; +pub static mut verbatim_pwd: i32 = 0; +pub static mut eflag: i32 = 0; /* How to bring a job into the foreground. */ #[no_mangle] -pub extern "C" fn r_setpwd (dirname:* mut c_char)->i32 -{ - let old_anm:i32; - let tvar:* mut SHELL_VAR; - unsafe { - old_anm = array_needs_making; - - let c_str_pwd = CString::new("PWD").unwrap(); - if dirname ==std::ptr::null_mut() { - tvar=bind_variable (c_str_pwd.as_ptr(), CString::new("").unwrap().as_ptr() as * mut c_char, 0); - } else { - tvar = bind_variable (c_str_pwd.as_ptr(), dirname , 0); - } - - if tvar !=std::ptr::null_mut() && readonly_p! (tvar) !=0 { - return EXECUTION_FAILURE!(); - } - - if tvar !=std::ptr::null_mut() && old_anm == 0 && array_needs_making !=0 && exported_p !(tvar) !=0 { - if dirname ==std::ptr::null_mut() { - update_export_env_inplace (c_str_pwd.as_ptr() as * mut c_char, 4, CString::new("").unwrap().as_ptr() as * mut c_char); - } else { - update_export_env_inplace (c_str_pwd.as_ptr() as * mut c_char, 4, dirname); +pub extern "C" fn r_setpwd(dirname: *mut c_char) -> i32 { + let old_anm: i32; + let tvar: *mut SHELL_VAR; + unsafe { + old_anm = array_needs_making; + + let c_str_pwd = CString::new("PWD").unwrap(); + if dirname == std::ptr::null_mut() { + tvar = bind_variable( + c_str_pwd.as_ptr(), + CString::new("").unwrap().as_ptr() as *mut c_char, + 0, + ); + } else { + tvar = bind_variable(c_str_pwd.as_ptr(), dirname, 0); + } + + if tvar != std::ptr::null_mut() && readonly_p!(tvar) != 0 { + return EXECUTION_FAILURE!(); + } + + if tvar != std::ptr::null_mut() + && old_anm == 0 + && array_needs_making != 0 + && exported_p!(tvar) != 0 + { + if dirname == std::ptr::null_mut() { + update_export_env_inplace( + c_str_pwd.as_ptr() as *mut c_char, + 4, + CString::new("").unwrap().as_ptr() as *mut c_char, + ); + } else { + update_export_env_inplace(c_str_pwd.as_ptr() as *mut c_char, 4, dirname); + } + array_needs_making = 0; + } + return EXECUTION_SUCCESS!(); } - array_needs_making = 0; - } - return EXECUTION_SUCCESS!(); - } } #[no_mangle] -pub extern "C" fn r_bindpwd (no_symlinks:i32)->i32 { - let mut dirname:*mut c_char; - let pwdvar:*mut c_char; - let old_anm:i32; - let mut r:i32; - let mut canon_failed:i32; - let tvar:* mut SHELL_VAR; - unsafe { - r = sh_chkwrite (EXECUTION_SUCCESS!()); - if the_current_working_directory !=std::ptr::null_mut() { - if no_symlinks !=0{ - dirname=sh_physpath (the_current_working_directory, 0); - }else { - dirname =the_current_working_directory; +pub extern "C" fn r_bindpwd(no_symlinks: i32) -> i32 { + let mut dirname: *mut c_char; + let pwdvar: *mut c_char; + let old_anm: i32; + let mut r: i32; + let mut canon_failed: i32; + let tvar: *mut SHELL_VAR; + unsafe { + r = sh_chkwrite(EXECUTION_SUCCESS!()); + if the_current_working_directory != std::ptr::null_mut() { + if no_symlinks != 0 { + dirname = sh_physpath(the_current_working_directory, 0); + } else { + dirname = the_current_working_directory; + } + } else { + let c_str_cd = CString::new("cd").unwrap(); + dirname = get_working_directory(c_str_cd.as_ptr() as *mut c_char); + } + + /* If canonicalization fails, reset dirname to the_current_working_directory */ + canon_failed = 0; + if dirname == std::ptr::null_mut() { + canon_failed = 1; + dirname = the_current_working_directory; + } + + old_anm = array_needs_making; + let c_str_pwd = CString::new("PWD").unwrap(); + pwdvar = get_string_value(c_str_pwd.as_ptr()); + + tvar = bind_variable(CString::new("OLDPWD").unwrap().as_ptr(), pwdvar, 0); + if tvar != std::ptr::null_mut() && readonly_p!(tvar) != 0 { + r = EXECUTION_FAILURE!(); + } + + if old_anm == 0 && array_needs_making != 0 && exported_p!(tvar) != 0 { + update_export_env_inplace( + CString::new("OLDPWD").unwrap().as_ptr() as *mut c_char, + 7, + pwdvar, + ); + array_needs_making = 0; + } + + if r_setpwd(dirname) == EXECUTION_FAILURE!() { + r = EXECUTION_FAILURE!(); + } + + if canon_failed != 0 && eflag != 0 { + r = EXECUTION_FAILURE!(); + } + + if dirname != std::ptr::null_mut() && dirname != the_current_working_directory { + libc::free(dirname as *mut libc::c_void); + } + return r; } - } else { - let c_str_cd = CString::new("cd").unwrap(); - dirname=get_working_directory(c_str_cd.as_ptr() as * mut c_char); - } - - /* If canonicalization fails, reset dirname to the_current_working_directory */ - canon_failed = 0; - if dirname == std::ptr::null_mut() { - canon_failed = 1; - dirname = the_current_working_directory; - } - - old_anm = array_needs_making; - let c_str_pwd = CString::new("PWD").unwrap(); - pwdvar = get_string_value (c_str_pwd.as_ptr()); - - tvar = bind_variable (CString::new("OLDPWD").unwrap().as_ptr(), pwdvar, 0); - if tvar !=std::ptr::null_mut() && readonly_p! (tvar) !=0{ - r = EXECUTION_FAILURE!(); - } - - if old_anm == 0 && array_needs_making !=0 && exported_p! (tvar) !=0 { - update_export_env_inplace (CString::new("OLDPWD").unwrap().as_ptr() as * mut c_char, 7, pwdvar); - array_needs_making = 0; - } - - if r_setpwd (dirname) == EXECUTION_FAILURE!() { - r = EXECUTION_FAILURE!(); - } - - if canon_failed !=0 && eflag !=0 { - r = EXECUTION_FAILURE!(); - } - - if dirname !=std::ptr::null_mut() && dirname != the_current_working_directory { - libc::free(dirname as * mut libc::c_void); - } - return r; - } } /* Call get_working_directory to reset the value of - the_current_working_directory () */ +the_current_working_directory () */ #[no_mangle] -pub extern "C" fn r_resetpwd (caller:*mut c_char)->*mut c_char { - let tdir:*mut c_char; - unsafe { - libc::free(the_current_working_directory as * mut libc::c_void); - the_current_working_directory = 0 as * mut c_char; - tdir = get_working_directory (caller); - return tdir; - } +pub extern "C" fn r_resetpwd(caller: *mut c_char) -> *mut c_char { + let tdir: *mut c_char; + unsafe { + libc::free(the_current_working_directory as *mut libc::c_void); + the_current_working_directory = 0 as *mut c_char; + tdir = get_working_directory(caller); + return tdir; + } } #[no_mangle] -pub extern "C" fn r_cdxattr (dir: *mut c_char, ndirp:*mut c_char)->i32 { - return -1; +pub extern "C" fn r_cdxattr(dir: *mut c_char, ndirp: *mut c_char) -> i32 { + return -1; } #[no_mangle] -pub extern "C" fn r_resetxattr () { - unsafe { - xattrfd = -1; /* not strictly necessary */ - } +pub extern "C" fn r_resetxattr() { + unsafe { + xattrfd = -1; /* not strictly necessary */ + } } #[no_mangle] -pub extern "C" fn r_cd_builtin (mut list:*mut WordList)->i32 { - let mut dirname:*mut c_char=std::ptr::null_mut(); - let cdpath:*mut c_char; - let mut path:*mut c_char; - let mut temp:*mut c_char; - let mut path_index:i32; - let mut no_symlinks:i32; - let mut opt:i32; - let mut lflag:i32; - let e:i32; - - unsafe { - if restricted !=0 { - sh_restricted (0 as * mut c_char); - return EXECUTION_FAILURE!(); - } +pub extern "C" fn r_cd_builtin(mut list: *mut WordList) -> i32 { + let mut dirname: *mut c_char = std::ptr::null_mut(); + let cdpath: *mut c_char; + let mut path: *mut c_char; + let mut temp: *mut c_char; + let mut path_index: i32; + let mut no_symlinks: i32; + let mut opt: i32; + let mut lflag: i32; + let e: i32; + + unsafe { + if restricted != 0 { + sh_restricted(0 as *mut c_char); + return EXECUTION_FAILURE!(); + } - eflag = 0; - no_symlinks = no_symbolic_links; - xattrflag = 0; - reset_internal_getopt (); - - let c_str_elp = CString::new("eLP").unwrap(); // from a &str, creates a new allocation - opt = internal_getopt (list, c_str_elp.as_ptr() as * mut c_char); - while opt != -1 { - let optu8:u8= opt as u8; - let optChar:char=char::from(optu8); - match optChar { - 'P'=>{no_symlinks = 1;} - 'L'=>{no_symlinks = 0;} - 'e'=>{eflag = 1;} - _=>{ - if opt == -99 { - r_builtin_help(); - return EX_USAGE; - } - builtin_usage (); - return EX_USAGE; + eflag = 0; + no_symlinks = no_symbolic_links; + xattrflag = 0; + reset_internal_getopt(); + + let c_str_elp = CString::new("eLP").unwrap(); // from a &str, creates a new allocation + opt = internal_getopt(list, c_str_elp.as_ptr() as *mut c_char); + while opt != -1 { + let optu8: u8 = opt as u8; + let optChar: char = char::from(optu8); + match optChar { + 'P' => { + no_symlinks = 1; + } + 'L' => { + no_symlinks = 0; + } + 'e' => { + eflag = 1; + } + _ => { + if opt == -99 { + r_builtin_help(); + return EX_USAGE; + } + builtin_usage(); + return EX_USAGE; + } } - } - opt =internal_getopt (list, c_str_elp.as_ptr() as * mut c_char); - } + opt = internal_getopt(list, c_str_elp.as_ptr() as *mut c_char); + } - // list = loptend; //后加的 + // list = loptend; //后加的 - if cdable_vars != 0 { - lflag=LCD_DOVARS!(); - } else { - lflag=0; - } + if cdable_vars != 0 { + lflag = LCD_DOVARS!(); + } else { + lflag = 0; + } - if interactive !=0 && cdspelling !=0 { - lflag=lflag | LCD_DOSPELL!(); - } else { - lflag=lflag | 0; - } + if interactive != 0 && cdspelling != 0 { + lflag = lflag | LCD_DOSPELL!(); + } else { + lflag = lflag | 0; + } - if eflag !=0 && no_symlinks == 0{ - eflag = 0; - } + if eflag != 0 && no_symlinks == 0 { + eflag = 0; + } - if loptend == std::ptr::null_mut() { - /* `cd' without arguments is equivalent to `cd $HOME' */ - dirname = get_string_value (CString::new("HOME").unwrap().as_ptr()); + if loptend == std::ptr::null_mut() { + /* `cd' without arguments is equivalent to `cd $HOME' */ + dirname = get_string_value(CString::new("HOME").unwrap().as_ptr()); - if dirname == std::ptr::null_mut() { - builtin_error (CString::new("HOME not set").unwrap().as_ptr()); - return EXECUTION_FAILURE!(); - } - lflag = 0; - } - else if (*loptend).next != std::ptr::null_mut() { - builtin_error (CString::new("too many arguments").unwrap().as_ptr()); - return EXECUTION_FAILURE!(); - } - else if char::from((*(*(*loptend).word).word) as u8) == '-' && char::from(*((((*(*loptend).word).word) as usize +4) as *mut c_char) as u8) == '\0' { - /* This is `cd -', equivalent to `cd $OLDPWD' */ - dirname = get_string_value (CString::new("OLDPWD").unwrap().as_ptr()); - if dirname == std::ptr::null_mut() { - builtin_error (CString::new("OLDPWD not set").unwrap().as_ptr()); - return EXECUTION_FAILURE!(); - } - lflag = LCD_PRINTPATH!(); /* According to SUSv3 */ - } - else if absolute_pathname ((*(*loptend).word).word) !=0 { - dirname = (*(*loptend).word).word; - } - else if privileged_mode == 0 && get_string_value (CString::new("CDPATH").unwrap().as_ptr() ) != std::ptr::null_mut(){ - cdpath = get_string_value (CString::new("CDPATH").unwrap().as_ptr() ); - dirname = (*(*loptend).word).word; - - /* Find directory in $CDPATH. */ - path_index = 0; - path = extract_colon_unit (cdpath, & mut path_index); - - while path != std::ptr::null_mut() { - /* OPT is 1 if the path element is non-empty */ - opt = (char::from(*path as u8 )!= '\0') as i32 ; - temp = sh_makepath (path, dirname, MP_DOTILDE!()); - libc::free (path as * mut c_void); - - if r_change_to_directory (temp, no_symlinks, xattrflag) !=0 { - /* POSIX.2 says that if a nonempty directory from CDPATH - is used to find the directory to change to, the new - directory name is echoed to stdout, whether or not - the shell is interactive. */ - if opt !=0 { - if no_symlinks !=0 { - path=temp; - } - else { - path=the_current_working_directory; + if dirname == std::ptr::null_mut() { + builtin_error(CString::new("HOME not set").unwrap().as_ptr()); + return EXECUTION_FAILURE!(); + } + lflag = 0; + } else if (*loptend).next != std::ptr::null_mut() { + builtin_error(CString::new("too many arguments").unwrap().as_ptr()); + return EXECUTION_FAILURE!(); + } else if char::from((*(*(*loptend).word).word) as u8) == '-' + && char::from(*((((*(*loptend).word).word) as usize + 4) as *mut c_char) as u8) == '\0' + { + /* This is `cd -', equivalent to `cd $OLDPWD' */ + dirname = get_string_value(CString::new("OLDPWD").unwrap().as_ptr()); + if dirname == std::ptr::null_mut() { + builtin_error(CString::new("OLDPWD not set").unwrap().as_ptr()); + return EXECUTION_FAILURE!(); + } + lflag = LCD_PRINTPATH!(); /* According to SUSv3 */ + } else if absolute_pathname((*(*loptend).word).word) != 0 { + dirname = (*(*loptend).word).word; + } else if privileged_mode == 0 + && get_string_value(CString::new("CDPATH").unwrap().as_ptr()) != std::ptr::null_mut() + { + cdpath = get_string_value(CString::new("CDPATH").unwrap().as_ptr()); + dirname = (*(*loptend).word).word; + + /* Find directory in $CDPATH. */ + path_index = 0; + path = extract_colon_unit(cdpath, &mut path_index); + + while path != std::ptr::null_mut() { + /* OPT is 1 if the path element is non-empty */ + opt = (char::from(*path as u8) != '\0') as i32; + temp = sh_makepath(path, dirname, MP_DOTILDE!()); + libc::free(path as *mut c_void); + + if r_change_to_directory(temp, no_symlinks, xattrflag) != 0 { + /* POSIX.2 says that if a nonempty directory from CDPATH + is used to find the directory to change to, the new + directory name is echoed to stdout, whether or not + the shell is interactive. */ + if opt != 0 { + if no_symlinks != 0 { + path = temp; + } else { + path = the_current_working_directory; + } + + if path != std::ptr::null_mut() { + libc::printf( + CString::new("%s\n").unwrap().as_ptr() as *const c_char, + path, + ); + } + } + + libc::free(temp as *mut c_void); + return r_bindpwd(no_symlinks); + } else { + libc::free(temp as *mut c_void); + } + + path = extract_colon_unit(cdpath, &mut path_index); } + } else { + dirname = (*(*loptend).word).word; + } - if path !=std::ptr::null_mut() { - libc::printf(CString::new("%s\n").unwrap().as_ptr() as * const c_char,path); + /* When we get here, DIRNAME is the directory to change to. If we + chdir successfully, just return. */ + if 0 != r_change_to_directory(dirname, no_symlinks, xattrflag) { + if (lflag & LCD_PRINTPATH!()) != 0 { + libc::printf( + CString::new("%s\n").unwrap().as_ptr() as *const c_char, + dirname, + ); } - } - - libc::free (temp as * mut c_void); - return r_bindpwd (no_symlinks); - } - else { - libc::free (temp as * mut c_void); - } - - path = extract_colon_unit (cdpath, &mut path_index); - } - } - else{ - dirname = (*(*loptend).word).word; - } + return r_bindpwd(no_symlinks); + } + /* If the user requests it, then perhaps this is the name of + a shell variable, whose value contains the directory to + change to. */ + if (lflag & LCD_DOVARS!()) != 0 { + temp = get_string_value(dirname); + if temp != std::ptr::null_mut() + && r_change_to_directory(temp, no_symlinks, xattrflag) != 0 + { + libc::printf( + CString::new("%s\n").unwrap().as_ptr() as *const c_char, + temp, + ); + return r_bindpwd(no_symlinks); + } + } - /* When we get here, DIRNAME is the directory to change to. If we - chdir successfully, just return. */ - if 0 != r_change_to_directory (dirname, no_symlinks, xattrflag) { - if (lflag & LCD_PRINTPATH!()) !=0 { - libc::printf(CString::new("%s\n").unwrap().as_ptr() as * const c_char,dirname); - } - return r_bindpwd (no_symlinks); - } + /* If the user requests it, try to find a directory name similar in + spelling to the one requested, in case the user made a simple + typo. This is similar to the UNIX 8th and 9th Edition shells. */ + if (lflag & LCD_DOSPELL!()) != 0 { + temp = dirspell(dirname); + if temp != std::ptr::null_mut() + && r_change_to_directory(temp, no_symlinks, xattrflag) != 0 + { + println!("{:?}", temp); + libc::free(temp as *mut c_void); + return r_bindpwd(no_symlinks); + } else { + libc::free(temp as *mut c_void); + } + } - /* If the user requests it, then perhaps this is the name of - a shell variable, whose value contains the directory to - change to. */ - if (lflag & LCD_DOVARS!()) !=0 { - temp = get_string_value (dirname); - if temp != std::ptr::null_mut() && r_change_to_directory (temp, no_symlinks, xattrflag) !=0 { - libc::printf(CString::new("%s\n").unwrap().as_ptr() as * const c_char,temp); - return r_bindpwd (no_symlinks); - } - } + e = errno!(); + temp = printable_filename(dirname, 0); + builtin_error( + CString::new("%s: %s").unwrap().as_ptr(), + temp, + libc::strerror(e), + ); - /* If the user requests it, try to find a directory name similar in - spelling to the one requested, in case the user made a simple - typo. This is similar to the UNIX 8th and 9th Edition shells. */ - if (lflag & LCD_DOSPELL!()) !=0 { - temp = dirspell (dirname); - if temp !=std::ptr::null_mut() && r_change_to_directory (temp, no_symlinks, xattrflag) !=0 { - println!("{:?}", temp); - libc::free (temp as * mut c_void); - return r_bindpwd (no_symlinks); - } else { - libc::free (temp as * mut c_void); + if temp != dirname { + libc::free(temp as *mut c_void); } + return EXECUTION_FAILURE!(); } - - e =errno!(); - temp = printable_filename (dirname, 0); - builtin_error (CString::new("%s: %s").unwrap().as_ptr(), temp, libc::strerror (e)); - - if temp != dirname { - libc::free (temp as * mut c_void); - } - return EXECUTION_FAILURE!(); - } } #[no_mangle] -pub extern "C" fn r_pwd_builtin (list:* mut WordList)->i32 { - let mut directory:* mut c_char; - let mut opt:i32; - let mut pflag:i32; - unsafe { - verbatim_pwd = no_symbolic_links; - pflag = 0; - reset_internal_getopt (); - let c_str_lp = CString::new("LP").unwrap(); // from a &str, creates a new allocation - opt = internal_getopt (list, c_str_lp.as_ptr() as * mut c_char); - while opt != -1 { - let optu8:u8= opt as u8; - let optChar:char=char::from(optu8); - match optChar{ - 'P'=>{verbatim_pwd =1; - pflag = 1;} - 'L'=>{verbatim_pwd = 0;} - _=>{ - if opt == -99 { - r_builtin_help(); - return EX_USAGE; - } - builtin_usage (); - return EX_USAGE; - } - } - opt = internal_getopt (list, c_str_lp.as_ptr() as * mut c_char); - } - if the_current_working_directory != std::ptr::null_mut() { - if verbatim_pwd != 0 { - directory=sh_physpath (the_current_working_directory, 0); - } else { - directory=the_current_working_directory; - } - } else { - directory=get_working_directory(CString::new("pwd").unwrap().as_ptr() as * mut c_char); - } - - /* Try again using getcwd() if canonicalization fails (for instance, if - the file system has changed state underneath bash). */ - if (the_current_working_directory != std::ptr::null_mut() && directory == std::ptr::null_mut()) || - (posixly_correct !=0 && same_file (CString::new(".").unwrap().as_ptr(), the_current_working_directory, std::ptr::null_mut() , std::ptr::null_mut()) == 0) { - if directory !=std::ptr::null_mut() && directory != the_current_working_directory { - libc::free (directory as * mut c_void); - } - directory = r_resetpwd (CString::new("pwd").unwrap().as_ptr() as * mut c_char); - } +pub extern "C" fn r_pwd_builtin(list: *mut WordList) -> i32 { + let mut directory: *mut c_char; + let mut opt: i32; + let mut pflag: i32; + unsafe { + verbatim_pwd = no_symbolic_links; + pflag = 0; + reset_internal_getopt(); + let c_str_lp = CString::new("LP").unwrap(); // from a &str, creates a new allocation + opt = internal_getopt(list, c_str_lp.as_ptr() as *mut c_char); + while opt != -1 { + let optu8: u8 = opt as u8; + let optChar: char = char::from(optu8); + match optChar { + 'P' => { + verbatim_pwd = 1; + pflag = 1; + } + 'L' => { + verbatim_pwd = 0; + } + _ => { + if opt == -99 { + r_builtin_help(); + return EX_USAGE; + } + builtin_usage(); + return EX_USAGE; + } + } + opt = internal_getopt(list, c_str_lp.as_ptr() as *mut c_char); + } + if the_current_working_directory != std::ptr::null_mut() { + if verbatim_pwd != 0 { + directory = sh_physpath(the_current_working_directory, 0); + } else { + directory = the_current_working_directory; + } + } else { + directory = get_working_directory(CString::new("pwd").unwrap().as_ptr() as *mut c_char); + } + + /* Try again using getcwd() if canonicalization fails (for instance, if + the file system has changed state underneath bash). */ + if (the_current_working_directory != std::ptr::null_mut() + && directory == std::ptr::null_mut()) + || (posixly_correct != 0 + && same_file( + CString::new(".").unwrap().as_ptr(), + the_current_working_directory, + std::ptr::null_mut(), + std::ptr::null_mut(), + ) == 0) + { + if directory != std::ptr::null_mut() && directory != the_current_working_directory { + libc::free(directory as *mut c_void); + } + directory = r_resetpwd(CString::new("pwd").unwrap().as_ptr() as *mut c_char); + } + + if directory != std::ptr::null_mut() { + opt = EXECUTION_SUCCESS!(); + libc::printf( + CString::new("%s\n").unwrap().as_ptr() as *const c_char, + directory, + ); + /* This is dumb but posix-mandated. */ + if posixly_correct != 0 && pflag != 0 { + opt = r_setpwd(directory); + } - if directory != std::ptr::null_mut() { - opt = EXECUTION_SUCCESS!(); - libc::printf(CString::new("%s\n").unwrap().as_ptr() as * const c_char,directory); - /* This is dumb but posix-mandated. */ - if posixly_correct !=0 && pflag !=0 { - opt = r_setpwd (directory); - } - - if directory != the_current_working_directory { - libc::free (directory as * mut c_void); - } - return sh_chkwrite (opt); - } else { - return EXECUTION_FAILURE!(); - } - } + if directory != the_current_working_directory { + libc::free(directory as *mut c_void); + } + return sh_chkwrite(opt); + } else { + return EXECUTION_FAILURE!(); + } + } } /* Do the work of changing to the directory NEWDIR. Handle symbolic - link following, etc. This function *must* return with - the_current_working_directory either set to NULL (in which case - getcwd() will eventually be called), or set to a string corresponding - to the working directory. Return 1 on success, 0 on failure. */ +link following, etc. This function *must* return with +the_current_working_directory either set to NULL (in which case +getcwd() will eventually be called), or set to a string corresponding +to the working directory. Return 1 on success, 0 on failure. */ #[no_mangle] -pub extern "C" fn r_change_to_directory (newdir:* mut c_char, nolinks:i32, xattr:i32)->i32 { - unsafe { - let mut t:*mut c_char; - let mut tdir:*mut c_char; - let mut ndir:*mut c_char; - let err:i32; - let mut canon_failed:i32; - let mut r:i32; - let ndlen:i32; - - tdir = std::ptr::null_mut(); - - if the_current_working_directory == std::ptr::null_mut() { - t = get_working_directory (CString::new("chdir").unwrap().as_ptr() as * mut c_char); - libc::free (t as * mut c_void); - } - - t = make_absolute (newdir, the_current_working_directory); - - /* TDIR is either the canonicalized absolute pathname of NEWDIR - (nolinks == 0) or the absolute physical pathname of NEWDIR - (nolinks != 0). */ - if nolinks !=0 { - tdir=sh_physpath (t, 0); - } else { - tdir=sh_canonpath (t, PATH_CHECKDOTDOT!()|PATH_CHECKEXISTS!()); - } - - ndlen = libc::strlen (newdir ) as i32; - - /* Use the canonicalized version of NEWDIR, or, if canonicalization - failed, use the non-canonical form. */ - canon_failed = 0; - if tdir !=std::ptr::null_mut() && *tdir !=0 { - libc::free (t as * mut c_void); - } else { - libc::free (tdir as * mut c_void); - tdir = t; - canon_failed = 1; - } - - /* In POSIX mode, if we're resolving symlinks logically and sh_canonpath - returns NULL (because it checks the path, it will return NULL if the - resolved path doesn't exist), fail immediately. */ - if posixly_correct !=0 && nolinks == 0 && canon_failed !=0 && (errno!() != libc::ENAMETOOLONG || ndlen > libc::PATH_MAX) { - if errno!() != libc::ENOENT && errno!() != libc::ENAMETOOLONG { - errno!() = libc::ENOTDIR; - } - libc::free (tdir as * mut c_void); - return 0; - } - - { - if nolinks !=0 { - r = libc::chdir (newdir); - } else { - r = libc::chdir (tdir); - } +pub extern "C" fn r_change_to_directory(newdir: *mut c_char, nolinks: i32, xattr: i32) -> i32 { + unsafe { + let mut t: *mut c_char; + let mut tdir: *mut c_char; + let mut ndir: *mut c_char; + let err: i32; + let mut canon_failed: i32; + let mut r: i32; + let ndlen: i32; + + tdir = std::ptr::null_mut(); + + if the_current_working_directory == std::ptr::null_mut() { + t = get_working_directory(CString::new("chdir").unwrap().as_ptr() as *mut c_char); + libc::free(t as *mut c_void); + } - if r >= 0 { - r_resetxattr (); - } + t = make_absolute(newdir, the_current_working_directory); + + /* TDIR is either the canonicalized absolute pathname of NEWDIR + (nolinks == 0) or the absolute physical pathname of NEWDIR + (nolinks != 0). */ + if nolinks != 0 { + tdir = sh_physpath(t, 0); + } else { + tdir = sh_canonpath(t, PATH_CHECKDOTDOT!() | PATH_CHECKEXISTS!()); + } - } + ndlen = libc::strlen(newdir) as i32; - /* If the chdir succeeds, update the_current_working_directory. */ - if r == 0 { - /* If canonicalization failed, but the chdir succeeded, reset the - shell's idea of the_current_working_directory. */ - if canon_failed !=0 { - t = r_resetpwd (CString::new("cd").unwrap().as_ptr() as * mut c_char); - if t == std::ptr::null_mut(){ - set_working_directory (tdir); + /* Use the canonicalized version of NEWDIR, or, if canonicalization + failed, use the non-canonical form. */ + canon_failed = 0; + if tdir != std::ptr::null_mut() && *tdir != 0 { + libc::free(t as *mut c_void); } else { - libc::free (t as * mut c_void); - } - } else { - set_working_directory (tdir); - } - - libc::free (tdir as * mut c_void); - return 1; - } - - /* We failed to change to the appropriate directory name. If we tried - what the user passed (nolinks != 0), punt now. */ - if nolinks !=0 { - libc::free (tdir as * mut c_void); - return 0; - } - - err = errno!(); - - /* We're not in physical mode (nolinks == 0), but we failed to change to - the canonicalized directory name (TDIR). Try what the user passed - verbatim. If we succeed, reinitialize the_current_working_directory. - POSIX requires that we just fail here, so we do in posix mode. */ - if posixly_correct == 0 && libc::chdir (newdir) == 0 { - t = r_resetpwd (CString::new("cd").unwrap().as_ptr() as * mut c_char); - if t == std::ptr::null_mut() { - set_working_directory (tdir); - } else { - libc::free (t as * mut c_void); - } - r = 1; - } else { - errno!()= err; - r = 0; - } - - libc::free (tdir as * mut c_void); - return r; - } -} + libc::free(tdir as *mut c_void); + tdir = t; + canon_failed = 1; + } + + /* In POSIX mode, if we're resolving symlinks logically and sh_canonpath + returns NULL (because it checks the path, it will return NULL if the + resolved path doesn't exist), fail immediately. */ + if posixly_correct != 0 + && nolinks == 0 + && canon_failed != 0 + && (errno!() != libc::ENAMETOOLONG || ndlen > libc::PATH_MAX) + { + if errno!() != libc::ENOENT && errno!() != libc::ENAMETOOLONG { + errno!() = libc::ENOTDIR; + } + libc::free(tdir as *mut c_void); + return 0; + } + + { + if nolinks != 0 { + r = libc::chdir(newdir); + } else { + r = libc::chdir(tdir); + } + + if r >= 0 { + r_resetxattr(); + } + } + + /* If the chdir succeeds, update the_current_working_directory. */ + if r == 0 { + /* If canonicalization failed, but the chdir succeeded, reset the + shell's idea of the_current_working_directory. */ + if canon_failed != 0 { + t = r_resetpwd(CString::new("cd").unwrap().as_ptr() as *mut c_char); + if t == std::ptr::null_mut() { + set_working_directory(tdir); + } else { + libc::free(t as *mut c_void); + } + } else { + set_working_directory(tdir); + } + + libc::free(tdir as *mut c_void); + return 1; + } + + /* We failed to change to the appropriate directory name. If we tried + what the user passed (nolinks != 0), punt now. */ + if nolinks != 0 { + libc::free(tdir as *mut c_void); + return 0; + } + err = errno!(); + + /* We're not in physical mode (nolinks == 0), but we failed to change to + the canonicalized directory name (TDIR). Try what the user passed + verbatim. If we succeed, reinitialize the_current_working_directory. + POSIX requires that we just fail here, so we do in posix mode. */ + if posixly_correct == 0 && libc::chdir(newdir) == 0 { + t = r_resetpwd(CString::new("cd").unwrap().as_ptr() as *mut c_char); + if t == std::ptr::null_mut() { + set_working_directory(tdir); + } else { + libc::free(t as *mut c_void); + } + r = 1; + } else { + errno!() = err; + r = 0; + } + + libc::free(tdir as *mut c_void); + return r; + } +} diff --git a/bash-5.1/builtins_rust/cmd/src/lib.rs b/bash-5.1/builtins_rust/cmd/src/lib.rs index bce494c4425883bd9877fc73b27f4b85ee876794..161713c6a955d7f77fe15ac77a02d8e1f9fe9291 100644 --- a/bash-5.1/builtins_rust/cmd/src/lib.rs +++ b/bash-5.1/builtins_rust/cmd/src/lib.rs @@ -1,4 +1,4 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later use std::collections::HashMap; @@ -7,45 +7,41 @@ use std::sync::Mutex; extern crate lazy_static; pub struct Cmd { - name:String, - enable:bool, + name: String, + enable: bool, } impl Cmd { -pub fn build_cmd(name:String, enable:bool) -> Cmd { - Cmd { - name, - enable, + pub fn build_cmd(name: String, enable: bool) -> Cmd { + Cmd { name, enable } } -} -pub fn set_enable(&mut self, is_enable:bool) -> &Cmd { - self.enable = is_enable; - self -} -pub fn get_enable(&self) -> bool { - return self.enable -} + pub fn set_enable(&mut self, is_enable: bool) -> &Cmd { + self.enable = is_enable; + self + } + pub fn get_enable(&self) -> bool { + return self.enable; + } } lazy_static! { -static ref CMD: Mutex>> = Mutex::new(HashMap::new()); -} -fn init_cmd_table() { + static ref CMD: Mutex>> = Mutex::new(HashMap::new()); } +fn init_cmd_table() {} -pub fn insert_empty_cmd(cmd:String) -> bool { - let it = Cmd::build_cmd(String::from(&cmd[..]),true); +pub fn insert_empty_cmd(cmd: String) -> bool { + let it = Cmd::build_cmd(String::from(&cmd[..]), true); let mut cmd_table = CMD.lock().unwrap(); cmd_table.insert(String::from(&cmd[..]), Box::new(it)); return true; } -pub fn insert_cmd(cmd:&str, item: Box) -> Option>{ +pub fn insert_cmd(cmd: &str, item: Box) -> Option> { let mut cmd_table = CMD.lock().unwrap(); cmd_table.insert(String::from(cmd), item) } -pub fn get_cmd_enable(cmd:String) -> Result{ - let mut cmd_table = CMD.lock().unwrap(); +pub fn get_cmd_enable(cmd: String) -> Result { + let cmd_table = CMD.lock().unwrap(); let item = cmd_table.get(&cmd); match item { Some(c) => { @@ -54,12 +50,12 @@ pub fn get_cmd_enable(cmd:String) -> Result{ return Ok(c.enable); } None => { - return Err(cmd+" not found"); + return Err(cmd + " not found"); } } } -pub fn set_cmd_enable(cmd :String, is_enable:bool)->bool { +pub fn set_cmd_enable(cmd: String, is_enable: bool) -> bool { let mut a = CMD.lock().unwrap(); let v = a.get_mut(&cmd); match v { diff --git a/bash-5.1/builtins_rust/colon/src/lib.rs b/bash-5.1/builtins_rust/colon/src/lib.rs index 24e70d3054a64346beed5052bb29c0c513618895..f13a0717aa3f6864f9c8ad5e2d52fb5a051c6015 100644 --- a/bash-5.1/builtins_rust/colon/src/lib.rs +++ b/bash-5.1/builtins_rust/colon/src/lib.rs @@ -1,9 +1,8 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use std::{ffi::CString}; -use libc::{size_t, c_int, c_uint, c_char, c_long, c_void, PT_NULL, c_ulong, strchr}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; + +use rcommon::WordList; #[cfg(test)] mod tests { @@ -14,13 +13,12 @@ mod tests { } } - #[no_mangle] -pub extern "C" fn r_colon_builtin(ignore: *mut WordList )->i32 { +pub extern "C" fn r_colon_builtin(_ignore: *mut WordList) -> i32 { 0 } #[no_mangle] -pub extern "C" fn r_false_builtin(ignore: *mut WordList) -> i32 { +pub extern "C" fn r_false_builtin(_ignore: *mut WordList) -> i32 { 1 } diff --git a/bash-5.1/builtins_rust/command/src/lib.rs b/bash-5.1/builtins_rust/command/src/lib.rs index c44e1a556d94fccd0ae3d6ee7ff8087faec3fe15..cde2d37774e09c294256f28261eb57c6cb0d4dff 100644 --- a/bash-5.1/builtins_rust/command/src/lib.rs +++ b/bash-5.1/builtins_rust/command/src/lib.rs @@ -1,9 +1,9 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later use std::ffi::*; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; +use rcommon::{WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; extern "C" { fn copy_word_list(_: *mut WordList) -> *mut WordList; @@ -229,13 +229,13 @@ pub struct for_com { pub action: *mut COMMAND, } -pub const CDESC_ALL:i32 = 0x001; +pub const CDESC_ALL: i32 = 0x001; pub const CDESC_SHORTDESC: i32 = 0x002; -pub const CDESC_REUSABLE:i32 = 0x004; +pub const CDESC_REUSABLE: i32 = 0x004; pub const CDESC_TYPE: i32 = 0x008; -pub const CDESC_PATH_ONLY:i32 = 0x010; +pub const CDESC_PATH_ONLY: i32 = 0x010; pub const CDESC_FORCE_PATH: i32 = 0x020; -pub const CDESC_NOFUNCS:i32 = 0x040; +pub const CDESC_NOFUNCS: i32 = 0x040; pub const CDESC_ABSPATH: i32 = 0x080; pub const CDESC_STDPATH: i32 = 0x100; @@ -248,43 +248,41 @@ pub const CDESC_STDPATH: i32 = 0x100; //#define CDESC_NOFUNCS 0x040 /* type -f */ //#define CDESC_ABSPATH 0x080 /* convert to absolute path, no ./ */ //#define CDESC_STDPATH 0x100 /* command -p */ - - -pub const const_command_builtin:*mut libc::c_char = b"command_builtin\0" as *const u8 as *const libc::c_char as *mut libc::c_char;//.unwrap(); -//#define COMMAND_BUILTIN_FLAGS (CMD_NO_FUNCTIONS | CMD_INHIBIT_EXPANSION | CMD_COMMAND_BUILTIN | (use_standard_path ? CMD_STDPATH : 0)) -//#define CMD_WANT_SUBSHELL 0x01 /* User wants a subshell: ( command ) */ -//#define CMD_FORCE_SUBSHELL 0x02 /* Shell needs to force a subshell. */ -//#define CMD_INVERT_RETURN 0x04 /* Invert the exit value. */ -//#define CMD_IGNORE_RETURN 0x08 /* Ignore the exit value. For set -e. */ -//#define CMD_NO_FUNCTIONS 0x10 /* Ignore functions during command lookup. */ -//#define CMD_INHIBIT_EXPANSION 0x20 /* Do not expand the command words. */ -//#define CMD_NO_FORK 0x40 /* Don't fork; just call execve */ -//#define CMD_TIME_PIPELINE 0x80 /* Time a pipeline */ -//#define CMD_TIME_POSIX 0x100 /* time -p; use POSIX.2 time output spec. */ -//#define CMD_AMPERSAND 0x200 /* command & */ -//#define CMD_STDIN_REDIR 0x400 /* async command needs implicit libc::c_int { @@ -299,7 +297,7 @@ pub unsafe extern "C" fn r_command_builtin(mut list: *mut WordList) -> libc::c_i reset_internal_getopt(); let adnpsf = CString::new("pvV").expect("CString::new failed"); loop { - opt = internal_getopt(list, adnpsf.as_ptr() ); + opt = internal_getopt(list, adnpsf.as_ptr()); if !(opt != -1) { break; } @@ -315,7 +313,7 @@ pub unsafe extern "C" fn r_command_builtin(mut list: *mut WordList) -> libc::c_i verbose = CDESC_REUSABLE; // ditto } _ => { - if opt ==-99 { + if opt == -99 { r_builtin_help(); return EX_USAGE; } @@ -345,28 +343,32 @@ pub unsafe extern "C" fn r_command_builtin(mut list: *mut WordList) -> libc::c_i any_found += found; list = (*list).next; } - return if any_found != 0 { EXECUTION_SUCCESS!() } else { EXECUTION_FAILURE!() }; + return if any_found != 0 { + EXECUTION_SUCCESS!() + } else { + EXECUTION_FAILURE!() + }; } - begin_unwind_frame( - const_command_builtin - ); + begin_unwind_frame(const_command_builtin); command = make_bare_simple_command(); // let ref mut fresh0 = (*(*command).value.Simple).words; //*fresh0 = copy_word_list(list); (*(*command).value.Simple).words = copy_word_list(list); //let ref mut fresh1 = (*(*command).value.Simple).redirects; //*fresh1 = 0 as *mut libc::c_void as *mut REDIRECT; - (*(*command).value.Simple).redirects = 0 as *mut libc::c_void as *mut REDIRECT; + (*(*command).value.Simple).redirects = 0 as *mut libc::c_void as *mut REDIRECT; - (*command).flags - |= CMD_NO_FUNCTIONS | CMD_INHIBIT_EXPANSION | CMD_COMMAND_BUILTIN - | (if use_standard_path != 0 { - CMD_STDPATH - } else { - 0 as libc::c_int - }); - (*(*command).value.Simple).flags - |= CMD_NO_FUNCTIONS | CMD_INHIBIT_EXPANSION | CMD_COMMAND_BUILTIN + (*command).flags |= CMD_NO_FUNCTIONS + | CMD_INHIBIT_EXPANSION + | CMD_COMMAND_BUILTIN + | (if use_standard_path != 0 { + CMD_STDPATH + } else { + 0 as libc::c_int + }); + (*(*command).value.Simple).flags |= CMD_NO_FUNCTIONS + | CMD_INHIBIT_EXPANSION + | CMD_COMMAND_BUILTIN | (if use_standard_path != 0 { CMD_STDPATH } else { @@ -380,8 +382,6 @@ pub unsafe extern "C" fn r_command_builtin(mut list: *mut WordList) -> libc::c_i command, );*/ result = execute_command(command); - run_unwind_frame( - b"command_builtin\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - ); + run_unwind_frame(b"command_builtin\0" as *const u8 as *const libc::c_char as *mut libc::c_char); return result; } diff --git a/bash-5.1/builtins_rust/common/src/lib.rs b/bash-5.1/builtins_rust/common/src/lib.rs index b7b39842e3ec8ccc972c410ac7c50078b2e08c41..9d6900c5bee64ff3fcecb578798ea7e4d2f92eda 100644 --- a/bash-5.1/builtins_rust/common/src/lib.rs +++ b/bash-5.1/builtins_rust/common/src/lib.rs @@ -3,19 +3,22 @@ //# SPDX-License-Identifier: GPL-3.0-or-later extern crate libc; -use libc::{c_char,c_int, c_void, FILE, size_t, intmax_t,c_long, strcmp}; -use libc::{isdigit,strerror, __errno_location, fflush, ferror,clearerr, free,strcpy,strlen,strncmp,atoi,qsort}; +use libc::{ + __errno_location, atoi, clearerr, ferror, fflush, free, isdigit, qsort, strerror, strlen, + strncmp, +}; +use libc::{c_char, c_int, c_long, c_void, intmax_t, size_t, strcmp, FILE}; +use nix::errno::errno; +use std::env::var; use std::ffi::{CStr, CString}; use std::mem::size_of; use std::ptr::read_volatile; -use nix::errno::errno; -use std::env::var; use unic_langid::LanguageIdentifier; include!(concat!("lib_readline_keymaps.rs")); include!(concat!("command.rs")); -use fluent_bundle::{FluentBundle, FluentResource, FluentValue, FluentArgs}; +use fluent_bundle::FluentArgs; use fluent_resmgr::resource_manager::ResourceManager; //struct @@ -35,29 +38,29 @@ pub struct word_list { } pub type WordList = word_list; -#[repr (C)] -pub struct builtin{ - pub name:*mut c_char, - pub function:*mut sh_builtin_func_t, - pub flags:i32, - pub long_doc: *const *mut c_char , - pub short_doc:*const c_char, - pub handle:*mut c_char, +#[repr(C)] +pub struct builtin { + pub name: *mut c_char, + pub function: *mut sh_builtin_func_t, + pub flags: i32, + pub long_doc: *const *mut c_char, + pub short_doc: *const c_char, + pub handle: *mut c_char, } -#[repr (C)] -pub struct g_list{ - pub next:*mut g_list, +#[repr(C)] +pub struct g_list { + pub next: *mut g_list, } type GENERIC_LIST = g_list; -#[repr (C)] -pub struct process{ - pub next:*mut process, - pub pid:pid_t, - pub status:WAIT, - pub running:i32, - pub command:*mut c_char, +#[repr(C)] +pub struct process { + pub next: *mut process, + pub pid: pid_t, + pub status: WAIT, + pub running: i32, + pub command: *mut c_char, } type WAIT = i32; type pid_t = c_int; @@ -242,7 +245,6 @@ pub union VALUE_COMMAND { Coproc:*mut coproc_com } - #[repr(u8)] enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, cm_connection, cm_function_def, cm_until, cm_group, @@ -517,12 +519,10 @@ macro_rules! non_unsettable_p { #[macro_export] macro_rules! VUNSETATTR { ($var:expr,$attr:expr) => { - (*$var).attributes &= !($attr) + (*$var).attributes &= ($attr) }; } - - #[macro_export] macro_rules! ISOCTAL { ($c:expr) => { @@ -564,11 +564,10 @@ macro_rules! STREQN { ($a:expr,$b:expr,$n:expr) => { if $n == 0 { 1 + } else { + (*$a == *$b && strncmp($a, $b, $n) == 0) as i32 } - else{ - (*$a == *$b && strncmp($a,$b,$n) == 0) as i32 - } - } + }; } #[macro_export] @@ -1428,7 +1427,7 @@ pub extern "C" fn r_get_job_spec(list:*mut WordList)->i32{ * NOTE: `kill' calls this function with forcecols == 0 */ pub extern "C" fn r_display_signal_list(mut list:*mut WordList,forcecols:i32)->i32{ - let mut i:i32; + let mut _i:i32; let mut column:i32; let mut name:*mut c_char; let mut result:i32; @@ -1546,10 +1545,10 @@ pub extern "C" fn r_display_signal_list(mut list:*mut WordList,forcecols:i32)->i DISABLED_OKAY means find it even if the builtin is disabled. */ extern "C" fn r_print_builtin_name() { - let mut hi:i32; - let mut lo:i32; - let mut mid:i32 = 0; - let mut j:i32; + let hi:i32; + let lo:i32; + let _mid:i32 = 0; + let mut _j:i32; unsafe{ hi = num_shell_builtins -1; @@ -1790,15 +1789,15 @@ pub unsafe fn err_translate_fn (command:&String , args1 : *mut libc::c_char) { } let bundle = mgr.get_bundle(get_local_str(), resources); - let mut value = bundle.get_message(command).unwrap(); - let mut pattern = value.value().expect("partern err"); + let value = bundle.get_message(command).unwrap(); + let pattern = value.value().expect("partern err"); let mut errors = vec![]; if args1 != std::ptr::null_mut(){ - let mut msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); + let msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); eprint!("{msg1}"); } else { - let mut msg1 = bundle.format_pattern(&pattern, None, &mut errors); + let msg1 = bundle.format_pattern(&pattern, None, &mut errors); eprint!("{msg1}"); } } @@ -1812,15 +1811,15 @@ pub unsafe fn translate_fn (command:&String , args1 : *mut libc::c_char) { } let bundle = mgr.get_bundle(get_local_str(), resources); - let mut value = bundle.get_message(command).unwrap(); - let mut pattern = value.value().expect("partern err"); + let value = bundle.get_message(command).unwrap(); + let pattern = value.value().expect("partern err"); let mut errors = vec![]; if args1 != std::ptr::null_mut(){ - let mut msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); + let msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); print!("{msg1}"); } else { - let mut msg1 = bundle.format_pattern(&pattern, None, &mut errors); + let msg1 = bundle.format_pattern(&pattern, None, &mut errors); print!("{msg1}"); } -} \ No newline at end of file +} diff --git a/bash-5.1/builtins_rust/complete/src/lib.rs b/bash-5.1/builtins_rust/complete/src/lib.rs index 74a8d9e1f8be1712a83eba5c1ff44b30192a185d..248859b6b19c5dcfe022f5e72ca65ac4185144df 100644 --- a/bash-5.1/builtins_rust/complete/src/lib.rs +++ b/bash-5.1/builtins_rust/complete/src/lib.rs @@ -1,1383 +1,1605 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -extern crate libc; +extern crate libc; extern crate nix; use libc::{c_char, c_int, c_ulong, c_void}; -use std::{ffi::CString, ffi::CStr}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, r_savestring} ; +use rcommon::{r_savestring, WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; +use std::{ffi::CStr, ffi::CString}; #[repr(u8)] -enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, - cm_connection, cm_function_def, cm_until, cm_group, - cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc +enum command_type { + cm_for, + cm_case, + cm_while, + cm_if, + cm_simple, + cm_select, + cm_connection, + cm_function_def, + cm_until, + cm_group, + cm_arith, + cm_cond, + cm_arith_for, + cm_subshell, + cm_coproc, } #[repr(u8)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] enum r_instruction { - r_output_direction, r_input_direction, r_inputa_direction, - r_appending_to, r_reading_until, r_reading_string, - r_duplicating_input, r_duplicating_output, r_deblank_reading_until, - r_close_this, r_err_and_out, r_input_output, r_output_force, - r_duplicating_input_word, r_duplicating_output_word, - r_move_input, r_move_output, r_move_input_word, r_move_output_word, - r_append_err_and_out + r_output_direction, + r_input_direction, + r_inputa_direction, + r_appending_to, + r_reading_until, + r_reading_string, + r_duplicating_input, + r_duplicating_output, + r_deblank_reading_until, + r_close_this, + r_err_and_out, + r_input_output, + r_output_force, + r_duplicating_input_word, + r_duplicating_output_word, + r_move_input, + r_move_output, + r_move_input_word, + r_move_output_word, + r_append_err_and_out, } #[repr(C)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] pub union REDIRECTEE { - dest:c_int, - filename:* mut WordDesc + dest: c_int, + filename: *mut WordDesc, } #[repr(C)] pub union REDIRECT { - next:*mut REDIRECT, - redirector:REDIRECTEE, - rflags:c_int, - flags:c_int, - instruction:r_instruction, - redirectee:REDIRECTEE, - here_doc_eof:*mut c_char + next: *mut REDIRECT, + redirector: REDIRECTEE, + rflags: c_int, + flags: c_int, + instruction: r_instruction, + redirectee: REDIRECTEE, + here_doc_eof: *mut c_char, } /* FOR command. */ #[repr(C)] pub struct for_com { - flags:c_int, - line:c_int, - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: c_int, + line: c_int, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct PATTERN_LIST { - next:* mut PATTERN_LIST, - patterns:* mut WordList, - action:*mut COMMAND, - flags:c_int + next: *mut PATTERN_LIST, + patterns: *mut WordList, + action: *mut COMMAND, + flags: c_int, } #[repr(C)] pub struct case_com { - flags:c_int, - line:c_int, - word:*mut WordDesc, - clauses:*mut PATTERN_LIST + flags: c_int, + line: c_int, + word: *mut WordDesc, + clauses: *mut PATTERN_LIST, } #[repr(C)] pub struct while_com { - flags:c_int, - test:*mut COMMAND, - action:*mut COMMAND + flags: c_int, + test: *mut COMMAND, + action: *mut COMMAND, } #[repr(C)] pub struct if_com { - flags:c_int, - test:*mut COMMAND, - true_case:*mut COMMAND, - false_case:*mut COMMAND + flags: c_int, + test: *mut COMMAND, + true_case: *mut COMMAND, + false_case: *mut COMMAND, } #[repr(C)] pub struct connection { - ignore:c_int, - first:*mut COMMAND, - second:*mut COMMAND, - connector:c_int + ignore: c_int, + first: *mut COMMAND, + second: *mut COMMAND, + connector: c_int, } #[repr(C)] pub struct simple_com { - flags:c_int, - line:c_int, - words:*mut WordList, - redirects:*mut REDIRECT + flags: c_int, + line: c_int, + words: *mut WordList, + redirects: *mut REDIRECT, } #[repr(C)] pub struct function_def { - flags:c_int, - line:c_int, - name:*mut WordDesc, - command:*mut COMMAND, - source_file:*mut c_char + flags: c_int, + line: c_int, + name: *mut WordDesc, + command: *mut COMMAND, + source_file: *mut c_char, } #[repr(C)] pub struct group_com { - ignore:libc::c_int, - command:*mut COMMAND, - source_file:*mut c_char + ignore: libc::c_int, + command: *mut COMMAND, + source_file: *mut c_char, } #[repr(C)] pub struct select_com { - flags:c_int, - line:c_int, - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: c_int, + line: c_int, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct arith_com { - flags:c_int, - line:c_int, - exp:*mut WordList + flags: c_int, + line: c_int, + exp: *mut WordList, } #[repr(C)] pub struct cond_com { - flags:c_int, - line:c_int, - type_c:c_int, - exp:*mut WordList + flags: c_int, + line: c_int, + type_c: c_int, + exp: *mut WordList, } #[repr(C)] pub struct arith_for_com { - flags:c_int, - line:c_int, - init:*mut WordList, - test:*mut WordList, - step:*mut WordList, - action:*mut COMMAND + flags: c_int, + line: c_int, + init: *mut WordList, + test: *mut WordList, + step: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct subshell_com { - flags:i32, - line:i32, - command:*mut COMMAND + flags: i32, + line: i32, + command: *mut COMMAND, } #[repr(C)] pub struct coproc_com { - flags:i32, - name:*mut c_char, - command:*mut COMMAND + flags: i32, + name: *mut c_char, + command: *mut COMMAND, } #[repr(C)] pub union VALUE_COMMAND { - For:*mut for_com, - Case:*mut case_com, - While:*mut while_com, - If:*mut if_com, - Connection:*mut connection, - Simple:*mut simple_com, - Function_def:*mut function_def, - Group:*mut group_com, - Select:*mut select_com, - Arith:*mut arith_com, - Cond:*mut cond_com, - ArithFor:*mut arith_for_com, - Subshell:*mut subshell_com, - Coproc:*mut coproc_com + For: *mut for_com, + Case: *mut case_com, + While: *mut while_com, + If: *mut if_com, + Connection: *mut connection, + Simple: *mut simple_com, + Function_def: *mut function_def, + Group: *mut group_com, + Select: *mut select_com, + Arith: *mut arith_com, + Cond: *mut cond_com, + ArithFor: *mut arith_for_com, + Subshell: *mut subshell_com, + Coproc: *mut coproc_com, } #[repr(C)] pub struct COMMAND { - type_c:command_type, - flags:i32, - line:i32, - redirects:*mut REDIRECT, - value:VALUE_COMMAND + type_c: command_type, + flags: i32, + line: i32, + redirects: *mut REDIRECT, + value: VALUE_COMMAND, } /* Structure containing all the non-action (binary) options; filled in by - build_actions(). */ +build_actions(). */ #[repr(C)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] pub struct _optflags { - pflag:c_int, - rflag:c_int, - Dflag:c_int, - Eflag:c_int, - Iflag:c_int + pflag: c_int, + rflag: c_int, + Dflag: c_int, + Eflag: c_int, + Iflag: c_int, } #[repr(C)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] pub struct _compacts { - actname:* const c_char, - actflag:libc::c_ulong, - actopt:c_int, + actname: *const c_char, + actflag: libc::c_ulong, + actopt: c_int, } pub struct CompactsArray { - compactsArr:[_compacts;25usize] + compactsArr: [_compacts; 25usize], } impl CompactsArray { - pub fn new()->CompactsArray { - CompactsArray{ - compactsArr:[ - _compacts{ actname:b"alias\0".as_ptr() as *const c_char, actflag: CA_ALIAS!(),actopt: 'a' as c_int }, - _compacts{ actname:b"arrayvar\0".as_ptr() as *const c_char, actflag: CA_ARRAYVAR!(),actopt: 0 as c_int }, - _compacts{ actname:b"binding\0".as_ptr() as *const c_char, actflag: CA_BINDING!(),actopt: 0 as c_int }, - _compacts{ actname:b"builtin\0".as_ptr() as *const c_char, actflag: CA_BUILTIN!(),actopt: 'b' as c_int }, - _compacts{ actname:b"command\0".as_ptr() as *const c_char, actflag: CA_COMMAND!(),actopt: 'c' as c_int }, - _compacts{ actname:b"directory\0".as_ptr() as *const c_char, actflag: CA_DIRECTORY!(),actopt: 'd' as c_int }, - _compacts{ actname:b"disabled\0".as_ptr() as *const c_char, actflag: CA_DISABLED!(),actopt: 0 as c_int }, - _compacts{ actname:b"enabled\0".as_ptr() as *const c_char, actflag: CA_ENABLED!(),actopt: 0 as c_int }, - _compacts{ actname:b"export\0".as_ptr() as *const c_char, actflag: CA_EXPORT!(),actopt: 'e' as c_int }, - _compacts{ actname:b"file\0".as_ptr() as *const c_char, actflag: CA_FILE!(),actopt: 'f' as c_int }, - _compacts{ actname:b"function\0".as_ptr() as *const c_char, actflag: CA_FUNCTION!(),actopt: 0 as c_int }, - _compacts{ actname:b"helptopic\0".as_ptr() as *const c_char, actflag: CA_HELPTOPIC!(),actopt: 0 as c_int }, - _compacts{ actname:b"hostname\0".as_ptr() as *const c_char, actflag: CA_HOSTNAME!(),actopt: 0 as c_int }, - _compacts{ actname:b"group\0".as_ptr() as *const c_char, actflag: CA_GROUP!(),actopt: 'g' as c_int }, - _compacts{ actname:b"job\0".as_ptr() as *const c_char, actflag: CA_JOB!(),actopt: 'j' as c_int }, - _compacts{ actname:b"keyword\0".as_ptr() as *const c_char, actflag: CA_KEYWORD!(),actopt: 'k' as c_int }, - _compacts{ actname:b"running\0".as_ptr() as *const c_char, actflag: CA_RUNNING!(),actopt: 0 as c_int }, - _compacts{ actname:b"service\0".as_ptr() as *const c_char, actflag: CA_SERVICE!(),actopt: 's' as c_int }, - _compacts{ actname:b"setopt\0".as_ptr() as *const c_char, actflag: CA_SETOPT!(),actopt: 0 as c_int }, - _compacts{ actname:b"shopt\0".as_ptr() as *const c_char, actflag: CA_SHOPT!(),actopt: 0 as c_int }, - _compacts{ actname:b"signal\0".as_ptr() as *const c_char, actflag: CA_SIGNAL!(),actopt: 0 as c_int }, - _compacts{ actname:b"stopped\0".as_ptr() as *const c_char, actflag: CA_STOPPED!(),actopt: 0 as c_int }, - _compacts{ actname:b"user\0".as_ptr() as *const c_char, actflag: CA_USER!(),actopt: 'u' as c_int }, - _compacts{ actname:b"variable\0".as_ptr() as *const c_char, actflag: CA_VARIABLE!(),actopt: 'v' as c_int }, - _compacts{ actname:std::ptr::null_mut(), actflag: 0,actopt: 0 as c_int }, - ] - } + pub fn new() -> CompactsArray { + CompactsArray { + compactsArr: [ + _compacts { + actname: b"alias\0".as_ptr() as *const c_char, + actflag: CA_ALIAS!(), + actopt: 'a' as c_int, + }, + _compacts { + actname: b"arrayvar\0".as_ptr() as *const c_char, + actflag: CA_ARRAYVAR!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"binding\0".as_ptr() as *const c_char, + actflag: CA_BINDING!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"builtin\0".as_ptr() as *const c_char, + actflag: CA_BUILTIN!(), + actopt: 'b' as c_int, + }, + _compacts { + actname: b"command\0".as_ptr() as *const c_char, + actflag: CA_COMMAND!(), + actopt: 'c' as c_int, + }, + _compacts { + actname: b"directory\0".as_ptr() as *const c_char, + actflag: CA_DIRECTORY!(), + actopt: 'd' as c_int, + }, + _compacts { + actname: b"disabled\0".as_ptr() as *const c_char, + actflag: CA_DISABLED!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"enabled\0".as_ptr() as *const c_char, + actflag: CA_ENABLED!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"export\0".as_ptr() as *const c_char, + actflag: CA_EXPORT!(), + actopt: 'e' as c_int, + }, + _compacts { + actname: b"file\0".as_ptr() as *const c_char, + actflag: CA_FILE!(), + actopt: 'f' as c_int, + }, + _compacts { + actname: b"function\0".as_ptr() as *const c_char, + actflag: CA_FUNCTION!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"helptopic\0".as_ptr() as *const c_char, + actflag: CA_HELPTOPIC!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"hostname\0".as_ptr() as *const c_char, + actflag: CA_HOSTNAME!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"group\0".as_ptr() as *const c_char, + actflag: CA_GROUP!(), + actopt: 'g' as c_int, + }, + _compacts { + actname: b"job\0".as_ptr() as *const c_char, + actflag: CA_JOB!(), + actopt: 'j' as c_int, + }, + _compacts { + actname: b"keyword\0".as_ptr() as *const c_char, + actflag: CA_KEYWORD!(), + actopt: 'k' as c_int, + }, + _compacts { + actname: b"running\0".as_ptr() as *const c_char, + actflag: CA_RUNNING!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"service\0".as_ptr() as *const c_char, + actflag: CA_SERVICE!(), + actopt: 's' as c_int, + }, + _compacts { + actname: b"setopt\0".as_ptr() as *const c_char, + actflag: CA_SETOPT!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"shopt\0".as_ptr() as *const c_char, + actflag: CA_SHOPT!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"signal\0".as_ptr() as *const c_char, + actflag: CA_SIGNAL!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"stopped\0".as_ptr() as *const c_char, + actflag: CA_STOPPED!(), + actopt: 0 as c_int, + }, + _compacts { + actname: b"user\0".as_ptr() as *const c_char, + actflag: CA_USER!(), + actopt: 'u' as c_int, + }, + _compacts { + actname: b"variable\0".as_ptr() as *const c_char, + actflag: CA_VARIABLE!(), + actopt: 'v' as c_int, + }, + _compacts { + actname: std::ptr::null_mut(), + actflag: 0, + actopt: 0 as c_int, + }, + ], + } } } #[repr(C)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] pub struct _compopt { - optname:* const c_char, - optflag:libc::c_ulong, + optname: *const c_char, + optflag: libc::c_ulong, } pub struct CompoptArray { - compoptArr:[_compopt;9usize] + compoptArr: [_compopt; 9usize], } impl CompoptArray { - pub fn new()->CompoptArray{ - CompoptArray{ - compoptArr:[ - _compopt{ optname:"bashdefault\0".as_ptr() as *const c_char, optflag:COPT_BASHDEFAULT!() }, - _compopt{ optname:"default\0".as_ptr() as *const c_char, optflag:COPT_DEFAULT!() }, - _compopt{ optname:"dirnames\0".as_ptr() as *const c_char, optflag:COPT_DIRNAMES!() }, - _compopt{ optname:"filenames\0".as_ptr() as *const c_char,optflag:COPT_FILENAMES!()}, - _compopt{ optname:"noquote\0".as_ptr() as *const c_char, optflag:COPT_NOQUOTE!() }, - _compopt{ optname:"nosort\0".as_ptr() as *const c_char, optflag:COPT_NOSORT!() }, - _compopt{ optname:"nospace\0".as_ptr() as *const c_char, optflag:COPT_NOSPACE!() }, - _compopt{ optname:"plusdirs\0".as_ptr() as *const c_char, optflag:COPT_PLUSDIRS!() }, - _compopt{ optname:std::ptr::null_mut(), optflag:0 }, - ] + pub fn new() -> CompoptArray { + CompoptArray { + compoptArr: [ + _compopt { + optname: "bashdefault\0".as_ptr() as *const c_char, + optflag: COPT_BASHDEFAULT!(), + }, + _compopt { + optname: "default\0".as_ptr() as *const c_char, + optflag: COPT_DEFAULT!(), + }, + _compopt { + optname: "dirnames\0".as_ptr() as *const c_char, + optflag: COPT_DIRNAMES!(), + }, + _compopt { + optname: "filenames\0".as_ptr() as *const c_char, + optflag: COPT_FILENAMES!(), + }, + _compopt { + optname: "noquote\0".as_ptr() as *const c_char, + optflag: COPT_NOQUOTE!(), + }, + _compopt { + optname: "nosort\0".as_ptr() as *const c_char, + optflag: COPT_NOSORT!(), + }, + _compopt { + optname: "nospace\0".as_ptr() as *const c_char, + optflag: COPT_NOSPACE!(), + }, + _compopt { + optname: "plusdirs\0".as_ptr() as *const c_char, + optflag: COPT_PLUSDIRS!(), + }, + _compopt { + optname: std::ptr::null_mut(), + optflag: 0, + }, + ], + } } - } } #[repr(C)] pub struct COMPSPEC { - refcount:c_int, - actions:c_ulong, - options:c_ulong, - globpat:* mut c_char, - words:* mut c_char, - prefix: * mut c_char, - suffix: * mut c_char, - funcname: * mut c_char, - command:* mut c_char, - lcommand:* mut c_char, - filterpat:* mut c_char, + refcount: c_int, + actions: c_ulong, + options: c_ulong, + globpat: *mut c_char, + words: *mut c_char, + prefix: *mut c_char, + suffix: *mut c_char, + funcname: *mut c_char, + command: *mut c_char, + lcommand: *mut c_char, + filterpat: *mut c_char, } #[repr(C)] pub struct BUCKET_CONTENTS { - next:* mut BUCKET_CONTENTS, /* Link to next hashed key in this bucket. */ - key:* mut c_char, /* What we look up. */ - data:* mut libc::c_void, /* What we really want. */ - khash:libc::c_uint, /* What key hashes to */ - times_found:i32, /* Number of times this item has been found. */ + next: *mut BUCKET_CONTENTS, /* Link to next hashed key in this bucket. */ + key: *mut c_char, /* What we look up. */ + data: *mut libc::c_void, /* What we really want. */ + khash: libc::c_uint, /* What key hashes to */ + times_found: i32, /* Number of times this item has been found. */ } #[repr(C)] pub struct STRINGLIST { - list:* mut * mut c_char, - list_size:c_int, - list_len:c_int, + list: *mut *mut c_char, + list_size: c_int, + list_len: c_int, } - #[macro_export] macro_rules! CA_ALIAS { - () => { - 1<<0 - } + () => { + 1 << 0 + }; } #[macro_export] macro_rules! CA_ARRAYVAR { - () => { - 1<<1 - } + () => { + 1 << 1 + }; } #[macro_export] macro_rules! CA_BINDING { - () => { - 1<<2 - } + () => { + 1 << 2 + }; } #[macro_export] macro_rules! CA_BUILTIN { - () => { - 1<<3 - } + () => { + 1 << 3 + }; } #[macro_export] macro_rules! CA_COMMAND { - () => { - 1<<4 - } + () => { + 1 << 4 + }; } #[macro_export] macro_rules! CA_DIRECTORY { - () => { - 1<<5 - } + () => { + 1 << 5 + }; } #[macro_export] macro_rules! CA_DISABLED { - () => { - 1<<6 - } + () => { + 1 << 6 + }; } #[macro_export] macro_rules! CA_ENABLED { - () => { - 1<<7 - } + () => { + 1 << 7 + }; } #[macro_export] macro_rules! CA_EXPORT { - () => { - 1<<8 - } + () => { + 1 << 8 + }; } #[macro_export] macro_rules! CA_FILE { - () => { - 1<<9 - } + () => { + 1 << 9 + }; } #[macro_export] macro_rules! CA_FUNCTION { - () => { - 1<<10 - } + () => { + 1 << 10 + }; } #[macro_export] macro_rules! CA_GROUP { - () => { - 1<<11 - } + () => { + 1 << 11 + }; } #[macro_export] macro_rules! CA_HELPTOPIC { - () => { - 1<<12 - } + () => { + 1 << 12 + }; } #[macro_export] macro_rules! CA_HOSTNAME { - () => { - 1<<13 - } + () => { + 1 << 13 + }; } #[macro_export] macro_rules! CA_JOB { - () => { - 1<<14 - } + () => { + 1 << 14 + }; } #[macro_export] macro_rules! CA_KEYWORD { - () => { - 1<<15 - } + () => { + 1 << 15 + }; } #[macro_export] macro_rules! CA_RUNNING { - () => { - 1<<16 - } + () => { + 1 << 16 + }; } #[macro_export] macro_rules! CA_SERVICE { - () => { - 1<<17 - } + () => { + 1 << 17 + }; } #[macro_export] macro_rules! CA_SETOPT { - () => { - 1<<18 - } + () => { + 1 << 18 + }; } #[macro_export] macro_rules! CA_SHOPT { - () => { - 1<<19 - } + () => { + 1 << 19 + }; } #[macro_export] macro_rules! CA_SIGNAL { - () => { - 1<<20 - } + () => { + 1 << 20 + }; } #[macro_export] macro_rules! CA_STOPPED { - () => { - 1<<21 - } + () => { + 1 << 21 + }; } #[macro_export] macro_rules! CA_USER { - () => { - 1<<22 - } + () => { + 1 << 22 + }; } #[macro_export] macro_rules! CA_VARIABLE { - () => { - 1<<23 - } + () => { + 1 << 23 + }; } #[macro_export] macro_rules! COPT_RESERVED { - () => { - 1<<0 - } + () => { + 1 << 0 + }; } #[macro_export] macro_rules! COPT_DEFAULT { - () => { - 1<<1 - } + () => { + 1 << 1 + }; } #[macro_export] macro_rules! COPT_FILENAMES { - () => { - 1<<2 - } + () => { + 1 << 2 + }; } #[macro_export] macro_rules! COPT_DIRNAMES { - () => { - 1<<3 - } + () => { + 1 << 3 + }; } #[macro_export] macro_rules! COPT_NOQUOTE { - () => { - 1<<4 - } + () => { + 1 << 4 + }; } #[macro_export] macro_rules! COPT_NOSPACE { - () => { - 1<<5 - } + () => { + 1 << 5 + }; } #[macro_export] macro_rules! COPT_BASHDEFAULT { - () => { - 1<<6 - } + () => { + 1 << 6 + }; } #[macro_export] macro_rules! COPT_PLUSDIRS { - () => { - 1<<7 - } + () => { + 1 << 7 + }; } #[macro_export] macro_rules! COPT_NOSORT { - () => { - 1<<8 - } + () => { + 1 << 8 + }; } #[macro_export] macro_rules! RL_STATE_COMPLETING { - () => { - 0x0004000 /* doing completion */ - } + () => { + 0x0004000 /* doing completion */ + }; } extern "C" { - fn reset_internal_getopt(); - fn internal_getopt (list:*mut WordList , opts:*mut c_char)->i32; - fn sh_invalidopt (value:* mut c_char); - fn sh_invalidid (value:* mut c_char); - fn sh_invalidoptname (value:* mut c_char); - fn builtin_usage(); - static list_optarg:* mut c_char; - fn builtin_error(err:*const c_char,...); - fn check_identifier (w:* mut WordDesc, f:i32)->i32; - static mut posixly_correct:i32; - static mut loptend:*mut WordList; - fn make_word_list (w:* mut WordDesc, list:*mut WordList)->*mut WordList; - fn make_bare_word (w:*const c_char)->* mut WordDesc; - fn dispose_words (list:*mut WordList); - fn progcomp_flush (); - fn compspec_create ()->* mut COMPSPEC; - fn progcomp_insert (str:* mut c_char, c:* mut COMPSPEC)->i32; - fn progcomp_remove (str:* mut c_char)->i32; - fn sh_single_quote (str:* mut c_char)->* mut c_char; - fn progcomp_walk (func: unsafe extern "C" fn (item:* mut BUCKET_CONTENTS)->i32); - fn sh_chkwrite (i:i32)->i32; - fn progcomp_search (w:*const c_char)->* mut COMPSPEC; - static mut pcomp_line:* mut c_char; - static mut pcomp_ind:c_int; - fn gen_compspec_completions (cs:* mut COMPSPEC, cmd:*const c_char, word:*const c_char, start:i32, end:i32, foundp:* mut i32)->* mut STRINGLIST; - fn bash_default_completion (text:* const c_char, start:i32, end:i32, qc:i32, compflags:i32)->* mut * mut c_char; - fn rl_filename_completion_function (text:* const c_char, state:i32)-> * mut c_char; - fn rl_completion_matches (text:* const c_char, entry_function:unsafe extern "C" fn (text:* const c_char, state:i32)-> * mut c_char)->* mut * mut c_char; - fn completions_to_stringlist (matches:* mut * mut c_char)->* mut STRINGLIST; - fn strvec_dispose (matches:* mut * mut c_char); - fn strlist_dispose (strlist:* mut STRINGLIST); - fn strlist_print (strlist:* mut STRINGLIST, text:* mut c_char); - fn compspec_dispose (com:* mut COMPSPEC); - static mut list_opttype:i32; - static mut rl_readline_state:c_ulong; - static mut pcomp_curcs:* mut COMPSPEC; - static pcomp_curcmd:* mut c_char; - fn pcomp_set_compspec_options (cs:* mut COMPSPEC, flags:i32, set_or_unset:i32); - fn pcomp_set_readline_variables (flags:i32, nval:i32); -} - -pub static mut Garg:* mut c_char=std::ptr::null_mut(); -pub static mut Warg:* mut c_char=std::ptr::null_mut(); -pub static mut Parg:* mut c_char=std::ptr::null_mut(); -pub static mut Sarg:* mut c_char=std::ptr::null_mut(); -pub static mut Xarg:* mut c_char=std::ptr::null_mut(); -pub static mut Farg:* mut c_char=std::ptr::null_mut(); -pub static mut Carg:* mut c_char=std::ptr::null_mut(); - -unsafe fn STRDUP(x:* const c_char)->* mut c_char -{ - if x !=std::ptr::null_mut() { - return r_savestring (x); - } else { - return std::ptr::null_mut(); - } -} - -unsafe fn STREQ( a:* const c_char, b:* const c_char)->bool -{ - return *a ==*b && libc::strcmp(a, b) == 0; -} - -unsafe fn shell_break_chars()->* const c_char -{ - return b"()<>;&| \t\n\0".as_ptr() as *const c_char; -} - -unsafe fn EMPTYCMD()->* const c_char -{ - return b"_EmptycmD_\0".as_ptr() as *const c_char; -} - -unsafe fn DEFAULTCMD()->* const c_char -{ - return b"_DefaultCmD_\0".as_ptr() as *const c_char; -} - -unsafe fn INITIALWORD()->* const c_char -{ - return b"_InitialWorD_\0".as_ptr() as *const c_char; -} - -unsafe fn RL_ISSTATE(x:c_ulong)->c_ulong -{ - return rl_readline_state & x; + fn reset_internal_getopt(); + fn internal_getopt(list: *mut WordList, opts: *mut c_char) -> i32; + fn sh_invalidopt(value: *mut c_char); + fn sh_invalidid(value: *mut c_char); + fn sh_invalidoptname(value: *mut c_char); + fn builtin_usage(); + static list_optarg: *mut c_char; + fn builtin_error(err: *const c_char, ...); + fn check_identifier(w: *mut WordDesc, f: i32) -> i32; + static mut posixly_correct: i32; + static mut loptend: *mut WordList; + fn make_word_list(w: *mut WordDesc, list: *mut WordList) -> *mut WordList; + fn make_bare_word(w: *const c_char) -> *mut WordDesc; + fn dispose_words(list: *mut WordList); + fn progcomp_flush(); + fn compspec_create() -> *mut COMPSPEC; + fn progcomp_insert(str: *mut c_char, c: *mut COMPSPEC) -> i32; + fn progcomp_remove(str: *mut c_char) -> i32; + fn sh_single_quote(str: *mut c_char) -> *mut c_char; + fn progcomp_walk(func: unsafe extern "C" fn(item: *mut BUCKET_CONTENTS) -> i32); + fn sh_chkwrite(i: i32) -> i32; + fn progcomp_search(w: *const c_char) -> *mut COMPSPEC; + static mut pcomp_line: *mut c_char; + static mut pcomp_ind: c_int; + fn gen_compspec_completions( + cs: *mut COMPSPEC, + cmd: *const c_char, + word: *const c_char, + start: i32, + end: i32, + foundp: *mut i32, + ) -> *mut STRINGLIST; + fn bash_default_completion( + text: *const c_char, + start: i32, + end: i32, + qc: i32, + compflags: i32, + ) -> *mut *mut c_char; + fn rl_filename_completion_function(text: *const c_char, state: i32) -> *mut c_char; + fn rl_completion_matches( + text: *const c_char, + entry_function: unsafe extern "C" fn(text: *const c_char, state: i32) -> *mut c_char, + ) -> *mut *mut c_char; + fn completions_to_stringlist(matches: *mut *mut c_char) -> *mut STRINGLIST; + fn strvec_dispose(matches: *mut *mut c_char); + fn strlist_dispose(strlist: *mut STRINGLIST); + fn strlist_print(strlist: *mut STRINGLIST, text: *mut c_char); + fn compspec_dispose(com: *mut COMPSPEC); + static mut list_opttype: i32; + static mut rl_readline_state: c_ulong; + static mut pcomp_curcs: *mut COMPSPEC; + static pcomp_curcmd: *mut c_char; + fn pcomp_set_compspec_options(cs: *mut COMPSPEC, flags: i32, set_or_unset: i32); + fn pcomp_set_readline_variables(flags: i32, nval: i32); +} + +pub static mut Garg: *mut c_char = std::ptr::null_mut(); +pub static mut Warg: *mut c_char = std::ptr::null_mut(); +pub static mut Parg: *mut c_char = std::ptr::null_mut(); +pub static mut Sarg: *mut c_char = std::ptr::null_mut(); +pub static mut Xarg: *mut c_char = std::ptr::null_mut(); +pub static mut Farg: *mut c_char = std::ptr::null_mut(); +pub static mut Carg: *mut c_char = std::ptr::null_mut(); + +unsafe fn STRDUP(x: *const c_char) -> *mut c_char { + if x != std::ptr::null_mut() { + return r_savestring(x); + } else { + return std::ptr::null_mut(); + } +} + +unsafe fn STREQ(a: *const c_char, b: *const c_char) -> bool { + return *a == *b && libc::strcmp(a, b) == 0; +} + +unsafe fn shell_break_chars() -> *const c_char { + return b"()<>;&| \t\n\0".as_ptr() as *const c_char; +} + +unsafe fn EMPTYCMD() -> *const c_char { + return b"_EmptycmD_\0".as_ptr() as *const c_char; +} + +unsafe fn DEFAULTCMD() -> *const c_char { + return b"_DefaultCmD_\0".as_ptr() as *const c_char; +} + +unsafe fn INITIALWORD() -> *const c_char { + return b"_InitialWorD_\0".as_ptr() as *const c_char; +} + +unsafe fn RL_ISSTATE(x: c_ulong) -> c_ulong { + return rl_readline_state & x; } #[no_mangle] -pub extern "C" fn r_find_compact (name:* mut c_char)->i32 -{ - let mut i:i32=0; - unsafe { - let compacts:CompactsArray=CompactsArray::new(); - while compacts.compactsArr[i as usize].actname != std::ptr::null_mut() { - let tmp = CStr::from_ptr(compacts.compactsArr[i as usize].actname); - if STREQ (name, compacts.compactsArr[i as usize].actname) { - return i; - } - i+=1; +pub extern "C" fn r_find_compact(name: *mut c_char) -> i32 { + let mut i: i32 = 0; + unsafe { + let compacts: CompactsArray = CompactsArray::new(); + while compacts.compactsArr[i as usize].actname != std::ptr::null_mut() { + let tmp = CStr::from_ptr(compacts.compactsArr[i as usize].actname); + if STREQ(name, compacts.compactsArr[i as usize].actname) { + return i; + } + i += 1; + } + return -1; } - return -1; - } } #[no_mangle] -pub extern "C" fn r_find_compopt (name:* mut c_char)->i32 -{ - let mut i:i32=0; - let compopts:CompoptArray=CompoptArray::new(); - unsafe { - while compopts.compoptArr[i as usize].optname != std::ptr::null_mut() { - if STREQ (name, compopts.compoptArr[i as usize].optname) { - return i; - } - i+=1; +pub extern "C" fn r_find_compopt(name: *mut c_char) -> i32 { + let mut i: i32 = 0; + let compopts: CompoptArray = CompoptArray::new(); + unsafe { + while compopts.compoptArr[i as usize].optname != std::ptr::null_mut() { + if STREQ(name, compopts.compoptArr[i as usize].optname) { + return i; + } + i += 1; + } + return -1; } - return -1; - } } #[no_mangle] -pub extern "C" fn r_build_actions (mut list : *mut WordList, flagp:* mut _optflags, actp:* mut c_ulong, optp:* mut c_ulong)->i32 -{ - let mut opt:i32; - let mut ind:i32; - let mut opt_given:i32=0; - let mut acts:c_ulong=0; - let mut copts:c_ulong=0; - let mut w:WordDesc=WordDesc{word:std::ptr::null_mut(),flags:0}; - - unsafe { - reset_internal_getopt (); - opt = internal_getopt(list, CString::new("abcdefgjko:prsuvA:G:W:P:S:X:F:C:DEI").unwrap().as_ptr() as * mut c_char); - while opt != -1 { - opt_given = 1; - let optu8:u8= opt as u8; - let optChar:char=char::from(optu8); - match optChar{ - 'r'=>{ - if flagp !=std::ptr::null_mut() { - (*flagp).rflag = 1; - } else { - sh_invalidopt (CString::new("-r").unwrap().as_ptr() as * mut c_char); - builtin_usage (); - return EX_USAGE; - } - } - 'p'=>{ - if flagp !=std::ptr::null_mut() { - (*flagp).pflag = 1; - } else { - sh_invalidopt (CString::new("-p").unwrap().as_ptr() as * mut c_char); - builtin_usage (); - return EX_USAGE; - } - } - 'a'=>{ - acts |= CA_ALIAS!(); - } - 'b'=>{ - acts |= CA_BUILTIN!(); - } - 'c'=>{ - acts |= CA_COMMAND!(); - } - 'd'=>{ - acts |= CA_DIRECTORY!(); - } - 'e'=>{ - acts |= CA_EXPORT!(); - } - 'f'=>{ - acts |= CA_FILE!(); - } - 'g'=>{ - acts |= CA_GROUP!(); - } - 'j'=>{ - acts |= CA_GROUP!(); - } - 'k'=>{ - acts |= CA_KEYWORD!(); - } - 's'=>{ - acts |= CA_SERVICE!(); - } - 'u'=>{ - acts |= CA_USER!(); - } - 'v'=>{ - acts |= CA_VARIABLE!(); - } - 'o'=>{ - ind = r_find_compopt (list_optarg); - if ind < 0 { - sh_invalidoptname (list_optarg); - return EX_USAGE; - } - let compopts:CompoptArray=CompoptArray::new(); - copts |= compopts.compoptArr[ind as usize].optflag; - } - 'A'=>{ - ind = r_find_compact (list_optarg); - if ind < 0 { - builtin_error (CString::new("%s: invalid action name").unwrap().as_ptr(), list_optarg); - return EX_USAGE; - } - let compacts:CompactsArray=CompactsArray::new(); - acts |= compacts.compactsArr[ind as usize].actflag; - } - 'C'=>{ - Carg = list_optarg; - } - 'D'=>{ - if flagp !=std::ptr::null_mut() { - (*flagp).Dflag = 1; - } else { - sh_invalidopt (CString::new("-D").unwrap().as_ptr() as * mut c_char); - builtin_usage (); - return EX_USAGE; - } - } - 'E'=>{ - if flagp !=std::ptr::null_mut() { - (*flagp).Eflag = 1; - } else { - sh_invalidopt (CString::new("-E").unwrap().as_ptr() as * mut c_char); - builtin_usage (); - return EX_USAGE; - } - } - 'I'=>{ - if flagp !=std::ptr::null_mut() { - (*flagp).Iflag = 1; - } else { - sh_invalidopt (CString::new("-I").unwrap().as_ptr() as * mut c_char); - builtin_usage (); - return EX_USAGE; +pub extern "C" fn r_build_actions( + mut list: *mut WordList, + flagp: *mut _optflags, + actp: *mut c_ulong, + optp: *mut c_ulong, +) -> i32 { + let mut opt: i32; + let mut ind: i32; + let mut opt_given: i32 = 0; + let mut acts: c_ulong = 0; + let mut copts: c_ulong = 0; + let mut w: WordDesc = WordDesc { + word: std::ptr::null_mut(), + flags: 0, + }; + + unsafe { + reset_internal_getopt(); + opt = internal_getopt( + list, + CString::new("abcdefgjko:prsuvA:G:W:P:S:X:F:C:DEI") + .unwrap() + .as_ptr() as *mut c_char, + ); + while opt != -1 { + opt_given = 1; + let optu8: u8 = opt as u8; + let optChar: char = char::from(optu8); + match optChar { + 'r' => { + if flagp != std::ptr::null_mut() { + (*flagp).rflag = 1; + } else { + sh_invalidopt(CString::new("-r").unwrap().as_ptr() as *mut c_char); + builtin_usage(); + return EX_USAGE; + } + } + 'p' => { + if flagp != std::ptr::null_mut() { + (*flagp).pflag = 1; + } else { + sh_invalidopt(CString::new("-p").unwrap().as_ptr() as *mut c_char); + builtin_usage(); + return EX_USAGE; + } + } + 'a' => { + acts |= CA_ALIAS!(); + } + 'b' => { + acts |= CA_BUILTIN!(); + } + 'c' => { + acts |= CA_COMMAND!(); + } + 'd' => { + acts |= CA_DIRECTORY!(); + } + 'e' => { + acts |= CA_EXPORT!(); + } + 'f' => { + acts |= CA_FILE!(); + } + 'g' => { + acts |= CA_GROUP!(); + } + 'j' => { + acts |= CA_GROUP!(); + } + 'k' => { + acts |= CA_KEYWORD!(); + } + 's' => { + acts |= CA_SERVICE!(); + } + 'u' => { + acts |= CA_USER!(); + } + 'v' => { + acts |= CA_VARIABLE!(); + } + 'o' => { + ind = r_find_compopt(list_optarg); + if ind < 0 { + sh_invalidoptname(list_optarg); + return EX_USAGE; + } + let compopts: CompoptArray = CompoptArray::new(); + copts |= compopts.compoptArr[ind as usize].optflag; + } + 'A' => { + ind = r_find_compact(list_optarg); + if ind < 0 { + builtin_error( + CString::new("%s: invalid action name").unwrap().as_ptr(), + list_optarg, + ); + return EX_USAGE; + } + let compacts: CompactsArray = CompactsArray::new(); + acts |= compacts.compactsArr[ind as usize].actflag; + } + 'C' => { + Carg = list_optarg; + } + 'D' => { + if flagp != std::ptr::null_mut() { + (*flagp).Dflag = 1; + } else { + sh_invalidopt(CString::new("-D").unwrap().as_ptr() as *mut c_char); + builtin_usage(); + return EX_USAGE; + } + } + 'E' => { + if flagp != std::ptr::null_mut() { + (*flagp).Eflag = 1; + } else { + sh_invalidopt(CString::new("-E").unwrap().as_ptr() as *mut c_char); + builtin_usage(); + return EX_USAGE; + } + } + 'I' => { + if flagp != std::ptr::null_mut() { + (*flagp).Iflag = 1; + } else { + sh_invalidopt(CString::new("-I").unwrap().as_ptr() as *mut c_char); + builtin_usage(); + return EX_USAGE; + } + } + 'F' => { + w.word = list_optarg; + Farg = list_optarg; + w.flags = 0; + if check_identifier(&mut w, posixly_correct) == 0 + || libc::strpbrk(Farg, shell_break_chars()) != std::ptr::null_mut() + { + sh_invalidid(Farg); + return EX_USAGE; + } + } + 'G' => { + Garg = list_optarg; + } + 'P' => { + Parg = list_optarg; + } + 'S' => { + Sarg = list_optarg; + } + 'W' => { + Warg = list_optarg; + } + 'X' => { + Xarg = list_optarg; + } + _ => { + if opt == -99 { + r_builtin_help(); + return EX_USAGE; + } + builtin_usage(); + return EX_USAGE; + } } - } - 'F'=>{ - w.word = list_optarg; - Farg = list_optarg; - w.flags = 0; - if check_identifier (&mut w, posixly_correct) == 0 || libc::strpbrk (Farg, shell_break_chars()) != std::ptr::null_mut() { - sh_invalidid (Farg); - return EX_USAGE; - } - } - 'G'=>{ - Garg = list_optarg; - } - 'P'=>{ - Parg = list_optarg; - } - 'S'=>{ - Sarg = list_optarg; - } - 'W'=>{ - Warg = list_optarg; - } - 'X'=>{ - Xarg = list_optarg; - } - _=>{ - if opt == -99 { - r_builtin_help(); - return EX_USAGE; - } - builtin_usage (); - return EX_USAGE; - } + opt = internal_getopt( + list, + CString::new("abcdefgjko:prsuvA:G:W:P:S:X:F:C:DEI") + .unwrap() + .as_ptr() as *mut c_char, + ); } - opt=internal_getopt(list, CString::new("abcdefgjko:prsuvA:G:W:P:S:X:F:C:DEI").unwrap().as_ptr() as * mut c_char); - } - *actp = acts; - *optp = copts; - list = loptend.clone(); - if opt_given !=0 { - return EXECUTION_SUCCESS!(); - } else { - return EXECUTION_FAILURE!(); - } - } + *actp = acts; + *optp = copts; + list = loptend.clone(); + if opt_given != 0 { + return EXECUTION_SUCCESS!(); + } else { + return EXECUTION_FAILURE!(); + } + } } /* Add, remove, and display completion specifiers. */ #[no_mangle] -pub extern "C" fn r_complete_builtin (listt: *mut WordList)->i32 -{ - let mut opt_given:i32=0; - let mut rval:i32; - let mut acts:c_ulong=0; - let mut copts:c_ulong=0; - let mut cs:* mut COMPSPEC; - let mut oflags:_optflags=_optflags{pflag:0,rflag:0,Dflag:0,Eflag:0,Iflag:0}; - let mut l: *mut WordList; - let mut wl: *mut WordList; - - unsafe { - let mut list:* mut WordList=listt.clone(); - if list == std::ptr::null_mut() { - r_print_all_completions (); - return EXECUTION_SUCCESS!(); - } +pub extern "C" fn r_complete_builtin(listt: *mut WordList) -> i32 { + let mut opt_given: i32 = 0; + let mut rval: i32; + let mut acts: c_ulong = 0; + let mut copts: c_ulong = 0; + let mut cs: *mut COMPSPEC; + let mut oflags: _optflags = _optflags { + pflag: 0, + rflag: 0, + Dflag: 0, + Eflag: 0, + Iflag: 0, + }; + let mut l: *mut WordList; + let mut wl: *mut WordList; + + unsafe { + let mut list: *mut WordList = listt.clone(); + if list == std::ptr::null_mut() { + r_print_all_completions(); + return EXECUTION_SUCCESS!(); + } - oflags.pflag=0; - oflags.rflag=0; - oflags.Dflag=0; - oflags.Eflag=0; - oflags.Iflag=0; - - Garg=std::ptr::null_mut(); - Warg=std::ptr::null_mut(); - Parg=std::ptr::null_mut(); - Sarg=std::ptr::null_mut(); - Xarg=std::ptr::null_mut(); - Farg=std::ptr::null_mut(); - Carg=std::ptr::null_mut(); - - cs=std::ptr::null_mut(); - - /* Build the actions from the arguments. Also sets the [A-Z]arg variables - as a side effect if they are supplied as options. */ - rval = r_build_actions (list, &mut oflags, &mut acts, &mut copts); - if rval == EX_USAGE { - return rval; - } + oflags.pflag = 0; + oflags.rflag = 0; + oflags.Dflag = 0; + oflags.Eflag = 0; + oflags.Iflag = 0; + + Garg = std::ptr::null_mut(); + Warg = std::ptr::null_mut(); + Parg = std::ptr::null_mut(); + Sarg = std::ptr::null_mut(); + Xarg = std::ptr::null_mut(); + Farg = std::ptr::null_mut(); + Carg = std::ptr::null_mut(); + + cs = std::ptr::null_mut(); + + /* Build the actions from the arguments. Also sets the [A-Z]arg variables + as a side effect if they are supplied as options. */ + rval = r_build_actions(list, &mut oflags, &mut acts, &mut copts); + if rval == EX_USAGE { + return rval; + } - opt_given = (rval != EXECUTION_FAILURE!()) as i32; + opt_given = (rval != EXECUTION_FAILURE!()) as i32; - list = loptend.clone(); + list = loptend.clone(); - if oflags.Dflag !=0 { - wl = make_word_list (make_bare_word (DEFAULTCMD()), std::ptr::null_mut()); - } else if oflags.Eflag !=0 { - wl = make_word_list (make_bare_word (EMPTYCMD()), std::ptr::null_mut()); - } else if oflags.Iflag !=0 { - wl = make_word_list (make_bare_word (INITIALWORD()), std::ptr::null_mut()); - } else { - wl = std::ptr::null_mut(); - } + if oflags.Dflag != 0 { + wl = make_word_list(make_bare_word(DEFAULTCMD()), std::ptr::null_mut()); + } else if oflags.Eflag != 0 { + wl = make_word_list(make_bare_word(EMPTYCMD()), std::ptr::null_mut()); + } else if oflags.Iflag != 0 { + wl = make_word_list(make_bare_word(INITIALWORD()), std::ptr::null_mut()); + } else { + wl = std::ptr::null_mut(); + } - /* -p overrides everything else */ - if oflags.pflag !=0 || (list == std::ptr::null_mut() && opt_given == 0) { - if wl != std::ptr::null_mut() { - rval = r_print_cmd_completions (wl); - dispose_words (wl); - return rval; - } else if list == std::ptr::null_mut() { - //给了P,但没给参数,直接打印全部并退出 - r_print_all_completions (); - return EXECUTION_SUCCESS!(); + /* -p overrides everything else */ + if oflags.pflag != 0 || (list == std::ptr::null_mut() && opt_given == 0) { + if wl != std::ptr::null_mut() { + rval = r_print_cmd_completions(wl); + dispose_words(wl); + return rval; + } else if list == std::ptr::null_mut() { + //给了P,但没给参数,直接打印全部并退出 + r_print_all_completions(); + return EXECUTION_SUCCESS!(); + } + return r_print_cmd_completions(list); } - return r_print_cmd_completions (list); - } - /* next, -r overrides everything else. */ - if oflags.rflag !=0 { - if wl != std::ptr::null_mut() { - rval = r_remove_cmd_completions (wl); - dispose_words (wl); - return rval; - } else if list == std::ptr::null_mut() { - progcomp_flush (); - return EXECUTION_SUCCESS!(); + /* next, -r overrides everything else. */ + if oflags.rflag != 0 { + if wl != std::ptr::null_mut() { + rval = r_remove_cmd_completions(wl); + dispose_words(wl); + return rval; + } else if list == std::ptr::null_mut() { + progcomp_flush(); + return EXECUTION_SUCCESS!(); + } + return r_remove_cmd_completions(list); } - return r_remove_cmd_completions (list); - } - if wl == std::ptr::null_mut() && list == std::ptr::null_mut() && opt_given !=0 { - builtin_usage (); - return EX_USAGE; - } + if wl == std::ptr::null_mut() && list == std::ptr::null_mut() && opt_given != 0 { + builtin_usage(); + return EX_USAGE; + } - /* If we get here, we need to build a compspec and add it for each - remaining argument. */ - cs = compspec_create (); - (*cs).actions = acts; - (*cs).options = copts; + /* If we get here, we need to build a compspec and add it for each + remaining argument. */ + cs = compspec_create(); + (*cs).actions = acts; + (*cs).options = copts; - (*cs).globpat = STRDUP (Garg); - (*cs).words = STRDUP (Warg); - (*cs).prefix = STRDUP (Parg); - (*cs).suffix = STRDUP (Sarg); - (*cs).funcname = STRDUP (Farg); - (*cs).command = STRDUP (Carg); - (*cs).filterpat = STRDUP (Xarg); + (*cs).globpat = STRDUP(Garg); + (*cs).words = STRDUP(Warg); + (*cs).prefix = STRDUP(Parg); + (*cs).suffix = STRDUP(Sarg); + (*cs).funcname = STRDUP(Farg); + (*cs).command = STRDUP(Carg); + (*cs).filterpat = STRDUP(Xarg); - rval = EXECUTION_SUCCESS!(); + rval = EXECUTION_SUCCESS!(); - if wl != std::ptr::null_mut() { - l= wl.clone(); - } else { - l= list.clone(); - } + if wl != std::ptr::null_mut() { + l = wl.clone(); + } else { + l = list.clone(); + } - while l != std::ptr::null_mut() { - /* Add CS as the compspec for the specified commands. */ - if progcomp_insert ((*(*l).word).word, cs) == 0 { - rval = EXECUTION_FAILURE!(); - } - l = (*l).next; - } + while l != std::ptr::null_mut() { + /* Add CS as the compspec for the specified commands. */ + if progcomp_insert((*(*l).word).word, cs) == 0 { + rval = EXECUTION_FAILURE!(); + } + l = l.next; + } - dispose_words (wl); - return rval; - } + dispose_words(wl); + return rval; + } } #[no_mangle] -pub extern "C" fn r_remove_cmd_completions (list: * mut WordList)->i32 -{ - let mut l:* mut WordList; - let mut ret:i32; - unsafe { - ret = EXECUTION_SUCCESS!(); - l = list.clone(); - while l!=std::ptr::null_mut() { - if progcomp_remove ((*(*l).word).word) == 0 { - builtin_error (CString::new("%s: no completion specification").unwrap().as_ptr(), (*(*l).word).word); - ret = EXECUTION_FAILURE!(); - } - l = (*l).next; +pub extern "C" fn r_remove_cmd_completions(list: *mut WordList) -> i32 { + let mut l: *mut WordList; + let mut ret: i32; + unsafe { + ret = EXECUTION_SUCCESS!(); + l = list.clone(); + while l != std::ptr::null_mut() { + if progcomp_remove((*(*l).word).word) == 0 { + builtin_error( + CString::new("%s: no completion specification") + .unwrap() + .as_ptr(), + (*(*l).word).word, + ); + ret = EXECUTION_FAILURE!(); + } + l = (*l).next; + } + return ret; } - return ret; - } } #[no_mangle] -pub extern "C" fn r_print_compoptions (copts:c_ulong, full:i32) -{ - unsafe { - let compopts:CompoptArray=CompoptArray::new(); - for i in 0..compopts.compoptArr.len() { - if (copts & compopts.compoptArr[i].optflag) !=0 { - libc::printf (CString::new("-o %s ").unwrap().as_ptr(), compopts.compoptArr[i].optname); - } else if full !=0 { - libc::printf (CString::new("+o %s ").unwrap().as_ptr(), compopts.compoptArr[i].optname); - } +pub extern "C" fn r_print_compoptions(copts: c_ulong, full: i32) { + unsafe { + let compopts: CompoptArray = CompoptArray::new(); + for i in 0..compopts.compoptArr.len() { + if (copts & compopts.compoptArr[i].optflag) != 0 { + libc::printf( + CString::new("-o %s ").unwrap().as_ptr(), + compopts.compoptArr[i].optname, + ); + } else if full != 0 { + libc::printf( + CString::new("+o %s ").unwrap().as_ptr(), + compopts.compoptArr[i].optname, + ); + } + } } - } } #[no_mangle] -pub extern "C" fn r_print_compactions (acts:c_ulong) -{ - unsafe { - let compacts:CompactsArray=CompactsArray::new(); - for i in 0..compacts.compactsArr.len() { - if compacts.compactsArr[i].actopt !=0 && (acts & compacts.compactsArr[i].actflag) !=0 { - libc::printf (CString::new("-%c ").unwrap().as_ptr(), compacts.compactsArr[i].actopt); - } - } +pub extern "C" fn r_print_compactions(acts: c_ulong) { + unsafe { + let compacts: CompactsArray = CompactsArray::new(); + for i in 0..compacts.compactsArr.len() { + if compacts.compactsArr[i].actopt != 0 && (acts & compacts.compactsArr[i].actflag) != 0 + { + libc::printf( + CString::new("-%c ").unwrap().as_ptr(), + compacts.compactsArr[i].actopt, + ); + } + } - for i in 0..compacts.compactsArr.len() { - if compacts.compactsArr[i].actopt ==0 && (acts & compacts.compactsArr[i].actflag) !=0 { - libc::printf (CString::new("-A %s ").unwrap().as_ptr(), compacts.compactsArr[i].actname); - } + for i in 0..compacts.compactsArr.len() { + if compacts.compactsArr[i].actopt == 0 && (acts & compacts.compactsArr[i].actflag) != 0 + { + libc::printf( + CString::new("-A %s ").unwrap().as_ptr(), + compacts.compactsArr[i].actname, + ); + } + } } - } } #[no_mangle] -pub extern "C" fn r_print_arg (arg:* const c_char, flag:* const c_char, quote:i32) -{ - let x:* mut c_char; - unsafe { - if arg != std::ptr::null_mut() { - if quote !=0 { - // 复制arg 增加单引号返给x - x = sh_single_quote (arg as * mut c_char); - } else { - x= arg as * mut c_char; - } - libc::printf (CString::new("%s %s ").unwrap().as_ptr(), flag, x); - if x != arg as * mut c_char { - libc::free (x as * mut c_void); +pub extern "C" fn r_print_arg(arg: *const c_char, flag: *const c_char, quote: i32) { + let x: *mut c_char; + unsafe { + if arg != std::ptr::null_mut() { + if quote != 0 { + // 复制arg 增加单引号返给x + x = sh_single_quote(arg as *mut c_char); + } else { + x = arg as *mut c_char; + } + libc::printf(CString::new("%s %s ").unwrap().as_ptr(), flag, x); + if x != arg as *mut c_char { + libc::free(x as *mut c_void); + } } } - } } #[no_mangle] -pub extern "C" fn r_print_cmd_name (cmd:* const c_char) -{ - unsafe { - if STREQ (cmd, DEFAULTCMD()) { - libc::printf (CString::new("-D").unwrap().as_ptr()); - } else if STREQ (cmd, EMPTYCMD()) { - libc::printf (CString::new("-E").unwrap().as_ptr()); - } else if STREQ (cmd, INITIALWORD()) { - libc::printf (CString::new("-I").unwrap().as_ptr()); - } else if *cmd == 0 { /* XXX - can this happen? */ - libc::printf (CString::new("''").unwrap().as_ptr()); - } else { - libc::printf (CString::new("%s").unwrap().as_ptr(),cmd); +pub extern "C" fn r_print_cmd_name(cmd: *const c_char) { + unsafe { + if STREQ(cmd, DEFAULTCMD()) { + libc::printf(CString::new("-D").unwrap().as_ptr()); + } else if STREQ(cmd, EMPTYCMD()) { + libc::printf(CString::new("-E").unwrap().as_ptr()); + } else if STREQ(cmd, INITIALWORD()) { + libc::printf(CString::new("-I").unwrap().as_ptr()); + } else if *cmd == 0 { + /* XXX - can this happen? */ + libc::printf(CString::new("''").unwrap().as_ptr()); + } else { + libc::printf(CString::new("%s").unwrap().as_ptr(), cmd); + } } - } } #[no_mangle] -pub extern "C" fn r_print_one_completion (cmd: * mut c_char, cs:* mut COMPSPEC)->i32 -{ - unsafe { - libc::printf (CString::new("complete ").unwrap().as_ptr()); +pub extern "C" fn r_print_one_completion(cmd: *mut c_char, cs: *mut COMPSPEC) -> i32 { + unsafe { + libc::printf(CString::new("complete ").unwrap().as_ptr()); - r_print_compoptions ((*cs).options, 0); - r_print_compactions ((*cs).actions); + r_print_compoptions((*cs).options, 0); + r_print_compactions((*cs).actions); - /* now the rest of the arguments */ + /* now the rest of the arguments */ - /* arguments that require quoting */ - r_print_arg ((*cs).globpat, CString::new("-G").unwrap().as_ptr(), 1); - r_print_arg ((*cs).words, CString::new("-W").unwrap().as_ptr(), 1); - r_print_arg ((*cs).prefix, CString::new("-P").unwrap().as_ptr(), 1); - r_print_arg ((*cs).suffix, CString::new("-S").unwrap().as_ptr(), 1); - r_print_arg ((*cs).filterpat, CString::new("-X").unwrap().as_ptr(), 1); + /* arguments that require quoting */ + r_print_arg((*cs).globpat, CString::new("-G").unwrap().as_ptr(), 1); + r_print_arg((*cs).words, CString::new("-W").unwrap().as_ptr(), 1); + r_print_arg((*cs).prefix, CString::new("-P").unwrap().as_ptr(), 1); + r_print_arg((*cs).suffix, CString::new("-S").unwrap().as_ptr(), 1); + r_print_arg((*cs).filterpat, CString::new("-X").unwrap().as_ptr(), 1); - r_print_arg ((*cs).command, CString::new("-C").unwrap().as_ptr(), 1); + r_print_arg((*cs).command, CString::new("-C").unwrap().as_ptr(), 1); - /* simple arguments that don't require quoting */ - r_print_arg ((*cs).funcname, CString::new("-F").unwrap().as_ptr(), 0); + /* simple arguments that don't require quoting */ + r_print_arg((*cs).funcname, CString::new("-F").unwrap().as_ptr(), 0); - r_print_cmd_name (cmd); - libc::printf (CString::new("\n").unwrap().as_ptr()); + r_print_cmd_name(cmd); + libc::printf(CString::new("\n").unwrap().as_ptr()); - return 0; - } + return 0; + } } #[no_mangle] -pub extern "C" fn r_print_compopts (cmd:* mut c_char, cs:* mut COMPSPEC, full:i32) -{ - unsafe { - libc::printf (CString::new("compopt ").unwrap().as_ptr()); +pub extern "C" fn r_print_compopts(cmd: *mut c_char, cs: *mut COMPSPEC, full: i32) { + unsafe { + libc::printf(CString::new("compopt ").unwrap().as_ptr()); - r_print_compoptions ((*cs).options, full); - r_print_cmd_name (cmd); + r_print_compoptions((*cs).options, full); + r_print_cmd_name(cmd); - libc::printf (CString::new("\n").unwrap().as_ptr()); - } + libc::printf(CString::new("\n").unwrap().as_ptr()); + } } #[no_mangle] -pub extern "C" fn r_print_compitem (item:* mut BUCKET_CONTENTS)->i32 -{ - let cs:* mut COMPSPEC; - let cmd:* mut c_char; - unsafe { - cmd = (*item).key; - cs = (*item).data as * mut COMPSPEC; - } +pub extern "C" fn r_print_compitem(item: *mut BUCKET_CONTENTS) -> i32 { + let cs: *mut COMPSPEC; + let cmd: *mut c_char; + unsafe { + cmd = (*item).key; + cs = (*item).data as *mut COMPSPEC; + } - return r_print_one_completion (cmd, cs); + return r_print_one_completion(cmd, cs); } #[no_mangle] -pub extern "C" fn r_print_all_completions () -{ - unsafe { - progcomp_walk (r_print_compitem); - } +pub extern "C" fn r_print_all_completions() { + unsafe { + progcomp_walk(r_print_compitem); + } } #[no_mangle] -pub extern "C" fn r_print_cmd_completions (list:* mut WordList)->i32 -{ - let mut l:* mut WordList; - let mut cs:* mut COMPSPEC; - let mut ret:i32; - - unsafe { - ret = EXECUTION_SUCCESS!(); - l = list.clone(); - while l != std::ptr::null_mut() { - cs = progcomp_search ((*(*l).word).word); - if cs != std::ptr::null_mut() { - r_print_one_completion ((*(*l).word).word, cs); - } else { - builtin_error (CString::new("%s: no completion specification").unwrap().as_ptr(),(*(*l).word).word); - ret = EXECUTION_FAILURE!(); +pub extern "C" fn r_print_cmd_completions(list: *mut WordList) -> i32 { + let mut l: *mut WordList; + let mut cs: *mut COMPSPEC; + let mut ret: i32; + + unsafe { + ret = EXECUTION_SUCCESS!(); + l = list.clone(); + while l != std::ptr::null_mut() { + cs = progcomp_search((*(*l).word).word); + if cs != std::ptr::null_mut() { + r_print_one_completion((*(*l).word).word, cs); + } else { + builtin_error( + CString::new("%s: no completion specification") + .unwrap() + .as_ptr(), + (*(*l).word).word, + ); + ret = EXECUTION_FAILURE!(); + } + l = (*l).next; } - l = (*l).next; - } - return sh_chkwrite (ret); - } + return sh_chkwrite(ret); + } } #[no_mangle] -pub extern "C" fn r_compgen_builtin (listt:* mut WordList)->i32 -{ - let mut rval:i32; - let mut acts:c_ulong=0; - let mut copts:c_ulong=0; - let mut cs: * mut COMPSPEC; - let mut sl:* mut STRINGLIST; - let word:* mut c_char; - let mut matches:* mut * mut c_char; - let old_line:* mut c_char; - let old_ind:i32; - unsafe { - let mut list:* mut WordList=listt.clone(); - if list == std::ptr::null_mut() { - return EXECUTION_SUCCESS!(); - } +pub extern "C" fn r_compgen_builtin(listt: *mut WordList) -> i32 { + let mut rval: i32; + let mut acts: c_ulong = 0; + let mut copts: c_ulong = 0; + let mut cs: *mut COMPSPEC; + let mut sl: *mut STRINGLIST; + let word: *mut c_char; + let mut matches: *mut *mut c_char; + let old_line: *mut c_char; + let old_ind: i32; + unsafe { + let mut list: *mut WordList = listt.clone(); + if list == std::ptr::null_mut() { + return EXECUTION_SUCCESS!(); + } - Garg=std::ptr::null_mut(); - Warg=std::ptr::null_mut(); - Parg=std::ptr::null_mut(); - Sarg=std::ptr::null_mut(); - Xarg=std::ptr::null_mut(); - Farg=std::ptr::null_mut(); - Carg=std::ptr::null_mut(); + Garg = std::ptr::null_mut(); + Warg = std::ptr::null_mut(); + Parg = std::ptr::null_mut(); + Sarg = std::ptr::null_mut(); + Xarg = std::ptr::null_mut(); + Farg = std::ptr::null_mut(); + Carg = std::ptr::null_mut(); - cs = std::ptr::null_mut(); + cs = std::ptr::null_mut(); - /* Build the actions from the arguments. Also sets the [A-Z]arg variables - as a side effect if they are supplied as options. */ - rval = r_build_actions (list, std::ptr::null_mut(), &mut acts, &mut copts); - if rval == EX_USAGE { - return rval; - } + /* Build the actions from the arguments. Also sets the [A-Z]arg variables + as a side effect if they are supplied as options. */ + rval = r_build_actions(list, std::ptr::null_mut(), &mut acts, &mut copts); + if rval == EX_USAGE { + return rval; + } - if rval == EXECUTION_FAILURE!() { - return EXECUTION_SUCCESS!(); - } + if rval == EXECUTION_FAILURE!() { + return EXECUTION_SUCCESS!(); + } - list = loptend.clone(); + list = loptend.clone(); - let wordtmp=CString::new("").unwrap(); - if list !=std::ptr::null_mut() && (*list).word != std::ptr::null_mut() { - word = (*((*list).word)).word; - } else { - word = wordtmp.as_ptr() as * mut c_char; - } + let wordtmp = CString::new("").unwrap(); + if list != std::ptr::null_mut() && (*list).word != std::ptr::null_mut() { + word = (*((*list).word)).word; + } else { + word = wordtmp.as_ptr() as *mut c_char; + } - if Farg != std::ptr::null_mut() { - builtin_error (CString::new("warning: -F option may not work as you expect").unwrap().as_ptr()); - } + if Farg != std::ptr::null_mut() { + builtin_error( + CString::new("warning: -F option may not work as you expect") + .unwrap() + .as_ptr(), + ); + } - if Carg != std::ptr::null_mut() { - builtin_error (CString::new("warning: -C option may not work as you expect").unwrap().as_ptr()); - } + if Carg != std::ptr::null_mut() { + builtin_error( + CString::new("warning: -C option may not work as you expect") + .unwrap() + .as_ptr(), + ); + } - /* If we get here, we need to build a compspec and evaluate it. */ - cs = compspec_create (); - (*cs).actions = acts; - (*cs).options = copts; - (*cs).refcount = 1; - - (*cs).globpat = STRDUP (Garg); - (*cs).words = STRDUP (Warg); - (*cs).prefix = STRDUP (Parg); - (*cs).suffix = STRDUP (Sarg); - (*cs).funcname = STRDUP (Farg); - (*cs).command = STRDUP (Carg); - (*cs).filterpat = STRDUP (Xarg); - - rval = EXECUTION_FAILURE!(); - - /* probably don't have to save these, just being safe */ - old_line = pcomp_line; - old_ind = pcomp_ind; - pcomp_line = std::ptr::null_mut(); - pcomp_ind = 0; - let compgenStr=CString::new("compgen").unwrap(); - sl = gen_compspec_completions (cs, compgenStr.as_ptr(), word, 0, 0, std::ptr::null_mut()); - pcomp_line = old_line; - pcomp_ind = old_ind; - - /* If the compspec wants the bash default completions, temporarily - turn off programmable completion and call the bash completion code. */ - if (sl == std::ptr::null_mut() || (*sl).list_len == 0) && (copts & COPT_BASHDEFAULT!()) !=0 { - matches = bash_default_completion (word, 0, 0, 0, 0); - sl = completions_to_stringlist (matches); - strvec_dispose (matches); - } + /* If we get here, we need to build a compspec and evaluate it. */ + cs = compspec_create(); + (*cs).actions = acts; + (*cs).options = copts; + (*cs).refcount = 1; + + (*cs).globpat = STRDUP(Garg); + (*cs).words = STRDUP(Warg); + (*cs).prefix = STRDUP(Parg); + (*cs).suffix = STRDUP(Sarg); + (*cs).funcname = STRDUP(Farg); + (*cs).command = STRDUP(Carg); + (*cs).filterpat = STRDUP(Xarg); + + rval = EXECUTION_FAILURE!(); + + /* probably don't have to save these, just being safe */ + old_line = pcomp_line; + old_ind = pcomp_ind; + pcomp_line = std::ptr::null_mut(); + pcomp_ind = 0; + let compgenStr = CString::new("compgen").unwrap(); + sl = gen_compspec_completions(cs, compgenStr.as_ptr(), word, 0, 0, std::ptr::null_mut()); + pcomp_line = old_line; + pcomp_ind = old_ind; + + /* If the compspec wants the bash default completions, temporarily + turn off programmable completion and call the bash completion code. */ + if (sl == std::ptr::null_mut() || (*sl).list_len == 0) && (copts & COPT_BASHDEFAULT!()) != 0 + { + matches = bash_default_completion(word, 0, 0, 0, 0); + sl = completions_to_stringlist(matches); + strvec_dispose(matches); + } - /* This isn't perfect, but it's the best we can do, given what readline - exports from its set of completion utility functions. */ - if (sl == std::ptr::null_mut() || (*sl).list_len == 0) && (copts & COPT_DEFAULT!()) !=0 { - matches = rl_completion_matches (word, rl_filename_completion_function); - strlist_dispose (sl); - sl = completions_to_stringlist (matches); - strvec_dispose (matches); - } - - if sl != std::ptr::null_mut() { - if (*sl).list != std::ptr::null_mut() && (*sl).list_len !=0 { - rval = EXECUTION_SUCCESS!(); - strlist_print (sl, std::ptr::null_mut()); + /* This isn't perfect, but it's the best we can do, given what readline + exports from its set of completion utility functions. */ + if (sl == std::ptr::null_mut() || (*sl).list_len == 0) && (copts & COPT_DEFAULT!()) != 0 { + matches = rl_completion_matches(word, rl_filename_completion_function); + strlist_dispose(sl); + sl = completions_to_stringlist(matches); + strvec_dispose(matches); + } + + if sl != std::ptr::null_mut() { + if (*sl).list != std::ptr::null_mut() && (*sl).list_len != 0 { + rval = EXECUTION_SUCCESS!(); + strlist_print(sl, std::ptr::null_mut()); + } + strlist_dispose(sl); } - strlist_dispose (sl); - } - compspec_dispose (cs); - return rval; - } + compspec_dispose(cs); + return rval; + } } #[no_mangle] -pub extern "C" fn r_compopt_builtin (listt:* mut WordList)->i32 -{ - let mut opts_on:i32=0; - let mut opts_off:i32=0; - let mut opts:* mut i32; - let mut opt:i32; - let mut oind:i32; - let mut ret:i32; - let mut Dflag:i32=0; - let mut Eflag:i32=0; - let mut Iflag:i32=0; - let mut l:* mut WordList; - let mut wl:* mut WordList; - let mut cs:* mut COMPSPEC; - - ret = EXECUTION_SUCCESS!(); - unsafe { - let mut list:* mut WordList=listt.clone(); - reset_internal_getopt (); - - opt = internal_getopt (list, CString::new("+o:DEI").unwrap().as_ptr() as * mut c_char); - - while opt != -1 { - if list_opttype == '-' as i32 { - opts = &mut opts_on; - } else { - opts = &mut opts_off; - } +pub extern "C" fn r_compopt_builtin(listt: *mut WordList) -> i32 { + let mut opts_on: i32 = 0; + let mut opts_off: i32 = 0; + let mut opts: *mut i32; + let mut opt: i32; + let mut oind: i32; + let mut ret: i32; + let mut Dflag: i32 = 0; + let mut Eflag: i32 = 0; + let mut Iflag: i32 = 0; + let mut l: *mut WordList; + let mut wl: *mut WordList; + let mut cs: *mut COMPSPEC; - let optu8:u8= opt as u8; - let optChar:char=char::from(optu8); + ret = EXECUTION_SUCCESS!(); + unsafe { + let mut list: *mut WordList = listt.clone(); + reset_internal_getopt(); + + opt = internal_getopt( + list, + CString::new("+o:DEI").unwrap().as_ptr() as *mut c_char, + ); + + while opt != -1 { + if list_opttype == '-' as i32 { + opts = &mut opts_on; + } else { + opts = &mut opts_off; + } - match optChar { - 'o'=>{ - oind = r_find_compopt (list_optarg); - if oind < 0 { - sh_invalidoptname (list_optarg); + let optu8: u8 = opt as u8; + let optChar: char = char::from(optu8); + + match optChar { + 'o' => { + oind = r_find_compopt(list_optarg); + if oind < 0 { + sh_invalidoptname(list_optarg); + return EX_USAGE; + } + let compopts: CompoptArray = CompoptArray::new(); + *opts |= compopts.compoptArr[oind as usize].optflag as i32; + } + 'D' => { + Dflag = 1; + } + 'E' => { + Eflag = 1; + } + 'I' => { + Iflag = 1; + } + _ => { + builtin_usage(); return EX_USAGE; } - let compopts:CompoptArray=CompoptArray::new(); - *opts |= compopts.compoptArr[oind as usize].optflag as i32; - } - 'D'=>{ - Dflag = 1; } - 'E'=>{ - Eflag = 1; - } - 'I'=>{ - Iflag = 1; + opt = internal_getopt( + list, + CString::new("+o:DEI").unwrap().as_ptr() as *mut c_char, + ); + } + + list = loptend.clone(); + + if Dflag != 0 { + wl = make_word_list(make_bare_word(DEFAULTCMD()), std::ptr::null_mut()); + } else if Eflag != 0 { + wl = make_word_list(make_bare_word(EMPTYCMD()), std::ptr::null_mut()); + } else if Iflag != 0 { + wl = make_word_list(make_bare_word(INITIALWORD()), std::ptr::null_mut()); + } else { + wl = std::ptr::null_mut(); + } + + if list == std::ptr::null_mut() && wl == std::ptr::null_mut() { + if RL_ISSTATE(RL_STATE_COMPLETING!()) == 0 || pcomp_curcs == std::ptr::null_mut() { + builtin_error( + CString::new("not currently executing completion function") + .unwrap() + .as_ptr(), + ); + return EXECUTION_FAILURE!(); } - _=>{ - builtin_usage (); - return EX_USAGE; + cs = pcomp_curcs.clone(); + + if opts_on == 0 && opts_off == 0 { + r_print_compopts(pcomp_curcmd, cs, 1); + return sh_chkwrite(ret); } - } - opt = internal_getopt (list, CString::new("+o:DEI").unwrap().as_ptr() as * mut c_char); - } - list = loptend.clone(); + /* Set the compspec options */ + pcomp_set_compspec_options(cs, opts_on, 1); + pcomp_set_compspec_options(cs, opts_off, 0); - if Dflag != 0 { - wl = make_word_list (make_bare_word (DEFAULTCMD()), std::ptr::null_mut()); - } else if Eflag !=0 { - wl = make_word_list (make_bare_word (EMPTYCMD()), std::ptr::null_mut()); - } else if Iflag !=0 { - wl = make_word_list (make_bare_word (INITIALWORD()), std::ptr::null_mut()); - } else { - wl = std::ptr::null_mut(); - } + /* And change the readline variables the options control */ + pcomp_set_readline_variables(opts_on, 1); + pcomp_set_readline_variables(opts_off, 0); - if list == std::ptr::null_mut() && wl == std::ptr::null_mut() { - if RL_ISSTATE (RL_STATE_COMPLETING!()) == 0 || pcomp_curcs == std::ptr::null_mut() { - builtin_error (CString::new("not currently executing completion function").unwrap().as_ptr()); - return EXECUTION_FAILURE!(); + return ret; } - cs = pcomp_curcs.clone(); - if opts_on == 0 && opts_off == 0 { - r_print_compopts (pcomp_curcmd, cs, 1); - return sh_chkwrite (ret); + if wl != std::ptr::null_mut() { + l = wl.clone(); + } else { + l = list.clone(); } - /* Set the compspec options */ - pcomp_set_compspec_options (cs, opts_on, 1); - pcomp_set_compspec_options (cs, opts_off, 0); + while l != std::ptr::null_mut() { + cs = progcomp_search((*((*list).word)).word); + if cs == std::ptr::null_mut() { + builtin_error( + CString::new("%s: no completion specification") + .unwrap() + .as_ptr(), + (*((*list).word)).word, + ); + ret = EXECUTION_FAILURE!(); + l = (*l).next; + continue; + } + if opts_on == 0 && opts_off == 0 { + r_print_compopts((*((*list).word)).word, cs, 1); + l = (*l).next; + continue; /* XXX -- fill in later */ + } - /* And change the readline variables the options control */ - pcomp_set_readline_variables (opts_on, 1); - pcomp_set_readline_variables (opts_off, 0); + /* Set the compspec options */ + pcomp_set_compspec_options(cs, opts_on, 1); + pcomp_set_compspec_options(cs, opts_off, 0); + l = (*l).next; + } - return ret; - } - - if wl != std::ptr::null_mut() { - l = wl.clone(); - } else { - l=list.clone(); - } - - while l != std::ptr::null_mut() { - cs = progcomp_search ((*((*list).word)).word); - if cs == std::ptr::null_mut() { - builtin_error (CString::new("%s: no completion specification").unwrap().as_ptr(), (*((*list).word)).word); - ret = EXECUTION_FAILURE!(); - l = (*l).next; - continue; - } - if opts_on == 0 && opts_off == 0 { - r_print_compopts ((*((*list).word)).word, cs, 1); - l = (*l).next; - continue; /* XXX -- fill in later */ - } - - /* Set the compspec options */ - pcomp_set_compspec_options (cs, opts_on, 1); - pcomp_set_compspec_options (cs, opts_off, 0); - l = (*l).next; + if wl != std::ptr::null_mut() { + dispose_words(wl); } - if wl != std::ptr::null_mut() { - dispose_words (wl); + return ret; } - - return ret; - } } - diff --git a/bash-5.1/builtins_rust/declare/src/lib.rs b/bash-5.1/builtins_rust/declare/src/lib.rs index cf16162bc5be4cfd8930f0810c5795a8823cc99d..5dc2fbc6acc4bd11797c562831edbc7c3821cd0e 100644 --- a/bash-5.1/builtins_rust/declare/src/lib.rs +++ b/bash-5.1/builtins_rust/declare/src/lib.rs @@ -1,1517 +1,1769 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -extern crate libc; +extern crate libc; extern crate nix; use libc::{c_char, c_long, c_void}; -use std::{ffi::CString}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, r_savestring}; +use rcommon::{r_savestring, WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; -use rsetattr::{show_name_attributes,set_or_show_attributes,show_all_var_attributes}; +use rsetattr::{set_or_show_attributes, show_all_var_attributes, show_name_attributes}; use std::ffi::CStr; +use std::ffi::CString; #[repr(u8)] -enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, - cm_connection, cm_function_def, cm_until, cm_group, - cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc +enum command_type { + cm_for, + cm_case, + cm_while, + cm_if, + cm_simple, + cm_select, + cm_connection, + cm_function_def, + cm_until, + cm_group, + cm_arith, + cm_cond, + cm_arith_for, + cm_subshell, + cm_coproc, } #[repr(u8)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] enum r_instruction { - r_output_direction, r_input_direction, r_inputa_direction, - r_appending_to, r_reading_until, r_reading_string, - r_duplicating_input, r_duplicating_output, r_deblank_reading_until, - r_close_this, r_err_and_out, r_input_output, r_output_force, - r_duplicating_input_word, r_duplicating_output_word, - r_move_input, r_move_output, r_move_input_word, r_move_output_word, - r_append_err_and_out + r_output_direction, + r_input_direction, + r_inputa_direction, + r_appending_to, + r_reading_until, + r_reading_string, + r_duplicating_input, + r_duplicating_output, + r_deblank_reading_until, + r_close_this, + r_err_and_out, + r_input_output, + r_output_force, + r_duplicating_input_word, + r_duplicating_output_word, + r_move_input, + r_move_output, + r_move_input_word, + r_move_output_word, + r_append_err_and_out, } #[repr(C)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] pub union REDIRECTEE { - dest:libc::c_int, - filename:* mut WordDesc + dest: libc::c_int, + filename: *mut WordDesc, } #[repr(C)] pub union REDIRECT { - next:*mut REDIRECT, - redirector:REDIRECTEE, - rflags:libc::c_int, - flags:libc::c_int, - instruction:r_instruction, - redirectee:REDIRECTEE, - here_doc_eof:*mut c_char + next: *mut REDIRECT, + redirector: REDIRECTEE, + rflags: libc::c_int, + flags: libc::c_int, + instruction: r_instruction, + redirectee: REDIRECTEE, + here_doc_eof: *mut c_char, } /* FOR command. */ #[repr(C)] pub struct for_com { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct PATTERN_LIST { - next:* mut PATTERN_LIST, - patterns:* mut WordList, - action:*mut COMMAND, - flags:libc::c_int + next: *mut PATTERN_LIST, + patterns: *mut WordList, + action: *mut COMMAND, + flags: libc::c_int, } #[repr(C)] pub struct case_com { - flags:libc::c_int, - line:libc::c_int, - word:*mut WordDesc, - clauses:*mut PATTERN_LIST + flags: libc::c_int, + line: libc::c_int, + word: *mut WordDesc, + clauses: *mut PATTERN_LIST, } #[repr(C)] pub struct while_com { - flags:libc::c_int, - test:*mut COMMAND, - action:*mut COMMAND + flags: libc::c_int, + test: *mut COMMAND, + action: *mut COMMAND, } #[repr(C)] pub struct if_com { - flags:libc::c_int, - test:*mut COMMAND, - true_case:*mut COMMAND, - false_case:*mut COMMAND + flags: libc::c_int, + test: *mut COMMAND, + true_case: *mut COMMAND, + false_case: *mut COMMAND, } #[repr(C)] pub struct connection { - ignore:libc::c_int, - first:*mut COMMAND, - second:*mut COMMAND, - connector:libc::c_int + ignore: libc::c_int, + first: *mut COMMAND, + second: *mut COMMAND, + connector: libc::c_int, } #[repr(C)] pub struct simple_com { - flags:libc::c_int, - line:libc::c_int, - words:*mut WordList, - redirects:*mut REDIRECT + flags: libc::c_int, + line: libc::c_int, + words: *mut WordList, + redirects: *mut REDIRECT, } #[repr(C)] pub struct function_def { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - command:*mut COMMAND, - source_file:*mut c_char + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + command: *mut COMMAND, + source_file: *mut c_char, } #[repr(C)] pub struct group_com { - ignore:libc::c_int, - command:*mut COMMAND, - source_file:*mut c_char + ignore: libc::c_int, + command: *mut COMMAND, + source_file: *mut c_char, } #[repr(C)] pub struct select_com { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct arith_com { - flags:libc::c_int, - line:libc::c_int, - exp:*mut WordList + flags: libc::c_int, + line: libc::c_int, + exp: *mut WordList, } #[repr(C)] pub struct cond_com { - flags:libc::c_int, - line:libc::c_int, - type_c:libc::c_int, - exp:*mut WordList + flags: libc::c_int, + line: libc::c_int, + type_c: libc::c_int, + exp: *mut WordList, } #[repr(C)] pub struct arith_for_com { - flags:libc::c_int, - line:libc::c_int, - init:*mut WordList, - test:*mut WordList, - step:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + init: *mut WordList, + test: *mut WordList, + step: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct subshell_com { - flags:i32, - line:i32, - command:*mut COMMAND + flags: i32, + line: i32, + command: *mut COMMAND, } #[repr(C)] pub struct coproc_com { - flags:i32, - name:*mut c_char, - command:*mut COMMAND + flags: i32, + name: *mut c_char, + command: *mut COMMAND, } #[repr(C)] pub union VALUE_COMMAND { - For:*mut for_com, - Case:*mut case_com, - While:*mut while_com, - If:*mut if_com, - Connection:*mut connection, - Simple:*mut simple_com, - Function_def:*mut function_def, - Group:*mut group_com, - Select:*mut select_com, - Arith:*mut arith_com, - Cond:*mut cond_com, - ArithFor:*mut arith_for_com, - Subshell:*mut subshell_com, - Coproc:*mut coproc_com + For: *mut for_com, + Case: *mut case_com, + While: *mut while_com, + If: *mut if_com, + Connection: *mut connection, + Simple: *mut simple_com, + Function_def: *mut function_def, + Group: *mut group_com, + Select: *mut select_com, + Arith: *mut arith_com, + Cond: *mut cond_com, + ArithFor: *mut arith_for_com, + Subshell: *mut subshell_com, + Coproc: *mut coproc_com, } #[repr(C)] pub struct COMMAND { - type_c:command_type, - flags:i32, - line:i32, - redirects:*mut REDIRECT, - value:VALUE_COMMAND + type_c: command_type, + flags: i32, + line: i32, + redirects: *mut REDIRECT, + value: VALUE_COMMAND, } #[repr(C)] pub struct SHELL_VAR { - name:*mut c_char, /* Symbol that the user types. */ - value:*mut c_char, /* Value that is returned. */ - exportstr:*mut c_char, /* String for the environment. */ - dynamic_value:*mut fn(v:* mut SHELL_VAR)->*mut SHELL_VAR, /* Function called to return a `dynamic' - value for a variable, like $SECONDS - or $RANDOM. */ - assign_func:* mut fn(v:* mut SHELL_VAR,str1:* mut c_char,t:c_long,str2:* mut c_char)->*mut SHELL_VAR, /* Function called when this `special - variable' is assigned a value in - bind_variable. */ - attributes:i32, /* export, readonly, array, invisible... */ - context:i32 /* Which context this variable belongs to. */ + name: *mut c_char, /* Symbol that the user types. */ + value: *mut c_char, /* Value that is returned. */ + exportstr: *mut c_char, /* String for the environment. */ + dynamic_value: *mut fn(v: *mut SHELL_VAR) -> *mut SHELL_VAR, /* Function called to return a `dynamic' + value for a variable, like $SECONDS + or $RANDOM. */ + assign_func: *mut fn( + v: *mut SHELL_VAR, + str1: *mut c_char, + t: c_long, + str2: *mut c_char, + ) -> *mut SHELL_VAR, /* Function called when this `special + variable' is assigned a value in + bind_variable. */ + attributes: i32, /* export, readonly, array, invisible... */ + context: i32, /* Which context this variable belongs to. */ } #[repr(C)] pub struct BUCKET_CONTENTS { - next:* mut BUCKET_CONTENTS, /* Link to next hashed key in this bucket. */ - key:* mut c_char, /* What we look up. */ - data:* mut c_void, /* What we really want. */ - khash:u32, /* What key hashes to */ - times_found:i32 /* Number of times this item has been found. */ + next: *mut BUCKET_CONTENTS, /* Link to next hashed key in this bucket. */ + key: *mut c_char, /* What we look up. */ + data: *mut c_void, /* What we really want. */ + khash: u32, /* What key hashes to */ + times_found: i32, /* Number of times this item has been found. */ } #[repr(C)] pub struct HASH_TABLE { - bucket_array:*mut * mut BUCKET_CONTENTS, /* Where the data is kept. */ - nbuckets:i32, /* How many buckets does this table have. */ - nentries:i32 /* How many entries does this table have. */ + bucket_array: *mut *mut BUCKET_CONTENTS, /* Where the data is kept. */ + nbuckets: i32, /* How many buckets does this table have. */ + nentries: i32, /* How many entries does this table have. */ } #[repr(C)] pub struct VAR_CONTEXT { - name:* mut c_char,/* empty or NULL means global context */ - scope:i32, /* 0 means global context */ - flags:i32, - up:* mut VAR_CONTEXT, /* previous function calls */ - down:* mut VAR_CONTEXT, /* down towards global context */ - table:* mut HASH_TABLE /* variables at this scope */ + name: *mut c_char, /* empty or NULL means global context */ + scope: i32, /* 0 means global context */ + flags: i32, + up: *mut VAR_CONTEXT, /* previous function calls */ + down: *mut VAR_CONTEXT, /* down towards global context */ + table: *mut HASH_TABLE, /* variables at this scope */ } - #[macro_export] macro_rules! ARGS_SETBLTIN { - () => { - 0x04 - } + () => { + 0x04 + }; } #[macro_export] macro_rules! EXITPROG { - () => { - 3 - } + () => { + 3 + }; } #[macro_export] macro_rules! att_local { - () => { - 0x0000020 - } + () => { + 0x0000020 + }; } #[macro_export] macro_rules! att_array { - () => { - 0x0000004 /* value is an array */ - } + () => { + 0x0000004 /* value is an array */ + }; } #[macro_export] macro_rules! att_assoc { - () => { - 0x0000040 /* variable is an associative array */ - } + () => { + 0x0000040 /* variable is an associative array */ + }; } #[macro_export] macro_rules! att_function { - () => { - 0x0000008 /* value is a function */ - } + () => { + 0x0000008 /* value is a function */ + }; } #[macro_export] macro_rules! att_integer { - () => { - 0x0000010 /* internal representation is int */ - } + () => { + 0x0000010 /* internal representation is int */ + }; } #[macro_export] macro_rules! att_nameref { - () => { - 0x0000800 /* word is a name reference */ - } + () => { + 0x0000800 /* word is a name reference */ + }; } #[macro_export] macro_rules! att_readonly { - () => { - 0x0000002 /* cannot change */ - } + () => { + 0x0000002 /* cannot change */ + }; } #[macro_export] macro_rules! att_trace { - () => { - 0x0000080 /* function is traced with DEBUG trap */ - } + () => { + 0x0000080 /* function is traced with DEBUG trap */ + }; } #[macro_export] macro_rules! att_exported { - () => { - 0x0000001 /* export to environment */ - } + () => { + 0x0000001 /* export to environment */ + }; } #[macro_export] macro_rules! att_capcase { - () => { - 0x0000400 /* word capitalized on assignment */ - } + () => { + 0x0000400 /* word capitalized on assignment */ + }; } #[macro_export] macro_rules! att_uppercase { - () => { - 0x0000100 /* word converted to uppercase on assignment */ - } + () => { + 0x0000100 /* word converted to uppercase on assignment */ + }; } #[macro_export] macro_rules! att_lowercase { - () => { - 0x0000200 /* word converted to lowercase on assignment */ - } + () => { + 0x0000200 /* word converted to lowercase on assignment */ + }; } #[macro_export] macro_rules! MKLOC_INHERIT { - () => { - 0x04 - } + () => { + 0x04 + }; } - #[macro_export] macro_rules! ASS_APPEND { - () => { - 0x0001 - } + () => { + 0x0001 + }; } #[macro_export] macro_rules! ASS_MKLOCAL { - () => { - 0x0002 - } + () => { + 0x0002 + }; } #[macro_export] macro_rules! MKLOC_ARRAYOK { - () => { - 0x02 - } + () => { + 0x02 + }; } #[macro_export] macro_rules! MKLOC_ASSOCOK { - () => { - 0x01 - } + () => { + 0x01 + }; } #[macro_export] macro_rules! FUNC_MULTILINE { - () => { - 0x01 - } + () => { + 0x01 + }; } #[macro_export] macro_rules! FUNC_EXTERNAL { - () => { - 0x02 - } + () => { + 0x02 + }; } #[macro_export] macro_rules! ASS_FORCE { - () => { - 0x0020 /* force assignment even to readonly variable */ - } + () => { + 0x0020 /* force assignment even to readonly variable */ + }; } #[macro_export] macro_rules! W_COMPASSIGN { - () => { - 1 << 15 /* Compound assignment */ - } + () => { + 1 << 15 /* Compound assignment */ + }; } #[macro_export] macro_rules! ASS_NOEXPAND { - () => { - 0x0080 /* don't expand associative array subscripts */ - } + () => { + 0x0080 /* don't expand associative array subscripts */ + }; } #[macro_export] macro_rules! EX_BADASSIGN { - () => { - 260 /* variable assignment error */ - } + () => { + 260 /* variable assignment error */ + }; } #[macro_export] macro_rules! att_tempvar { - () => { - 0x0100000 /* variable came from the temp environment */ - } + () => { + 0x0100000 /* variable came from the temp environment */ + }; } #[macro_export] macro_rules! att_propagate { - () => { - 0x0200000 /* propagate to previous scope */ - } + () => { + 0x0200000 /* propagate to previous scope */ + }; } #[macro_export] macro_rules! ASS_NAMEREF { - () => { - 0x0010 /* assigning to nameref variable */ - } + () => { + 0x0010 /* assigning to nameref variable */ + }; } #[macro_export] macro_rules! att_invisible { - () => { - 0x0001000 /* cannot see */ - } + () => { + 0x0001000 /* cannot see */ + }; } #[macro_export] macro_rules! att_noassign { - () => { - 0x0004000 /* assignment not allowed */ - } + () => { + 0x0004000 /* assignment not allowed */ + }; } pub union Functions { - f_xfree:unsafe extern "C" fn(str1:* mut c_void), - f_maybe_pop_dollar_vars: unsafe extern "C" fn(), - f_maybe_set_debug_trap:unsafe extern "C" fn(* mut c_char) + f_xfree: unsafe extern "C" fn(str1: *mut c_void), + f_maybe_pop_dollar_vars: unsafe extern "C" fn(), + f_maybe_set_debug_trap: unsafe extern "C" fn(*mut c_char), } extern "C" { - static variable_context:i32; - fn builtin_error(err:*const c_char,...); - fn builtin_warning(err:*const c_char,...); - fn find_variable (str:*const c_char)->* mut SHELL_VAR; - fn find_global_variable (str:*const c_char)->* mut SHELL_VAR; + static variable_context: i32; + fn builtin_error(err: *const c_char, ...); + fn builtin_warning(err: *const c_char, ...); + fn find_variable(str: *const c_char) -> *mut SHELL_VAR; + fn find_global_variable(str: *const c_char) -> *mut SHELL_VAR; fn reset_internal_getopt(); - fn internal_getopt (list:*mut WordList , opts:*mut c_char)->i32; - static mut list_opttype:i32; - static mut array_needs_making:i32; + fn internal_getopt(list: *mut WordList, opts: *mut c_char) -> i32; + static mut list_opttype: i32; + static mut array_needs_making: i32; fn builtin_usage(); - static mut loptend:*mut WordList; - fn show_local_var_attributes (v:i32, nodefs:i32)->i32; + static mut loptend: *mut WordList; + fn show_local_var_attributes(v: i32, nodefs: i32) -> i32; // fn show_all_var_attributes (v:i32, nodefs:i32)->i32; - fn set_builtin (list:*mut WordList)->i32; - fn sh_chkwrite (ret:i32)->i32; - fn show_func_attributes (name:* mut c_char, nodefs:i32)->i32; - fn show_localname_attributes (name:* mut c_char, nodefs:i32)->i32; - fn sh_notfound (name:* mut c_char); - static assoc_expand_once:i32; - fn assignment (str1:* const c_char, flags:i32)->i32; - fn make_local_variable (name:* const c_char, flags:i32)->* mut SHELL_VAR; - fn get_current_options ()->* mut c_char; - fn valid_array_reference (name:* const c_char, flags:i32)->i32; - fn check_selfref (name:* const c_char, value:* mut c_char, flags:i32)->i32; - fn valid_nameref_value (name:* const c_char, flags:i32)->i32; - fn sh_invalidid (value:* mut c_char); - static mut posixly_correct:i32; - fn nameref_transform_name (name:* mut c_char, flags:i32)->* mut c_char; - fn find_variable_last_nameref (name:* const c_char, flags:i32)->* mut SHELL_VAR; - fn make_local_assoc_variable (value:* mut c_char, flags:i32)->* mut SHELL_VAR; - fn make_local_array_variable (value:* mut c_char, flags:i32)->* mut SHELL_VAR; - fn find_global_variable_last_nameref (value:* const c_char, flags:i32)->* mut SHELL_VAR; - fn find_global_variable_noref (value:* const c_char)->* mut SHELL_VAR; - fn find_variable_noref (value:* const c_char)->* mut SHELL_VAR; - fn sh_readonly (name:* const c_char); - fn sh_invalidopt (value:* mut c_char); - static mut debugging_mode:i32; - fn find_function_def (name:* const c_char)->* mut function_def; - fn named_function_string (name:* mut c_char, cmd:* mut COMMAND, i:i32)->* mut c_char; - fn make_new_assoc_variable (name:* mut c_char)->* mut SHELL_VAR; - fn make_new_array_variable (name:* mut c_char)->* mut SHELL_VAR; - fn bind_global_variable (name:* const c_char,value:* mut c_char,flags:i32)->* mut SHELL_VAR; - fn bind_variable (name:* const c_char,value:* mut c_char,flags:i32)->* mut SHELL_VAR; - static mut shell_compatibility_level:i32; - fn internal_warning (format:* const c_char, ...); - fn assign_array_element (name:* mut c_char, value:* mut c_char, flags:i32)->* mut SHELL_VAR; - fn bind_assoc_variable (var:* mut SHELL_VAR, name:* mut c_char, key:* mut c_char, value:* mut c_char, flags:i32)->* mut SHELL_VAR; - fn bind_array_variable (name:* mut c_char, s:libc::c_long, value:* mut c_char, flags:i32)->* mut SHELL_VAR; - fn bind_variable_value (var:* mut SHELL_VAR, name:* mut c_char, flags:i32)->* mut SHELL_VAR; - fn delete_var (name:* const c_char, varc:* mut VAR_CONTEXT)->i32; - static global_variables:* mut VAR_CONTEXT; - static shell_variables:* mut VAR_CONTEXT; - fn find_tempenv_variable (format:* const c_char)->* mut SHELL_VAR; - fn stupidly_hack_special_variables (name:* mut c_char); - fn assign_array_var_from_string (var:* mut SHELL_VAR, value:* mut c_char, flags:i32)->* mut SHELL_VAR; - fn convert_var_to_array (var:* mut SHELL_VAR)->* mut SHELL_VAR; - fn convert_var_to_assoc (var:* mut SHELL_VAR)->* mut SHELL_VAR; - fn find_function (name:* const c_char)->* mut SHELL_VAR; - fn legal_identifier (name:* const c_char)->i32; + fn set_builtin(list: *mut WordList) -> i32; + fn sh_chkwrite(ret: i32) -> i32; + fn show_func_attributes(name: *mut c_char, nodefs: i32) -> i32; + fn show_localname_attributes(name: *mut c_char, nodefs: i32) -> i32; + fn sh_notfound(name: *mut c_char); + static assoc_expand_once: i32; + fn assignment(str1: *const c_char, flags: i32) -> i32; + fn make_local_variable(name: *const c_char, flags: i32) -> *mut SHELL_VAR; + fn get_current_options() -> *mut c_char; + fn valid_array_reference(name: *const c_char, flags: i32) -> i32; + fn check_selfref(name: *const c_char, value: *mut c_char, flags: i32) -> i32; + fn valid_nameref_value(name: *const c_char, flags: i32) -> i32; + fn sh_invalidid(value: *mut c_char); + static mut posixly_correct: i32; + fn nameref_transform_name(name: *mut c_char, flags: i32) -> *mut c_char; + fn find_variable_last_nameref(name: *const c_char, flags: i32) -> *mut SHELL_VAR; + fn make_local_assoc_variable(value: *mut c_char, flags: i32) -> *mut SHELL_VAR; + fn make_local_array_variable(value: *mut c_char, flags: i32) -> *mut SHELL_VAR; + fn find_global_variable_last_nameref(value: *const c_char, flags: i32) -> *mut SHELL_VAR; + fn find_global_variable_noref(value: *const c_char) -> *mut SHELL_VAR; + fn find_variable_noref(value: *const c_char) -> *mut SHELL_VAR; + fn sh_readonly(name: *const c_char); + fn sh_invalidopt(value: *mut c_char); + static mut debugging_mode: i32; + fn find_function_def(name: *const c_char) -> *mut function_def; + fn named_function_string(name: *mut c_char, cmd: *mut COMMAND, i: i32) -> *mut c_char; + fn make_new_assoc_variable(name: *mut c_char) -> *mut SHELL_VAR; + fn make_new_array_variable(name: *mut c_char) -> *mut SHELL_VAR; + fn bind_global_variable(name: *const c_char, value: *mut c_char, flags: i32) -> *mut SHELL_VAR; + fn bind_variable(name: *const c_char, value: *mut c_char, flags: i32) -> *mut SHELL_VAR; + static mut shell_compatibility_level: i32; + fn internal_warning(format: *const c_char, ...); + fn assign_array_element(name: *mut c_char, value: *mut c_char, flags: i32) -> *mut SHELL_VAR; + fn bind_assoc_variable( + var: *mut SHELL_VAR, + name: *mut c_char, + key: *mut c_char, + value: *mut c_char, + flags: i32, + ) -> *mut SHELL_VAR; + fn bind_array_variable( + name: *mut c_char, + s: libc::c_long, + value: *mut c_char, + flags: i32, + ) -> *mut SHELL_VAR; + fn bind_variable_value(var: *mut SHELL_VAR, name: *mut c_char, flags: i32) -> *mut SHELL_VAR; + fn delete_var(name: *const c_char, varc: *mut VAR_CONTEXT) -> i32; + static global_variables: *mut VAR_CONTEXT; + static shell_variables: *mut VAR_CONTEXT; + fn find_tempenv_variable(format: *const c_char) -> *mut SHELL_VAR; + fn stupidly_hack_special_variables(name: *mut c_char); + fn assign_array_var_from_string( + var: *mut SHELL_VAR, + value: *mut c_char, + flags: i32, + ) -> *mut SHELL_VAR; + fn convert_var_to_array(var: *mut SHELL_VAR) -> *mut SHELL_VAR; + fn convert_var_to_assoc(var: *mut SHELL_VAR) -> *mut SHELL_VAR; + fn find_function(name: *const c_char) -> *mut SHELL_VAR; + fn legal_identifier(name: *const c_char) -> i32; } #[no_mangle] -pub extern "C" fn r_declare_builtin (list:* mut WordList)->i32 -{ - return r_declare_internal (list, 0); +pub extern "C" fn r_declare_builtin(list: *mut WordList) -> i32 { + return r_declare_internal(list, 0); } -unsafe fn STREQ( a:* const c_char, b:* const c_char)->bool { - return *a ==*b && libc::strcmp(a, b) == 0; +unsafe fn STREQ(a: *const c_char, b: *const c_char) -> bool { + return *a == *b && libc::strcmp(a, b) == 0; } #[no_mangle] -pub extern "C" fn r_local_builtin (list:* mut WordList)->i32 -{ - unsafe { - /* Catch a straight `local --help' before checking function context */ - if list !=std::ptr::null_mut() && (*list).word != std::ptr::null_mut() && STREQ ((*(*list).word).word, CString::new("--help").unwrap().as_ptr()) { - r_builtin_help (); - return EX_USAGE; - } - - if variable_context !=0 { - return r_declare_internal (list, 1); - } else { - builtin_error (CString::new("can only be used in a function").unwrap().as_ptr()); - return EXECUTION_FAILURE!(); - } - } +pub extern "C" fn r_local_builtin(list: *mut WordList) -> i32 { + unsafe { + /* Catch a straight `local --help' before checking function context */ + if list != std::ptr::null_mut() + && (*list).word != std::ptr::null_mut() + && STREQ( + (*(*list).word).word, + CString::new("--help").unwrap().as_ptr(), + ) + { + r_builtin_help(); + return EX_USAGE; + } + if variable_context != 0 { + return r_declare_internal(list, 1); + } else { + builtin_error( + CString::new("can only be used in a function") + .unwrap() + .as_ptr() + ); + return EXECUTION_FAILURE!(); + } + } } -unsafe fn local_p( varr:* mut SHELL_VAR)->i32 { - return (*varr).attributes & att_local!(); +unsafe fn local_p(varr: *mut SHELL_VAR) -> i32 { + return (*varr).attributes & att_local!(); } #[no_mangle] -pub extern "C" fn r_declare_find_variable (name:* const c_char, mkglobal:i32, chklocal:i32)->* mut SHELL_VAR -{ - let varr: * mut SHELL_VAR; - unsafe { - if mkglobal == 0 { - return find_variable (name); - } else if chklocal !=0 { - varr = find_variable (name); - if varr != std::ptr::null_mut() && local_p (varr) !=0 && (*varr).context == variable_context { - return varr; - } - - return find_global_variable (name); - } else { - return find_global_variable (name); +pub extern "C" fn r_declare_find_variable( + name: *const c_char, + mkglobal: i32, + chklocal: i32, +) -> *mut SHELL_VAR { + let varr: *mut SHELL_VAR; + unsafe { + if mkglobal == 0 { + return find_variable(name); + } else if chklocal != 0 { + varr = find_variable(name); + if varr != std::ptr::null_mut() + && local_p(varr) != 0 + && (*varr).context == variable_context + { + return varr; + } + + return find_global_variable(name); + } else { + return find_global_variable(name); + } } - } } -unsafe fn DECLARE_OPTS()-> CString -{ - return CString::new("+acfgilnprtuxAFGI").unwrap(); +unsafe fn DECLARE_OPTS() -> CString { + return CString::new("+acfgilnprtuxAFGI").unwrap(); } -unsafe fn value_cell(var:*mut SHELL_VAR)->* mut c_char -{ - return (*var).value; +unsafe fn value_cell(var: *mut SHELL_VAR) -> *mut c_char { + return (*var).value; } -unsafe fn var_setvalue(var:*mut SHELL_VAR,str1:* mut c_char) -{ - (*var).value=str1; +unsafe fn var_setvalue(var: *mut SHELL_VAR, str1: *mut c_char) { + (*var).value = str1; } -unsafe fn VSETATTR(var:*mut SHELL_VAR, attr:i32) { - (*var).attributes |= attr; +unsafe fn VSETATTR(var: *mut SHELL_VAR, attr: i32) { + (*var).attributes |= attr; } -unsafe fn readonly_p(var:*mut SHELL_VAR) ->i32 { - return (*var).attributes & att_readonly!(); +unsafe fn readonly_p(var: *mut SHELL_VAR) -> i32 { + return (*var).attributes & att_readonly!(); } -unsafe fn nameref_p(var:*mut SHELL_VAR) ->i32 { - return (*var).attributes & att_nameref!(); +unsafe fn nameref_p(var: *mut SHELL_VAR) -> i32 { + return (*var).attributes & att_nameref!(); } -unsafe fn nameref_cell(var:*mut SHELL_VAR) ->* mut c_char { - return (*var).value;/* so it can change later */ +unsafe fn nameref_cell(var: *mut SHELL_VAR) -> *mut c_char { + return (*var).value; /* so it can change later */ } -unsafe fn function_cell(var:*mut SHELL_VAR) ->* mut COMMAND { - return (*var).value as * mut COMMAND; +unsafe fn function_cell(var: *mut SHELL_VAR) -> *mut COMMAND { + return (*var).value as *mut COMMAND; } -unsafe fn VUNSETATTR(var:*mut SHELL_VAR,attr:i32) { - (*var).attributes &= !attr; +unsafe fn VUNSETATTR(var: *mut SHELL_VAR, attr: i32) { + (*var).attributes &= !attr; } -unsafe fn array_p(var:*mut SHELL_VAR) ->i32 { - return (*var).attributes & att_array!(); +unsafe fn array_p(var: *mut SHELL_VAR) -> i32 { + return (*var).attributes & att_array!(); } -unsafe fn assoc_p(var:*mut SHELL_VAR) ->i32 { - return (*var).attributes & att_assoc!(); +unsafe fn assoc_p(var: *mut SHELL_VAR) -> i32 { + return (*var).attributes & att_assoc!(); } -unsafe fn var_isset(var:*mut SHELL_VAR) ->bool { - return (*var).value !=std::ptr::null_mut(); +unsafe fn var_isset(var: *mut SHELL_VAR) -> bool { + return (*var).value != std::ptr::null_mut(); } -unsafe fn tempvar_p(var:*mut SHELL_VAR) ->i32 { - return (*var).attributes & att_tempvar!(); +unsafe fn tempvar_p(var: *mut SHELL_VAR) -> i32 { + return (*var).attributes & att_tempvar!(); } -unsafe fn noassign_p(var:*mut SHELL_VAR) ->i32 { - return (*var).attributes & att_noassign!(); +unsafe fn noassign_p(var: *mut SHELL_VAR) -> i32 { + return (*var).attributes & att_noassign!(); } #[no_mangle] -pub extern "C" fn r_declare_internal (mut list:* mut WordList, local_var:i32)->i32 -{ - let mut flags_on:i32=0; - let mut flags_off:i32=0; - let mut flags:* mut i32; - let mut any_failed:i32=0; - let mut assign_error:i32=0; - let mut pflag:i32=0; - let mut nodefs:i32=0; - let mut opt:i32; - let mut onref:i32; - let mut offref:i32; - let mut mkglobal:i32=0; - let mut chklocal:i32=0; - let mut inherit_flag:i32=0; - - let mut t: *mut c_char; - let mut subscript_start: *mut c_char; - let mut var:*mut SHELL_VAR; - let mut refvar:*mut SHELL_VAR; - let mut v:*mut SHELL_VAR; - - let mut shell_fn:*mut function_def; - - refvar = std::ptr::null_mut(); - unsafe { - reset_internal_getopt (); - let tmp = DECLARE_OPTS(); - opt = internal_getopt (list, tmp.as_ptr() as * mut c_char); - while opt != -1 { - if list_opttype == '+' as i32 { - flags= &mut flags_off; - } else { - flags= &mut flags_on; - } - - let optu8:u8= opt as u8; - let optChar:char=char::from(optu8); - - /* If you add options here, see whether or not they need to be added to - the loop in subst.c:shell_expand_word_list() */ - match optChar { - 'a'=>{ *flags |= att_array!();} - 'A'=>{ *flags |= att_assoc!();} - 'p'=>{ pflag+=1;} - 'F'=>{ nodefs+=1; - *flags |= att_function!(); - } - 'f'=>{ *flags |= att_function!();} - 'G'=>{ - if flags == &mut flags_on { - chklocal = 1; - } - } - 'g'=>{ - if flags == &mut flags_on { - mkglobal = 1; - } +pub extern "C" fn r_declare_internal(mut list: *mut WordList, local_var: i32) -> i32 { + let mut flags_on: i32 = 0; + let mut flags_off: i32 = 0; + let mut flags: *mut i32; + let mut any_failed: i32 = 0; + let mut assign_error: i32 = 0; + let mut pflag: i32 = 0; + let mut nodefs: i32 = 0; + let mut opt: i32; + let mut onref: i32; + let mut offref: i32; + let mut mkglobal: i32 = 0; + let mut chklocal: i32 = 0; + let mut inherit_flag: i32 = 0; + + let mut t: *mut c_char; + let mut subscript_start: *mut c_char; + let mut var: *mut SHELL_VAR; + let mut refvar: *mut SHELL_VAR; + let mut v: *mut SHELL_VAR; + + let mut shell_fn: *mut function_def; + + refvar = std::ptr::null_mut(); + unsafe { + reset_internal_getopt(); + let tmp = DECLARE_OPTS(); + opt = internal_getopt(list, tmp.as_ptr() as *mut c_char); + while opt != -1 { + if list_opttype == '+' as i32 { + flags = &mut flags_off; + } else { + flags = &mut flags_on; + } + + let optu8: u8 = opt as u8; + let optChar: char = char::from(optu8); + + /* If you add options here, see whether or not they need to be added to + the loop in subst.c:shell_expand_word_list() */ + match optChar { + 'a' => { + *flags |= att_array!(); + } + 'A' => { + *flags |= att_assoc!(); + } + 'p' => { + pflag += 1; + } + 'F' => { + nodefs += 1; + *flags |= att_function!(); + } + 'f' => { + *flags |= att_function!(); + } + 'G' => { + if flags == &mut flags_on { + chklocal = 1; + } + } + 'g' => { + if flags == &mut flags_on { + mkglobal = 1; + } + } + 'i' => { + *flags |= att_integer!(); + } + 'n' => { + *flags |= att_nameref!(); + } + 'r' => { + *flags |= att_readonly!(); + } + 't' => { + *flags |= att_trace!(); + } + 'x' => { + *flags |= att_exported!(); + array_needs_making = 1; + } + 'c' => { + *flags |= att_capcase!(); + if flags == &mut flags_on { + flags_off |= att_uppercase!() | att_lowercase!(); + } + } + 'l' => { + *flags |= att_lowercase!(); + if flags == &mut flags_on { + flags_off |= att_capcase!() | att_uppercase!(); + } + } + 'u' => { + *flags |= att_uppercase!(); + if flags == &mut flags_on { + flags_off |= att_capcase!() | att_lowercase!(); + } + } + 'I' => { + inherit_flag = MKLOC_INHERIT!(); + } + _ => { + if opt == -99 { + r_builtin_help(); + return EX_USAGE; + } + builtin_usage(); + return EX_USAGE; + } + } + opt = internal_getopt(list, tmp.as_ptr() as *mut c_char); } - 'i'=>{ *flags |= att_integer!();} - 'n'=>{ *flags |= att_nameref!();} - 'r'=>{ *flags |= att_readonly!();} - 't'=>{ *flags |= att_trace!();} - 'x'=>{ *flags |= att_exported!(); - array_needs_making = 1; - } - 'c'=>{ *flags |= att_capcase!(); - if flags == &mut flags_on { - flags_off |= att_uppercase!() | att_lowercase!(); - } - } - 'l'=>{ *flags |= att_lowercase!(); - if flags == &mut flags_on { - flags_off |= att_capcase!()| att_uppercase!(); - } - } - 'u'=>{ *flags |= att_uppercase!(); - if flags == &mut flags_on { - flags_off |= att_capcase!()| att_lowercase!(); - } - } - 'I'=>{ inherit_flag = MKLOC_INHERIT!();} - _=>{ - if opt == -99 { - r_builtin_help(); - return EX_USAGE; - } - builtin_usage (); - return EX_USAGE; + list = loptend; + /* If there are no more arguments left, then we just want to show + some variables. */ + if list == std::ptr::null_mut() { + /* declare -[aAfFirtx] */ + /* Show local variables defined at this context level if this is + the `local' builtin. */ + if local_var != 0 { + show_local_var_attributes(0, nodefs); /* XXX - fix up args later */ + } else if pflag != 0 && (flags_on == 0 || flags_on == att_function!()) { + let mut ret = 0; + if flags_on == 0 { + ret = 1; + } + show_all_var_attributes(ret, nodefs); + } else if flags_on == 0 { + return set_builtin(std::ptr::null_mut()); + } else { + set_or_show_attributes(std::ptr::null_mut(), flags_on, nodefs); } - } - opt = internal_getopt (list, tmp.as_ptr() as * mut c_char); - } - list = loptend; - /* If there are no more arguments left, then we just want to show - some variables. */ - if list == std::ptr::null_mut() { /* declare -[aAfFirtx] */ - /* Show local variables defined at this context level if this is - the `local' builtin. */ - if local_var != 0 { - show_local_var_attributes (0, nodefs); /* XXX - fix up args later */ - } else if pflag != 0 && (flags_on == 0 || flags_on == att_function!()) { - let mut ret=0; - if flags_on == 0 { - ret=1; + return sh_chkwrite(EXECUTION_SUCCESS!()); } - show_all_var_attributes (ret, nodefs); - } else if flags_on == 0 { - return set_builtin (std::ptr::null_mut()); - } else { - set_or_show_attributes (std::ptr::null_mut(), flags_on, nodefs); - } - return sh_chkwrite (EXECUTION_SUCCESS!()); - } - - if pflag !=0 { /* declare -p [-aAfFirtx] name [name...] */ - any_failed=0; - while list != std::ptr::null_mut() { - if (flags_on & att_function!()) != 0 { - pflag = show_func_attributes ((*(*list).word).word, nodefs); - } else if local_var !=0 { - pflag = show_localname_attributes ((*(*list).word).word, nodefs); - } else { - pflag = show_name_attributes ((*(*list).word).word, nodefs); + + if pflag != 0 { + /* declare -p [-aAfFirtx] name [name...] */ + any_failed = 0; + while list != std::ptr::null_mut() { + if (flags_on & att_function!()) != 0 { + pflag = show_func_attributes((*(*list).word).word, nodefs); + } else if local_var != 0 { + pflag = show_localname_attributes((*(*list).word).word, nodefs); + } else { + pflag = show_name_attributes((*(*list).word).word, nodefs); + } + if pflag != 0 { + sh_notfound((*(*list).word).word); + any_failed += 1; + } + list = (*list).next; + } + + if any_failed != 0 { + return EXECUTION_FAILURE!(); + } else { + return EXECUTION_SUCCESS!(); + } } - if pflag !=0 { - sh_notfound ((*(*list).word).word); - any_failed += 1; + let tmpValue = CString::new("").unwrap(); + + /* There are arguments left, so we are making variables. */ + 'outter: while list != std::ptr::null_mut() { + /* declare [-aAfFirx] name [name ...] */ + let mut value: *mut c_char; + let mut name: *mut c_char; + let mut oldname: *mut c_char; + let mut offset: i32; + let mut aflags: i32; + let wflags: i32; + let mut created_var: i32; + let mut namelen: i32; + let assoc_noexpand: bool; + + let mut making_array_special: i32; + let mut compound_array_assign: i32; + let mut simple_array_assign: i32; + let mut var_exists: i32; + let mut array_exists: i32; + let mut creating_array: i32; + let mut array_subscript_assignment: bool; + + name = r_savestring((*(*list).word).word); + wflags = (*(*list).word).flags; + + assoc_noexpand = assoc_expand_once != 0 && (wflags & (1 << 2)) != 0; + // 分出= + if assoc_noexpand { + offset = assignment(name, 2); + } else { + offset = assignment(name, 0); + } + + aflags = 0; + created_var = 0; + + if local_var != 0 + && variable_context != 0 + && STREQ(name, CString::new("-").unwrap().as_ptr()) + { + var = make_local_variable(CString::new("-").unwrap().as_ptr(), 0); + if value_cell(var) != std::ptr::null_mut() { + libc::free(value_cell(var) as *mut c_void); /* just in case */ + } + value = get_current_options(); + var_setvalue(var, value); + VSETATTR(var, att_invisible!()); + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + + if offset != 0 { + /* declare [-aAfFirx] name=value */ + *name.offset(offset as isize) = '\0' as c_char; + value = name.offset((offset + 1) as isize); + if *(name.offset((offset - 1) as isize)) == '+' as c_char { + aflags |= ASS_APPEND!(); + *(name.offset((offset - 1) as isize)) = '\0' as c_char; + } + } else { + value = tmpValue.as_ptr() as *mut c_char; + } + /* Do some lexical error checking on the LHS and RHS of the assignment + that is specific to nameref variables. */ + if (flags_on & att_nameref!()) != 0 { + if valid_array_reference(name, 0) != 0 { + builtin_error( + CString::new("%s: reference variable cannot be an array") + .unwrap() + .as_ptr(), + name, + ); + assign_error += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } else if check_selfref(name, value, 0) != 0 { + /* disallow self references at global scope, warn at function scope */ + if variable_context == 0 { + builtin_error( + CString::new("%s: nameref variable self references not allowed") + .unwrap() + .as_ptr(), + name, + ); + assign_error += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } else { + builtin_warning( + CString::new("%s: circular name reference") + .unwrap() + .as_ptr(), + name, + ); + } + } + + if value != std::ptr::null_mut() + && (*value) != 0 + && (aflags & ASS_APPEND!()) == 0 + && valid_nameref_value(value, 1) == 0 + { + builtin_error( + CString::new("`nvalid %s': ivariable name for name reference") + .unwrap() + .as_ptr(), + value, + ); + assign_error += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + } + //restart_new_var_name: + 'inner: loop { + var_exists = 0; + array_exists = 0; + creating_array = 0; + compound_array_assign = 0; + simple_array_assign = 0; + array_subscript_assignment = false; + subscript_start = std::ptr::null_mut(); + t = libc::strchr(name, '[' as libc::c_int); + if t != std::ptr::null_mut() && (flags_on & att_function!()) == 0 { + /* ] */ + /* If offset != 0 we have already validated any array reference + because assignment() calls skipsubscript() */ + if offset == 0 && valid_array_reference(name, 0) == 0 { + sh_invalidid(name); + assign_error += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + + subscript_start = t; + *t = '\0' as c_char; + making_array_special = 1; /* XXX - should this check offset? */ + array_subscript_assignment = offset != 0; + } else { + making_array_special = 0; + } + /* If we're in posix mode or not looking for a shell function (since + shell function names don't have to be valid identifiers when the + shell's not in posix mode), check whether or not the argument is a + valid, well-formed shell identifier. */ + if (posixly_correct != 0 || (flags_on & att_function!()) == 0) + && legal_identifier(name) == 0 + { + sh_invalidid(name); + assign_error += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + /* If VARIABLE_CONTEXT has a non-zero value, then we are executing + inside of a function. This means we should make local variables, + not global ones. */ + + /* XXX - this has consequences when we're making a local copy of a + variable that was in the temporary environment. Watch out + for this. */ + refvar = std::ptr::null_mut(); + if variable_context != 0 && mkglobal == 0 && ((flags_on & att_function!()) == 0) { + let newname: *mut c_char; + + /* check name for validity here? */ + var = find_variable(name); + if var == std::ptr::null_mut() { + newname = nameref_transform_name(name, ASS_MKLOCAL!()); + } else if (flags_on & att_nameref!()) == 0 && (flags_off & att_nameref!()) == 0 + { + /* Ok, we're following namerefs here, so let's make sure that if + we followed one, it was at the same context (see below for + more details). */ + refvar = find_variable_last_nameref(name, 1); + if refvar != std::ptr::null_mut() && (*refvar).context != variable_context { + newname = name; + } else { + newname = (*var).name; + } + refvar = std::ptr::null_mut(); + } else { + newname = name; /* dealing with nameref attribute */ + } + // 至此,find_variable 返回var 没有被更新 + /* Pass 1 as second argument to make_local_{assoc,array}_variable + return an existing {array,assoc} variable to be flagged as an + error below. */ + if (flags_on & att_assoc!()) != 0 { + var = make_local_assoc_variable(newname, MKLOC_ARRAYOK!() | inherit_flag); + } else if (flags_on & att_array!()) != 0 || making_array_special != 0 { + var = make_local_array_variable(newname, MKLOC_ASSOCOK!() | inherit_flag); + } else if offset == 0 && (flags_on & att_nameref!()) != 0 { + /* First look for refvar at current scope */ + refvar = find_variable_last_nameref(name, 1); + /* VARIABLE_CONTEXT != 0, so we are attempting to create or modify + the attributes for a local variable at the same scope. If we've + used a reference from a previous context to resolve VAR, we + want to throw REFVAR and VAR away and create a new local var. */ + if refvar != std::ptr::null_mut() && (*refvar).context != variable_context { + refvar = std::ptr::null_mut(); + var = make_local_variable(name, inherit_flag); + } else if refvar != std::ptr::null_mut() + && (*refvar).context == variable_context + { + var = refvar; + } else if var == std::ptr::null_mut() + || (*refvar).context != variable_context + { + /* Maybe we just want to create a new local variable */ + var = make_local_variable(name, inherit_flag); + } + /* otherwise we have a var at the right context */ + } else { + /* XXX - check name for validity here with valid_nameref_value */ + if flags_on & att_nameref!() != 0 { + var = make_local_variable(name, inherit_flag); + } else { + var = make_local_variable(newname, inherit_flag); /* sets att_invisible for new vars */ + } + } + + if var == std::ptr::null_mut() { + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + + if var != std::ptr::null_mut() + && nameref_p(var) != 0 + && readonly_p(var) != 0 + && nameref_cell(var) != std::ptr::null_mut() + && (flags_off & att_nameref!()) != 0 + { + sh_readonly(name); + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + } else { + var = std::ptr::null_mut(); + } + /* If we are declaring a function, then complain about it in some way. + We don't let people make functions by saying `typeset -f foo=bar'. */ + + /* There should be a way, however, to let people look at a particular + function definition by saying `typeset -f foo'. */ + + if (flags_on & att_function!()) != 0 { + if offset != 0 { + /* declare -f [-rix] foo=bar */ + builtin_error( + CString::new("cannot use `-f' to make functions") + .unwrap() + .as_ptr(), + ); + libc::free(name as *mut c_void); + return EXECUTION_FAILURE!(); + } else { + /* declare -f [-rx] name [name...] */ + var = find_function(name); + if var != std::ptr::null_mut() { + if readonly_p(var) != 0 && (flags_off & att_readonly!()) != 0 { + builtin_error( + CString::new("%s: readonly function").unwrap().as_ptr(), + name, + ); + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } else if (flags_on & (att_array!() | att_assoc!())) != 0 { + if (flags_on & att_array!()) != 0 { + sh_invalidopt( + CString::new("-a").unwrap().as_ptr() as *mut c_char + ); + } else { + sh_invalidopt( + CString::new("-A").unwrap().as_ptr() as *mut c_char + ); + } + + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + /* declare -[Ff] name [name...] */ + if flags_on == att_function!() && flags_off == 0 { + if nodefs != 0 && debugging_mode != 0 { + shell_fn = find_function_def((*var).name); + if shell_fn != std::ptr::null_mut() { + println!( + "{} {} {}", + CStr::from_ptr((*var).name).to_str().unwrap(), + (*shell_fn).line, + CStr::from_ptr((*shell_fn).source_file) + .to_str() + .unwrap() + ); + } else { + println!( + "{}", + CStr::from_ptr((*var).name).to_str().unwrap() + ); + } + } else { + if nodefs != 0 { + t = (*var).name; + } else { + t = named_function_string( + name, + function_cell(var), + FUNC_MULTILINE!() | FUNC_EXTERNAL!(), + ); + } + println!("{}", CStr::from_ptr(t).to_str().unwrap()); + any_failed = sh_chkwrite(any_failed); + } + } else { + /* declare -[fF] -[rx] name [name...] */ + VSETATTR(var, flags_on); + flags_off &= !att_function!(); /* makes no sense */ + VUNSETATTR(var, flags_off); + } + } else { + any_failed += 1; + } + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + } else { + /* declare -[aAinrx] name [name...] */ + /* Non-null if we just created or fetched a local variable. */ + + /* Here's what ksh93 seems to do as of the 2012 version: if we are + using declare -n to modify the value of an existing nameref + variable, don't follow the nameref chain at all and just search + for a nameref at the current context. If we have a nameref, + modify its value (changing which variable #define ASS_NAMEREF 0x0010 /* assigning to nameref variable */it references). */ + if var == std::ptr::null_mut() && (flags_on & att_nameref!()) != 0 { + /* See if we are trying to modify an existing nameref variable, + but don't follow the nameref chain. */ + if mkglobal != 0 { + var = find_global_variable_noref(name); + } else { + var = find_variable_noref(name); + } + + if var != std::ptr::null_mut() && nameref_p(var) == 0 { + var = std::ptr::null_mut(); + } + } else if var == std::ptr::null_mut() && (flags_off & att_nameref!()) != 0 { + /* However, if we're turning off the nameref attribute on an existing + nameref variable, we first follow the nameref chain to the end, + modify the value of the variable this nameref variable references + if there is an assignment statement argument, + *CHANGING ITS VALUE AS A SIDE EFFECT*, then turn off the nameref + flag *LEAVING THE NAMEREF VARIABLE'S VALUE UNCHANGED* */ + /* See if we are trying to modify an existing nameref variable */ + if mkglobal != 0 { + refvar = find_global_variable_last_nameref(name, 0); + } else { + refvar = find_variable_last_nameref(name, 0); + } + + if refvar != std::ptr::null_mut() && nameref_p(refvar) == 0 { + refvar = std::ptr::null_mut(); + } + /* If the nameref is readonly but doesn't have a value, ksh93 + allows the nameref attribute to be removed. If it's readonly + and has a value, even if the value doesn't reference an + existing variable, we disallow the modification */ + if refvar != std::ptr::null_mut() + && nameref_cell(refvar) != std::ptr::null_mut() + && readonly_p(refvar) != 0 + { + sh_readonly(name); + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + /* If all we're doing is turning off the nameref attribute, don't + bother with VAR at all, whether it exists or not. Just turn it + off and go on. */ + if refvar != std::ptr::null_mut() + && flags_on == 0 + && offset == 0 + && (flags_off & !att_nameref!()) == 0 + { + VUNSETATTR(refvar, att_nameref!()); + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + + if refvar != std::ptr::null_mut() { + /* XXX - use declare_find_variable here? */ + if mkglobal != 0 { + var = find_global_variable(nameref_cell(refvar)); + } else { + var = find_variable(nameref_cell(refvar)); + } + } + } else if var == std::ptr::null_mut() + && offset != 0 + && array_subscript_assignment + { + /* If we have an array assignment to a nameref, remove the nameref + attribute and go on. */ + if mkglobal != 0 { + var = find_global_variable_noref(name); + } else { + var = find_variable_noref(name); + } + + if var != std::ptr::null_mut() && nameref_p(var) != 0 { + internal_warning( + CString::new("%s: removing nameref attribute") + .unwrap() + .as_ptr(), + name, + ); + libc::free(value_cell(var) as *mut c_void); /* XXX - bash-4.3 compat */ + var_setvalue(var, std::ptr::null_mut()); + VUNSETATTR(var, att_nameref!()); + } + } + + /* See if we are trying to set flags or value (or create) for an + existing nameref that points to a non-existent variable: e.g., + declare -n foo=bar + unset foo # unsets bar + declare -i foo + foo=4+4 + declare -p foo */ + if var == std::ptr::null_mut() + && (mkglobal != 0 || flags_on != 0 || flags_off != 0 || offset != 0) + { + if mkglobal != 0 { + refvar = find_global_variable_last_nameref(name, 0); + } else { + refvar = find_variable_last_nameref(name, 0); + } + + if refvar != std::ptr::null_mut() && nameref_p(refvar) == 0 { + refvar = std::ptr::null_mut(); + } + + if refvar != std::ptr::null_mut() { + /* XXX - use declare_find_variable here? */ + if mkglobal != 0 { + var = find_global_variable(nameref_cell(refvar)); + } else { + var = find_variable(nameref_cell(refvar)); + } + } + + if refvar != std::ptr::null_mut() && var == std::ptr::null_mut() { + oldname = name; /* need to free this */ + namelen = libc::strlen(nameref_cell(refvar)) as i32; + + if subscript_start != std::ptr::null_mut() { + *subscript_start = '[' as c_char; /*]*/ + namelen += libc::strlen(subscript_start) as i32; + } + + name = + libc::malloc(namelen as libc::size_t + 2 + libc::strlen(value) + 1) + as *mut c_char; + libc::strcpy(name, nameref_cell(refvar)); + + if subscript_start != std::ptr::null_mut() { + libc::strcpy( + name.offset(libc::strlen(nameref_cell(refvar)) as isize), + subscript_start, + ); + } + + /* We are committed to using the new name, so reset */ + if offset != 0 { + /* Rebuild assignment and restore offset and value */ + if (aflags & ASS_APPEND!()) != 0 { + *(name.offset(namelen as isize) as *mut c_char) = '+' as c_char; + + namelen += 1; + } + *(name.offset(namelen as isize) as *mut c_char) = '=' as c_char; + // *((name as usize + namelen as usize) as * mut c_char) = '=' as c_char; + namelen += 1; + + if value != std::ptr::null_mut() && (*value) != 0 { + libc::strcpy(name.offset(namelen as isize), value); + } else { + *(name.offset(namelen as isize) as *mut c_char) = + '\0' as c_char; + } + + offset = assignment(name, 0); + /* if offset was valid previously, but the substituting + of the nameref value results in an invalid assignment, + throw an invalid identifier error */ + if offset == 0 { + libc::free(oldname as *mut c_void); + sh_invalidid(name); + assign_error += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + *(name.offset(offset as isize)) = '\0' as c_char; + + value = name.offset(namelen as isize); + } + libc::free(oldname as *mut c_void); + + /* OK, let's turn off the nameref attribute. + Now everything else applies to VAR. */ + if (flags_off & att_nameref!()) != 0 { + VUNSETATTR(refvar, att_nameref!()); + } + + //goto restart_new_var_name; + continue 'inner; + /* NOTREACHED */ + } + } + if var == std::ptr::null_mut() { + var = r_declare_find_variable(name, mkglobal, chklocal); + } + + var_exists = (var != std::ptr::null_mut()) as i32; + array_exists = (var != std::ptr::null_mut() + && (array_p(var) != 0 || assoc_p(var) != 0)) + as i32; + creating_array = flags_on & (att_array!() | att_assoc!()); + + if var == std::ptr::null_mut() { + if (flags_on & att_assoc!()) != 0 { + var = make_new_assoc_variable(name); + if var != std::ptr::null_mut() && offset == 0 { + VSETATTR(var, att_invisible!()); + } + } else if (flags_on & att_array!()) != 0 || making_array_special != 0 { + var = make_new_array_variable(name); + if var != std::ptr::null_mut() && offset == 0 { + VSETATTR(var, att_invisible!()); + } + } else { + if mkglobal != 0 { + var = + bind_global_variable(name, std::ptr::null_mut(), ASS_FORCE!()); + } else { + var = bind_variable(name, std::ptr::null_mut(), ASS_FORCE!()); + } + if var != std::ptr::null_mut() && offset == 0 { + VSETATTR(var, att_invisible!()); + } + } + + if var == std::ptr::null_mut() { + /* Has to appear in brackets */ + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + created_var = 1; + } else if (array_p(var) != 0 || assoc_p(var) != 0) + && (flags_on & att_nameref!()) != 0 + { + /* Can't take an existing array variable and make it a nameref */ + builtin_error( + CString::new("%s: reference variable cannot be an array") + .unwrap() + .as_ptr(), + name, + ); + assign_error += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } else if nameref_p(var) != 0 + && (flags_on & att_nameref!()) == 0 + && (flags_off & att_nameref!()) == 0 + && offset != 0 + && valid_nameref_value(value, 1) == 0 + { + builtin_error( + CString::new("`%s': invalid variable name for name reference") + .unwrap() + .as_ptr(), + value, + ); + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } else if (flags_on & att_nameref!()) != 0 { + /* Check of offset is to allow an assignment to a nameref var as + part of the declare word to override existing value */ + if nameref_p(var) == 0 + && var_isset(var) + && offset == 0 + && valid_nameref_value(value_cell(var), 0) == 0 + { + builtin_error( + CString::new("`%s': invalid variable name for name reference") + .unwrap() + .as_ptr(), + value_cell(var), + ); + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + + if readonly_p(var) != 0 { + sh_readonly(name); + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + /* ksh93 compat: turning on nameref attribute turns off -ilu */ + VUNSETATTR( + var, + att_integer!() | att_uppercase!() | att_lowercase!() | att_capcase!(), + ); + } + + /* Cannot use declare +r to turn off readonly attribute. */ + if readonly_p(var) != 0 && (flags_off & att_readonly!()) != 0 { + sh_readonly((*var).name); + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + + /* Cannot use declare to assign value to readonly or noassign + variable. */ + if (readonly_p(var) != 0 || noassign_p(var) != 0) && offset != 0 { + if readonly_p(var) != 0 { + sh_readonly(name); + } + assign_error += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + + /* make declare a[2]=foo as similar to a[2]=foo as possible if + a is already an array or assoc variable. */ + if array_subscript_assignment && array_exists != 0 && creating_array == 0 { + simple_array_assign = 1; + } else if (making_array_special != 0 + || creating_array != 0 + || array_exists != 0) + && offset != 0 + { + let vlen: i32; + vlen = libc::strlen(value) as i32; + /*itrace("declare_builtin: name = %s value = %s flags = %d", name, value, wflags);*/ + if shell_compatibility_level > 43 + && (wflags & W_COMPASSIGN!()) == 0 + && *value == '(' as c_char + && *(value.offset((vlen - 1) as isize) as *mut c_char) == ')' as c_char + { + /* The warning is only printed when using compound assignment + to an array variable that doesn't already exist. We use + creating_array to allow things like + declare -a foo$bar='(abc)' to work. */ + if array_exists == 0 && creating_array == 0 { + internal_warning( + CString::new("%s: quoted compound array assignment deprecated") + .unwrap() + .as_ptr(), + (*(*list).word).word, + ); + } + compound_array_assign = + (array_exists != 0 || creating_array != 0) as i32; + simple_array_assign = making_array_special; + } else if *value == '(' as c_char + && *(value.offset((vlen - 1) as isize) as *mut c_char) == ')' as c_char + && (shell_compatibility_level < 44 || (wflags & W_COMPASSIGN!()) != 0) + { + compound_array_assign = 1; + } else { + simple_array_assign = 1; + } + } + + /* Cannot use declare +a name or declare +A name to remove an + array variable. */ + if ((flags_off & att_array!()) != 0 && array_p(var) != 0) + || ((flags_off & att_assoc!()) != 0 && assoc_p(var) != 0) + { + builtin_error( + CString::new("%s: cannot destroy array variables in this way") + .unwrap() + .as_ptr(), + name, + ); + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + + if (flags_on & att_array!()) != 0 && assoc_p(var) != 0 { + builtin_error( + CString::new("%s: cannot convert associative to indexed array") + .unwrap() + .as_ptr(), + name, + ); + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + + if (flags_on & att_assoc!()) != 0 && array_p(var) != 0 { + builtin_error( + CString::new("%s: cannot convert indexed to associative array") + .unwrap() + .as_ptr(), + name, + ); + any_failed += 1; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + + /* declare -A name[[n]] makes name an associative array variable. */ + if (flags_on & att_assoc!()) != 0 { + if assoc_p(var) == 0 { + var = convert_var_to_assoc(var); + } + } else if (making_array_special != 0 || (flags_on & att_array!()) != 0) + && array_p(var) == 0 + && assoc_p(var) == 0 + { + /* declare -a name[[n]] or declare name[n] makes name an indexed + array variable. */ + var = convert_var_to_array(var); + } + + /* XXX - we note that we are turning on nameref attribute and defer + setting it until the assignment has been made so we don't do an + inadvertent nameref lookup. Might have to do the same thing for + flags_off&att_nameref. */ + /* XXX - ksh93 makes it an error to set a readonly nameref variable + using a single typeset command. */ + onref = flags_on & att_nameref!(); + flags_on &= !att_nameref!(); + + if array_p(var) != 0 + || assoc_p(var) != 0 + || (offset != 0 && compound_array_assign != 0) + || simple_array_assign != 0 + { + onref = 0; /* array variables may not be namerefs */ + } + /* ksh93 seems to do this */ + offref = flags_off & att_nameref!(); + flags_off &= !att_nameref!(); + + VSETATTR(var, flags_on); + VUNSETATTR(var, flags_off); + + if offset != 0 && compound_array_assign != 0 { + assign_array_var_from_string(var, value, aflags | ASS_FORCE!()); + } else if simple_array_assign != 0 && subscript_start != std::ptr::null_mut() { + let mut local_aflags: i32; + /* declare [-aA] name[N]=value */ + *subscript_start = '[' as c_char; /* ] */ + /* XXX - problem here with appending */ + local_aflags = aflags & ASS_APPEND!(); + if assoc_noexpand { + local_aflags |= ASS_NOEXPAND!(); + } else { + local_aflags |= 0; + } + + var = assign_array_element(name, value, local_aflags); /* XXX - not aflags */ + *subscript_start = '\0' as c_char; + if var == std::ptr::null_mut() { + /* some kind of assignment error */ + assign_error += 1; + flags_on |= onref; + flags_off |= offref; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + } else if simple_array_assign != 0 { + /* let bind_{array,assoc}_variable take care of this. */ + if assoc_p(var) != 0 { + bind_assoc_variable( + var, + name, + r_savestring(CString::new("0").unwrap().as_ptr()), + value, + aflags | ASS_FORCE!(), + ); + } else { + bind_array_variable(name, 0, value, aflags | ASS_FORCE!()); + } + } else if offset != 0 { + /* XXX - no ASS_FORCE here */ + /* bind_variable_value duplicates the essential internals of bind_variable() */ + if onref != 0 || nameref_p(var) != 0 { + aflags |= ASS_NAMEREF!(); + } + + v = bind_variable_value(var, value, aflags); + if v == std::ptr::null_mut() && (onref != 0 || nameref_p(var) != 0) { + if valid_nameref_value(value, 1) == 0 { + sh_invalidid(value); + } + + assign_error += 1; + /* XXX - unset this variable? or leave it as normal var? */ + if created_var != 0 { + if mkglobal != 0 { + delete_var((*var).name, global_variables); + } else { + delete_var((*var).name, shell_variables); + } + } + + flags_on |= onref; /* undo change from above */ + flags_off |= offref; + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } + } + + /* If we found this variable in the temporary environment, as with + `var=value declare -x var', make sure it is treated identically + to `var=value export var'. Do the same for `declare -r' and + `readonly'. Preserve the attributes, except for att_tempvar. */ + /* XXX -- should this create a variable in the global scope, or + modify the local variable flags? ksh93 has it modify the + global scope. + Need to handle case like in set_var_attribute where a temporary + variable is in the same table as the function local vars. */ + if (flags_on & (att_exported!() | att_readonly!()) != 0) && tempvar_p(var) != 0 + { + let mut tv: *mut SHELL_VAR; + let mut tvalue: *mut c_char = std::ptr::null_mut(); + + tv = find_tempenv_variable((*var).name); + if tv != std::ptr::null_mut() { + if var_isset(var) { + tvalue = r_savestring(value_cell(var)); + } else { + tvalue = r_savestring(CString::new("").unwrap().as_ptr()); + } + tv = bind_variable((*var).name, tvalue, 0); + + if tv != std::ptr::null_mut() { + (*tv).attributes |= (*var).attributes & !att_tempvar!(); + if (*tv).context > 0 { + VSETATTR(tv, att_propagate!()); + } + } + libc::free(tvalue as *mut c_void); + } + VSETATTR(var, att_propagate!()); + } + } + + /* Turn on nameref attribute we deferred above. */ + /* XXX - should we turn on the noassign attribute for consistency with + ksh93 when we turn on the nameref attribute? */ + VSETATTR(var, onref); + flags_on |= onref; + VUNSETATTR(var, offref); + flags_off |= offref; + /* Yuck. ksh93 compatibility. XXX - need to investigate more but + definitely happens when turning off nameref attribute on nameref + (see comments above). Under no circumstances allow this to turn + off readonly attribute on readonly nameref variable. */ + if refvar != std::ptr::null_mut() { + if (flags_off & att_readonly!()) != 0 { + flags_off &= !att_readonly!(); + } + VUNSETATTR(refvar, flags_off); + } + stupidly_hack_special_variables(name); + libc::free(name as *mut c_void); + list = (*list).next; + continue 'outter; + } } - list = (*list).next; - } - - if any_failed !=0 { - return EXECUTION_FAILURE!(); - } else { - return EXECUTION_SUCCESS!(); - } - } - let tmpValue = CString::new("").unwrap(); - - /* There are arguments left, so we are making variables. */ - 'outter: while list !=std::ptr::null_mut() { /* declare [-aAfFirx] name [name ...] */ - let mut value:* mut c_char; - let mut name:* mut c_char; - let mut oldname:* mut c_char; - let mut offset:i32; - let mut aflags:i32; - let wflags:i32; - let mut created_var:i32; - let mut namelen:i32; - let assoc_noexpand:bool; - - let mut making_array_special:i32; - let mut compound_array_assign:i32; - let mut simple_array_assign:i32; - let mut var_exists:i32; - let mut array_exists:i32; - let mut creating_array:i32; - let mut array_subscript_assignment:bool; - - name = r_savestring ((*(*list).word).word); - wflags = (*(*list).word).flags; - - assoc_noexpand = (assoc_expand_once !=0 && (wflags & (1 << 2)) !=0); - // 分出= - if assoc_noexpand { - offset = assignment (name, 2); - } else { - offset = assignment (name, 0); - } - - aflags = 0; - created_var = 0; - - if local_var !=0 && variable_context !=0 && STREQ (name, CString::new("-").unwrap().as_ptr()) { - var = make_local_variable (CString::new("-").unwrap().as_ptr(), 0); - if value_cell(var) != std::ptr::null_mut() { - libc::free (value_cell (var) as * mut c_void); /* just in case */ + if assign_error != 0 { + return EX_BADASSIGN!(); + } else { + if any_failed == 0 { + return EXECUTION_SUCCESS!(); + } else { + return EXECUTION_FAILURE!(); + } } - value = get_current_options (); - var_setvalue (var, value); - VSETATTR (var, att_invisible!()); - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - - if offset !=0 { /* declare [-aAfFirx] name=value */ - *name.offset(offset as isize) = '\0' as c_char; - value = name.offset((offset + 1) as isize) ; - if *(name.offset((offset - 1) as isize)) == '+' as c_char { - aflags |= ASS_APPEND!(); - *(name.offset((offset - 1) as isize))= '\0' as c_char; - } - } else { - value = tmpValue.as_ptr() as * mut c_char; - } - /* Do some lexical error checking on the LHS and RHS of the assignment - that is specific to nameref variables. */ - if (flags_on & att_nameref!()) !=0 { - if valid_array_reference (name, 0) !=0 { - builtin_error (CString::new("%s: reference variable cannot be an array").unwrap().as_ptr(), name); - assign_error+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } else if check_selfref (name, value, 0) !=0 {/* disallow self references at global scope, warn at function scope */ - if variable_context == 0 { - builtin_error (CString::new("%s: nameref variable self references not allowed").unwrap().as_ptr(), name); - assign_error+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } else { - builtin_warning (CString::new("%s: circular name reference").unwrap().as_ptr(), name); - } - } - - if value != std::ptr::null_mut() && (*value) !=0 && (aflags & ASS_APPEND!()) == 0 && valid_nameref_value (value, 1) == 0 { - builtin_error (CString::new("`nvalid %s': ivariable name for name reference").unwrap().as_ptr(), value); - assign_error+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - } -//restart_new_var_name: - 'inner: loop { - var_exists = 0; - array_exists = 0; - creating_array = 0; - compound_array_assign = 0; - simple_array_assign = 0; - array_subscript_assignment = false; - subscript_start = std::ptr::null_mut(); - t = libc::strchr (name, '[' as libc::c_int); - if t !=std::ptr::null_mut() && (flags_on & att_function!()) == 0 {/* ] */ - /* If offset != 0 we have already validated any array reference - because assignment() calls skipsubscript() */ - if offset == 0 && valid_array_reference (name, 0) == 0 { - sh_invalidid (name); - assign_error+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - - subscript_start = t; - *t = '\0' as c_char; - making_array_special = 1; /* XXX - should this check offset? */ - array_subscript_assignment = offset != 0; - } else { - making_array_special = 0; - } - /* If we're in posix mode or not looking for a shell function (since - shell function names don't have to be valid identifiers when the - shell's not in posix mode), check whether or not the argument is a - valid, well-formed shell identifier. */ - if (posixly_correct !=0 || (flags_on & att_function!()) == 0) && legal_identifier(name) == 0 { - sh_invalidid (name); - assign_error+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - /* If VARIABLE_CONTEXT has a non-zero value, then we are executing - inside of a function. This means we should make local variables, - not global ones. */ - - /* XXX - this has consequences when we're making a local copy of a - variable that was in the temporary environment. Watch out - for this. */ - refvar = std::ptr::null_mut(); - if variable_context !=0 && mkglobal == 0 && ((flags_on & att_function!()) == 0) { - let newname: * mut c_char; - - /* check name for validity here? */ - var = find_variable (name); - if var == std::ptr::null_mut() { - newname = nameref_transform_name (name, ASS_MKLOCAL!()); - } - else if (flags_on & att_nameref!()) == 0 && (flags_off & att_nameref!()) == 0 { - /* Ok, we're following namerefs here, so let's make sure that if - we followed one, it was at the same context (see below for - more details). */ - refvar = find_variable_last_nameref (name, 1); - if refvar != std::ptr::null_mut() && (*refvar).context != variable_context { - newname = name ; - } - else { - newname = (*var).name; - } - refvar = std::ptr::null_mut(); - } else { - newname = name; /* dealing with nameref attribute */ - } -// 至此,find_variable 返回var 没有被更新 - /* Pass 1 as second argument to make_local_{assoc,array}_variable - return an existing {array,assoc} variable to be flagged as an - error below. */ - if (flags_on & att_assoc!()) !=0 { - var = make_local_assoc_variable (newname, MKLOC_ARRAYOK!()|inherit_flag); - } else if (flags_on & att_array!()) !=0 || making_array_special !=0 { - var = make_local_array_variable (newname, MKLOC_ASSOCOK!()|inherit_flag); - } else if offset == 0 && (flags_on & att_nameref!()) !=0 { - /* First look for refvar at current scope */ - refvar = find_variable_last_nameref (name, 1); - /* VARIABLE_CONTEXT != 0, so we are attempting to create or modify - the attributes for a local variable at the same scope. If we've - used a reference from a previous context to resolve VAR, we - want to throw REFVAR and VAR away and create a new local var. */ - if refvar != std::ptr::null_mut() && (*refvar).context != variable_context { - refvar = std::ptr::null_mut(); - var = make_local_variable (name, inherit_flag); - } else if refvar != std::ptr::null_mut() && (*refvar).context == variable_context { - var = refvar; - } else if var == std::ptr::null_mut() || (*refvar).context != variable_context {/* Maybe we just want to create a new local variable */ - var = make_local_variable (name, inherit_flag); - } - /* otherwise we have a var at the right context */ - } else { - /* XXX - check name for validity here with valid_nameref_value */ - if flags_on & att_nameref!() !=0 { - var = make_local_variable ( name , inherit_flag); - } else { - var = make_local_variable ( newname, inherit_flag); /* sets att_invisible for new vars */ - } - } - - if var == std::ptr::null_mut() { - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - - if var != std::ptr::null_mut() && nameref_p (var) !=0 && readonly_p (var) != 0 && nameref_cell (var) != std::ptr::null_mut() && (flags_off & att_nameref!()) !=0 { - sh_readonly (name); - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - } else { - var = std::ptr::null_mut(); - } - /* If we are declaring a function, then complain about it in some way. - We don't let people make functions by saying `typeset -f foo=bar'. */ - - /* There should be a way, however, to let people look at a particular - function definition by saying `typeset -f foo'. */ - - if (flags_on & att_function!()) !=0 { - if offset !=0 { /* declare -f [-rix] foo=bar */ - builtin_error (CString::new("cannot use `-f' to make functions").unwrap().as_ptr()); - libc::free (name as * mut c_void); - return EXECUTION_FAILURE!(); - } else {/* declare -f [-rx] name [name...] */ - var = find_function (name); - if var != std::ptr::null_mut() { - if readonly_p (var) !=0 && (flags_off & att_readonly!()) !=0 { - builtin_error (CString::new("%s: readonly function").unwrap().as_ptr(), name); - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } else if (flags_on & (att_array!()|att_assoc!())) !=0 { - if (flags_on & att_array!()) !=0 { - sh_invalidopt (CString::new("-a").unwrap().as_ptr() as * mut c_char); - } else { - sh_invalidopt (CString::new("-A").unwrap().as_ptr() as * mut c_char); - } - - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - /* declare -[Ff] name [name...] */ - if flags_on == att_function!() && flags_off == 0 { - if nodefs !=0 && debugging_mode !=0 { - shell_fn = find_function_def ((*var).name); - if shell_fn !=std::ptr::null_mut() { - println!("{} {} {}",CStr::from_ptr((*var).name).to_str().unwrap(),(*shell_fn).line,CStr::from_ptr((*shell_fn).source_file).to_str().unwrap()); - } else { - println!("{}",CStr::from_ptr((*var).name).to_str().unwrap()); - } - } else { - if nodefs !=0 { - t=(*var).name; - } else { - t = named_function_string (name, function_cell (var), FUNC_MULTILINE!()|FUNC_EXTERNAL!()); - } - println!("{}",CStr::from_ptr(t).to_str().unwrap()); - any_failed = sh_chkwrite (any_failed); - } - } else { /* declare -[fF] -[rx] name [name...] */ - VSETATTR (var, flags_on); - flags_off &= ! att_function!(); /* makes no sense */ - VUNSETATTR (var, flags_off); - } - } else { - any_failed+=1; - } - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - } else { - /* declare -[aAinrx] name [name...] */ - /* Non-null if we just created or fetched a local variable. */ - - /* Here's what ksh93 seems to do as of the 2012 version: if we are - using declare -n to modify the value of an existing nameref - variable, don't follow the nameref chain at all and just search - for a nameref at the current context. If we have a nameref, - modify its value (changing which variable #define ASS_NAMEREF 0x0010 /* assigning to nameref variable */it references). */ - if var == std::ptr::null_mut() && (flags_on & att_nameref!()) !=0 { - /* See if we are trying to modify an existing nameref variable, - but don't follow the nameref chain. */ - if mkglobal !=0 { - var = find_global_variable_noref (name); - } else { - var = find_variable_noref (name); - } - - if var != std::ptr::null_mut() && nameref_p (var) == 0 { - var = std::ptr::null_mut(); - } - } else if var == std::ptr::null_mut() && (flags_off & att_nameref!()) !=0 { - /* However, if we're turning off the nameref attribute on an existing - nameref variable, we first follow the nameref chain to the end, - modify the value of the variable this nameref variable references - if there is an assignment statement argument, - *CHANGING ITS VALUE AS A SIDE EFFECT*, then turn off the nameref - flag *LEAVING THE NAMEREF VARIABLE'S VALUE UNCHANGED* */ - /* See if we are trying to modify an existing nameref variable */ - if mkglobal !=0 { - refvar=find_global_variable_last_nameref (name, 0); - } else { - refvar=find_variable_last_nameref (name, 0); - } - - if refvar != std::ptr::null_mut() && nameref_p (refvar) == 0 { - refvar = std::ptr::null_mut(); - } - /* If the nameref is readonly but doesn't have a value, ksh93 - allows the nameref attribute to be removed. If it's readonly - and has a value, even if the value doesn't reference an - existing variable, we disallow the modification */ - if refvar != std::ptr::null_mut() && nameref_cell (refvar) != std::ptr::null_mut() && readonly_p (refvar) != 0 { - sh_readonly (name); - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - /* If all we're doing is turning off the nameref attribute, don't - bother with VAR at all, whether it exists or not. Just turn it - off and go on. */ - if refvar != std::ptr::null_mut() && flags_on == 0 && offset == 0 && (flags_off & !att_nameref!()) == 0 { - VUNSETATTR (refvar, att_nameref!()); - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - - if refvar !=std::ptr::null_mut() { - /* XXX - use declare_find_variable here? */ - if mkglobal !=0 { - var = find_global_variable (nameref_cell (refvar)); - } else { - var =find_variable (nameref_cell (refvar)); - } - } - } else if var == std::ptr::null_mut() && offset !=0 && array_subscript_assignment { - /* If we have an array assignment to a nameref, remove the nameref - attribute and go on. */ - if mkglobal !=0 { - var = find_global_variable_noref (name); - } else { - var = find_variable_noref (name); - } - - if var !=std::ptr::null_mut() && nameref_p (var) !=0 { - internal_warning (CString::new("%s: removing nameref attribute").unwrap().as_ptr(), name); - libc::free (value_cell (var) as * mut c_void); /* XXX - bash-4.3 compat */ - var_setvalue (var, std::ptr::null_mut()); - VUNSETATTR (var, att_nameref!()); - } - } - - /* See if we are trying to set flags or value (or create) for an - existing nameref that points to a non-existent variable: e.g., - declare -n foo=bar - unset foo # unsets bar - declare -i foo - foo=4+4 - declare -p foo */ - if var == std::ptr::null_mut() && (mkglobal !=0 || flags_on !=0 || flags_off !=0 || offset !=0) { - if mkglobal !=0 { - refvar = find_global_variable_last_nameref (name, 0); - } else { - refvar = find_variable_last_nameref (name, 0); - } - - if refvar != std::ptr::null_mut() && nameref_p (refvar) == 0 { - refvar = std::ptr::null_mut(); - } - - if refvar !=std::ptr::null_mut() { - /* XXX - use declare_find_variable here? */ - if mkglobal !=0 { - var = find_global_variable (nameref_cell (refvar)) ; - } else { - var = find_variable (nameref_cell (refvar)); - } - } - - if refvar !=std::ptr::null_mut() && var == std::ptr::null_mut() { - oldname = name; /* need to free this */ - namelen = libc::strlen (nameref_cell (refvar)) as i32; - - if subscript_start != std::ptr::null_mut() { - *subscript_start = '[' as c_char; /*]*/ - namelen += libc::strlen (subscript_start) as i32; - } - - name = libc::malloc (namelen as libc::size_t + 2 + libc::strlen (value) + 1 ) as * mut c_char ; - libc::strcpy (name, nameref_cell (refvar)); - - if subscript_start != std::ptr::null_mut() { - libc::strcpy (name.offset(libc::strlen (nameref_cell (refvar)) as isize), subscript_start); - } - - /* We are committed to using the new name, so reset */ - if offset !=0 { - /* Rebuild assignment and restore offset and value */ - if (aflags & ASS_APPEND!()) !=0 { - *(name.offset( namelen as isize) as * mut c_char) = '+' as c_char; - - namelen+=1; - } - *(name.offset( namelen as isize) as * mut c_char) = '=' as c_char; - // *((name as usize + namelen as usize) as * mut c_char) = '=' as c_char; - namelen+=1; - - if value != std::ptr::null_mut() && (*value) !=0 { - libc::strcpy (name.offset(namelen as isize), value); - } else { - *(name.offset( namelen as isize) as * mut c_char) = '\0' as c_char; - } - - offset = assignment (name, 0); - /* if offset was valid previously, but the substituting - of the nameref value results in an invalid assignment, - throw an invalid identifier error */ - if offset == 0 { - libc::free (oldname as * mut c_void); - sh_invalidid (name); - assign_error+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - *(name.offset(offset as isize)) = '\0' as c_char; - - value = name.offset(namelen as isize) ; - } - libc::free (oldname as * mut c_void); - - /* OK, let's turn off the nameref attribute. - Now everything else applies to VAR. */ - if (flags_off & att_nameref!()) !=0 { - VUNSETATTR (refvar, att_nameref!()); - } - - //goto restart_new_var_name; - continue 'inner; - /* NOTREACHED */ - } - } - if var == std::ptr::null_mut() { - var = r_declare_find_variable (name, mkglobal, chklocal); - } - - var_exists = (var != std::ptr::null_mut()) as i32; - array_exists = (var != std::ptr::null_mut() && (array_p (var) !=0 || assoc_p (var) !=0 )) as i32; - creating_array = flags_on & (att_array!()|att_assoc!()); - - if var == std::ptr::null_mut() { - if (flags_on & att_assoc!()) !=0 { - var = make_new_assoc_variable (name); - if var != std::ptr::null_mut() && offset == 0 { - VSETATTR (var, att_invisible!()); - } - } else if (flags_on & att_array!()) !=0 || making_array_special !=0 { - var = make_new_array_variable (name); - if var != std::ptr::null_mut() && offset == 0 { - VSETATTR (var, att_invisible!()); - } - } else { - if mkglobal !=0 { - var=bind_global_variable (name, std::ptr::null_mut(), ASS_FORCE!()); - } else { - var= bind_variable (name, std::ptr::null_mut(), ASS_FORCE!()); - } - if var != std::ptr::null_mut() && offset == 0 { - VSETATTR (var, att_invisible!()); - } - } - - if var == std::ptr::null_mut() { - /* Has to appear in brackets */ - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - created_var = 1; - } else if (array_p (var) !=0 || assoc_p (var) !=0 ) && (flags_on & att_nameref!()) !=0 { - /* Can't take an existing array variable and make it a nameref */ - builtin_error (CString::new("%s: reference variable cannot be an array").unwrap().as_ptr(), name); - assign_error+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } else if nameref_p (var) !=0 && (flags_on & att_nameref!()) == 0 && (flags_off & att_nameref!()) == 0 && offset !=0 && valid_nameref_value (value, 1) == 0 { - builtin_error (CString::new("`%s': invalid variable name for name reference").unwrap().as_ptr(), value); - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } else if (flags_on & att_nameref!()) !=0 { - /* Check of offset is to allow an assignment to a nameref var as - part of the declare word to override existing value */ - if nameref_p (var) == 0 && var_isset (var) && offset == 0 && valid_nameref_value (value_cell (var), 0) == 0 { - builtin_error (CString::new("`%s': invalid variable name for name reference").unwrap().as_ptr(), value_cell (var)); - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - - if readonly_p (var) !=0 { - sh_readonly (name); - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - /* ksh93 compat: turning on nameref attribute turns off -ilu */ - VUNSETATTR (var, att_integer!()|att_uppercase!()|att_lowercase!()|att_capcase!()); - } - - /* Cannot use declare +r to turn off readonly attribute. */ - if readonly_p (var) !=0 && (flags_off & att_readonly!()) !=0 { - sh_readonly ((*var).name); - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - - /* Cannot use declare to assign value to readonly or noassign - variable. */ - if (readonly_p (var) !=0 || noassign_p (var)!=0 ) && offset !=0 { - if readonly_p (var) !=0 { - sh_readonly (name); - } - assign_error+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - - /* make declare a[2]=foo as similar to a[2]=foo as possible if - a is already an array or assoc variable. */ - if array_subscript_assignment && array_exists !=0 && creating_array == 0 { - simple_array_assign = 1; - } else if (making_array_special !=0 || creating_array !=0 || array_exists !=0) && offset!=0 { - let mut vlen:i32; - vlen = libc::strlen (value) as i32; - /*itrace("declare_builtin: name = %s value = %s flags = %d", name, value, wflags);*/ - if shell_compatibility_level > 43 && (wflags & W_COMPASSIGN!()) == 0 && *value == '(' as c_char && *(value.offset((vlen-1) as isize) as * mut c_char) == ')' as c_char { - /* The warning is only printed when using compound assignment - to an array variable that doesn't already exist. We use - creating_array to allow things like - declare -a foo$bar='(abc)' to work. */ - if array_exists == 0 && creating_array == 0 { - internal_warning (CString::new("%s: quoted compound array assignment deprecated").unwrap().as_ptr(), (*(*list).word).word); - } - compound_array_assign = (array_exists !=0 || creating_array !=0) as i32; - simple_array_assign = making_array_special; - } else if *value == '(' as c_char && *(value.offset((vlen-1) as isize) as * mut c_char) == ')' as c_char && (shell_compatibility_level < 44 || (wflags & W_COMPASSIGN!()) !=0 ) { - compound_array_assign = 1; - } else { - simple_array_assign = 1; - } - } - - /* Cannot use declare +a name or declare +A name to remove an - array variable. */ - if ((flags_off & att_array!()) !=0 && array_p (var) !=0) || ((flags_off & att_assoc!()) !=0 && assoc_p (var) !=0) { - builtin_error (CString::new("%s: cannot destroy array variables in this way").unwrap().as_ptr(), name); - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - - if (flags_on & att_array!()) !=0 && assoc_p (var) !=0 { - builtin_error (CString::new("%s: cannot convert associative to indexed array").unwrap().as_ptr(), name); - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - - if (flags_on & att_assoc!()) !=0 && array_p (var) !=0 { - builtin_error (CString::new("%s: cannot convert indexed to associative array").unwrap().as_ptr(), name); - any_failed+=1; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - - /* declare -A name[[n]] makes name an associative array variable. */ - if (flags_on & att_assoc!()) !=0 { - if assoc_p (var) == 0 { - var = convert_var_to_assoc (var); - } - } else if (making_array_special !=0 || (flags_on & att_array!()) !=0 ) && array_p (var) == 0 && assoc_p (var) == 0 { - /* declare -a name[[n]] or declare name[n] makes name an indexed - array variable. */ - var = convert_var_to_array (var); - } - - /* XXX - we note that we are turning on nameref attribute and defer - setting it until the assignment has been made so we don't do an - inadvertent nameref lookup. Might have to do the same thing for - flags_off&att_nameref. */ - /* XXX - ksh93 makes it an error to set a readonly nameref variable - using a single typeset command. */ - onref = flags_on & att_nameref!(); - flags_on &= !att_nameref!(); - - if array_p (var) !=0 || assoc_p (var) !=0 || (offset !=0 && compound_array_assign !=0) || simple_array_assign !=0 { - onref = 0; /* array variables may not be namerefs */ - } - /* ksh93 seems to do this */ - offref = flags_off & att_nameref!(); - flags_off &= !att_nameref!(); - - VSETATTR (var, flags_on); - VUNSETATTR (var, flags_off); - - if offset !=0 && compound_array_assign !=0 { - assign_array_var_from_string (var, value, aflags|ASS_FORCE!()); - } else if simple_array_assign !=0 && subscript_start !=std::ptr::null_mut() { - let mut local_aflags:i32; - /* declare [-aA] name[N]=value */ - *subscript_start = '[' as c_char; /* ] */ - /* XXX - problem here with appending */ - local_aflags = aflags&ASS_APPEND!(); - if assoc_noexpand { - local_aflags |= ASS_NOEXPAND!(); - } else { - local_aflags |= 0; - } - - var = assign_array_element (name, value, local_aflags); /* XXX - not aflags */ - *subscript_start = '\0' as c_char; - if var == std::ptr::null_mut() {/* some kind of assignment error */ - assign_error+=1; - flags_on |= onref; - flags_off |= offref; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - } else if simple_array_assign !=0 { - /* let bind_{array,assoc}_variable take care of this. */ - if assoc_p (var) !=0 { - bind_assoc_variable (var, name, r_savestring (CString::new("0").unwrap().as_ptr()), value, aflags|ASS_FORCE!()); - } else { - bind_array_variable (name, 0, value, aflags|ASS_FORCE!()); - } - } else if offset !=0 { - /* XXX - no ASS_FORCE here */ - /* bind_variable_value duplicates the essential internals of bind_variable() */ - if onref !=0 || nameref_p (var) !=0 { - aflags |= ASS_NAMEREF!(); - } - - v = bind_variable_value (var, value, aflags); - if v == std::ptr::null_mut() && (onref !=0 || nameref_p (var) !=0) { - if valid_nameref_value (value, 1) == 0 { - sh_invalidid (value); - } - - assign_error+=1; - /* XXX - unset this variable? or leave it as normal var? */ - if created_var !=0 { - if mkglobal !=0 { - delete_var ( (*var).name, global_variables); - } else { - delete_var ( (*var).name, shell_variables); - } - } - - flags_on |= onref;/* undo change from above */ - flags_off |= offref; - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - } - - /* If we found this variable in the temporary environment, as with - `var=value declare -x var', make sure it is treated identically - to `var=value export var'. Do the same for `declare -r' and - `readonly'. Preserve the attributes, except for att_tempvar. */ - /* XXX -- should this create a variable in the global scope, or - modify the local variable flags? ksh93 has it modify the - global scope. - Need to handle case like in set_var_attribute where a temporary - variable is in the same table as the function local vars. */ - if (flags_on & (att_exported!()|att_readonly!()) !=0 ) && tempvar_p (var) !=0 { - let mut tv:* mut SHELL_VAR; - let mut tvalue:* mut c_char=std::ptr::null_mut(); - - tv = find_tempenv_variable ((*var).name); - if tv != std::ptr::null_mut() { - if var_isset(var) { - tvalue = r_savestring (value_cell (var)); - } else { - tvalue = r_savestring (CString::new("").unwrap().as_ptr()); - } - tv = bind_variable ((*var).name, tvalue, 0); - - if tv != std::ptr::null_mut() { - (*tv).attributes |= (*var).attributes & !att_tempvar!(); - if (*tv).context > 0 { - VSETATTR (tv, att_propagate!()); - } - } - libc::free (tvalue as * mut c_void); - } - VSETATTR (var, att_propagate!()); - } - } - - /* Turn on nameref attribute we deferred above. */ - /* XXX - should we turn on the noassign attribute for consistency with - ksh93 when we turn on the nameref attribute? */ - VSETATTR (var, onref); - flags_on |= onref; - VUNSETATTR (var, offref); - flags_off |= offref; - /* Yuck. ksh93 compatibility. XXX - need to investigate more but - definitely happens when turning off nameref attribute on nameref - (see comments above). Under no circumstances allow this to turn - off readonly attribute on readonly nameref variable. */ - if refvar !=std::ptr::null_mut() { - if (flags_off & att_readonly!()) !=0 { - flags_off &= !att_readonly!(); - } - VUNSETATTR (refvar, flags_off); - } - stupidly_hack_special_variables (name); - libc::free (name as * mut c_void); - list = (*list).next; - continue 'outter; - } - } - if assign_error !=0 { - return EX_BADASSIGN!(); - } else { - if any_failed == 0 { - return EXECUTION_SUCCESS!(); - } else { - return EXECUTION_FAILURE!(); - } - } -} + } } diff --git a/bash-5.1/builtins_rust/echo/src/lib.rs b/bash-5.1/builtins_rust/echo/src/lib.rs index fc9b8bcc5c3882caffeccc5d64814eaed50d7969..62fb8bf458f1168ae941e5b03f2b79713422f7f8 100644 --- a/bash-5.1/builtins_rust/echo/src/lib.rs +++ b/bash-5.1/builtins_rust/echo/src/lib.rs @@ -5,10 +5,10 @@ extern crate libc; use libc::{c_char,c_int, strchr, putchar,clearerr,free,FILE, fprintf, c_void}; use std::ffi::{CString,CStr,}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; +use rcommon::{WordList, EXECUTION_SUCCESS}; // use std::io::{stdout, Write}; use std::ptr::read_volatile; -use rhelp::r_builtin_help; + //结构体 //枚举 diff --git a/bash-5.1/builtins_rust/enable/src/lib.rs b/bash-5.1/builtins_rust/enable/src/lib.rs index be00f19fb6035208d7dd7f1febf1232919bc1781..5fc3d824bba624c9a82101a54f16c039fcffff46 100644 --- a/bash-5.1/builtins_rust/enable/src/lib.rs +++ b/bash-5.1/builtins_rust/enable/src/lib.rs @@ -1,14 +1,14 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use std::ffi::{CString,CStr}; +use std::ffi::{CStr, CString}; extern crate rcmd; use libc::c_char; -use std::path::Path; use libloading::Library; use rcmd::*; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; +use rcommon::{WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; +use std::path::Path; /* #define ENABLED 1 #define DISABLED 2 @@ -32,8 +32,7 @@ pub const NFLAG: i32 = 0x08; pub const PFLAG: i32 = 0x10; pub const SFLAG: i32 = 0x20; - -// Flags describing various things about a builtin. +// Flags describing various things about a builtin. //#define BUILTIN_ENABLED 0x01 /* This builtin is enabled. */ //#define BUILTIN_DELETED 0x02 /* This has been deleted with enable -d. */ //#define STATIC_BUILTIN 0x04 /* This builtin is not dynamically loaded. */ @@ -44,15 +43,14 @@ pub const SFLAG: i32 = 0x20; //#define REQUIRES_BUILTIN 0x80 /* This builtin requires other files. */ //#define BASE_INDENT 4 -pub const BUILTIN_ENABLED :i32 = 0x01; -pub const BUILTIN_DELETED :i32 = 0x02; -pub const STATIC_BUILTIN :i32 = 0x04; -pub const SPECIAL_BUILTIN :i32 = 0x08; -pub const ASSIGNMENT_BUILTIN :i32 = 0x10; -pub const POSIX_BUILTIN :i32 = 0x20; -pub const LOCALVAR_BUILTIN :i32 = 0x40; -pub const REQUIRES_BUILTIN :i32 = 0x80; - +pub const BUILTIN_ENABLED: i32 = 0x01; +pub const BUILTIN_DELETED: i32 = 0x02; +pub const STATIC_BUILTIN: i32 = 0x04; +pub const SPECIAL_BUILTIN: i32 = 0x08; +pub const ASSIGNMENT_BUILTIN: i32 = 0x10; +pub const POSIX_BUILTIN: i32 = 0x20; +pub const LOCALVAR_BUILTIN: i32 = 0x40; +pub const REQUIRES_BUILTIN: i32 = 0x80; /* The MODE argument to `dlopen' contains one of the following: */ // #define RTLD_LAZY 0x00001 /* Lazy function call binding. */ @@ -60,21 +58,20 @@ pub const REQUIRES_BUILTIN :i32 = 0x80; // #define RTLD_BINDING_MASK 0x3 /* Mask of binding time value. */ // #define RTLD_NOLOAD 0x00004 /* Do not load the object. */ // #define RTLD_DEEPBIND 0x00008 /* Use deep binding. */ - /* If the following bit is set in the MODE argument to `dlopen', - the symbols of the loaded object and its dependencies are made - visible as if the object were linked directly into the program. */ +the symbols of the loaded object and its dependencies are made +visible as if the object were linked directly into the program. */ // #define RTLD_GLOBAL 0x00100 -pub const RTLD_LAZY :i32 = 0x00001; -pub const RTLD_NOW :i32 = 0x00002; -pub const RTLD_BINDING_MASK :i32 = 0x3; -pub const RTLD_NOLOAD :i32 = 0x00004; -pub const RTLD_DEEPBIND :i32 = 0x00008; -pub const RTLD_GLOBAL :i32 = 0x00100; +pub const RTLD_LAZY: i32 = 0x00001; +pub const RTLD_NOW: i32 = 0x00002; +pub const RTLD_BINDING_MASK: i32 = 0x3; +pub const RTLD_NOLOAD: i32 = 0x00004; +pub const RTLD_DEEPBIND: i32 = 0x00008; +pub const RTLD_GLOBAL: i32 = 0x00100; -pub const FS_NODIRS :i32 = 0x20; -pub const FS_EXEC_PREFERRED :i32 = 0x4; +pub const FS_NODIRS: i32 = 0x20; +pub const FS_EXEC_PREFERRED: i32 = 0x4; extern "C" { fn printf(_: *const libc::c_char, _: ...) -> libc::c_int; @@ -117,10 +114,7 @@ extern "C" { fn set_itemlist_dirty(_: *mut ITEMLIST); fn dlopen(__file: *const libc::c_char, __mode: libc::c_int) -> *mut libc::c_void; fn dlclose(__handle: *mut libc::c_void) -> libc::c_int; - fn dlsym( - __handle: *mut libc::c_void, - __name: *const libc::c_char, - ) -> *mut libc::c_void; + fn dlsym(__handle: *mut libc::c_void, __name: *const libc::c_char) -> *mut libc::c_void; fn dlerror() -> *mut libc::c_char; } pub type size_t = libc::c_ulong; @@ -139,7 +133,7 @@ pub type STRINGLIST = _list_of_strings; #[repr(C)] pub struct builtin { pub name: *mut libc::c_char, - pub function: Option::, + pub function: Option, pub flags: libc::c_int, pub long_doc: *const *mut libc::c_char, pub short_doc: *const libc::c_char, @@ -149,7 +143,7 @@ pub struct builtin { #[repr(C)] pub struct _list_of_items { pub flags: libc::c_int, - pub list_getter: Option:: libc::c_int>, + pub list_getter: Option libc::c_int>, pub slist: *mut STRINGLIST, pub genlist: *mut STRINGLIST, pub genindex: libc::c_int, @@ -163,9 +157,9 @@ pub unsafe extern "C" fn r_enable_builtin(mut list: *mut WordList) -> i32 { let mut filter: i32 = 0; let mut filename: *mut libc::c_char = 0 as *mut libc::c_char; reset_internal_getopt(); - let adnpsf = CString::new("adnpsf").expect("CString::new failed");; + let adnpsf = CString::new("adnpsf").expect("CString::new failed"); loop { - opt = internal_getopt(list, adnpsf.as_ptr() ); + opt = internal_getopt(list, adnpsf.as_ptr()); if !(opt != -1) { break; } @@ -191,7 +185,7 @@ pub unsafe extern "C" fn r_enable_builtin(mut list: *mut WordList) -> i32 { flags |= DFLAG; } _ => { - if opt ==-99 { + if opt == -99 { r_builtin_help(); return EX_USAGE; } @@ -202,8 +196,8 @@ pub unsafe extern "C" fn r_enable_builtin(mut list: *mut WordList) -> i32 { } list = loptend; // 如果是严格模式,就直接返回EXECUTION_FAILURE,命令结束。 - if restricted != 0 && flags & (FFLAG|DFLAG) != 0 { - sh_restricted (0 as *mut c_char); + if restricted != 0 && flags & (FFLAG | DFLAG) != 0 { + sh_restricted(0 as *mut c_char); return EXECUTION_FAILURE!(); } @@ -213,11 +207,12 @@ pub unsafe extern "C" fn r_enable_builtin(mut list: *mut WordList) -> i32 { // 否则判断是否带-N // 带则打印DISABLED的,不带—N则打印ENABLED的 if list.is_null() || flags & PFLAG != 0 { - filter = if flags & AFLAG != 0 { ENABLED | DISABLED } - else if flags & NFLAG != 0 { + filter = if flags & AFLAG != 0 { + ENABLED | DISABLED + } else if flags & NFLAG != 0 { DISABLED } else { - ENABLED + ENABLED }; if flags & SFLAG != 0 { @@ -225,10 +220,9 @@ pub unsafe extern "C" fn r_enable_builtin(mut list: *mut WordList) -> i32 { } list_some_builtins(filter); - } else if flags & FFLAG != 0 { - // 如果不带-N或者参数不为空,那么判断-F.(bash源文件中判断HAVE_DLSYM,HAVE_DLOPEN两个宏存在) - // -F后面需要加文件名,载入so,作为内建命令 + // 如果不带-N或者参数不为空,那么判断-F.(bash源文件中判断HAVE_DLSYM,HAVE_DLOPEN两个宏存在) + // -F后面需要加文件名,载入so,作为内建命令 //判断是ENABLED还是DISABLED filter = if flags & NFLAG != 0 { @@ -244,12 +238,11 @@ pub unsafe extern "C" fn r_enable_builtin(mut list: *mut WordList) -> i32 { //载入so result = dyn_load_builtin(list, filter, filename); - + // 设置完成,bash源代码中判断PROGRAMMABLE_COMPLETION set_itemlist_dirty(&mut it_builtins); - } else if flags & DFLAG != 0 { - // 否则判断-D,-D含义是删除以 -f 选项加载的内建 + // 否则判断-D,-D含义是删除以 -f 选项加载的内建 while !list.is_null() { opt = dyn_unload_builtin((*(*list).word).word); if opt == EXECUTION_FAILURE!() { @@ -258,9 +251,8 @@ pub unsafe extern "C" fn r_enable_builtin(mut list: *mut WordList) -> i32 { list = (*list).next; } set_itemlist_dirty(&mut it_builtins); - } else { - // 不带-N -F -D,且选项不为空的其他 + // 不带-N -F -D,且选项不为空的其他 while !list.is_null() { opt = enable_shell_command((*(*list).word).word, flags & NFLAG); if opt == EXECUTION_FAILURE!() { @@ -278,26 +270,22 @@ unsafe extern "C" fn list_some_builtins(mut filter: libc::c_int) { let mut i: i32 = 0; while i < num_shell_builtins { - let tmpIter =*shell_builtins.offset(i as isize); - if !(tmpIter.function.is_none()||tmpIter.flags & BUILTIN_DELETED != 0) - { + let tmpIter = *shell_builtins.offset(i as isize); + if !(tmpIter.function.is_none() || tmpIter.flags & BUILTIN_DELETED != 0) { if !(filter & SPECIAL != 0 - && (*shell_builtins.offset(i as isize)).flags & SPECIAL_BUILTIN - == 0) + && (*shell_builtins.offset(i as isize)).flags & SPECIAL_BUILTIN == 0) { if filter & ENABLED != 0 - && (*shell_builtins.offset(i as isize)).flags & BUILTIN_ENABLED - != 0 + && (*shell_builtins.offset(i as isize)).flags & BUILTIN_ENABLED != 0 { - let name= unsafe{CStr::from_ptr((*shell_builtins.offset(i as isize)).name)}; + let name = unsafe { CStr::from_ptr((*shell_builtins.offset(i as isize)).name) }; println!("enable {}", name.to_str().expect("name cannot trans")); } else if filter & DISABLED != 0 - && (*shell_builtins.offset(i as isize)).flags - & BUILTIN_ENABLED == 0 as libc::c_int - { - let name= unsafe{CStr::from_ptr((*shell_builtins.offset(i as isize)).name)}; - println!("enable -n {}", name.to_str().expect("name cannot trans")); - + && (*shell_builtins.offset(i as isize)).flags & BUILTIN_ENABLED + == 0 as libc::c_int + { + let name = unsafe { CStr::from_ptr((*shell_builtins.offset(i as isize)).name) }; + println!("enable -n {}", name.to_str().expect("name cannot trans")); } } } @@ -329,7 +317,7 @@ unsafe extern "C" fn enable_shell_command( insert_empty_cmd(CStr::from_ptr(name).to_string_lossy().into_owned()); set_cmd_enable(CStr::from_ptr(name).to_string_lossy().into_owned(), true); } - } + } set_itemlist_dirty(&mut it_enabled); set_itemlist_dirty(&mut it_disabled); return EXECUTION_SUCCESS!(); @@ -349,7 +337,7 @@ unsafe extern "C" fn dyn_load_builtin( let mut struct_name: *mut libc::c_char = 0 as *mut libc::c_char; let mut name: *mut libc::c_char = 0 as *mut libc::c_char; let mut funcname: *mut libc::c_char = 0 as *mut libc::c_char; - let mut loadfunc: Option:: = None; + let mut loadfunc: Option = None; let mut new_builtins: *mut *mut builtin = 0 as *mut *mut builtin; let mut b: *mut builtin = 0 as *mut builtin; let mut new_shell_builtins: *mut builtin = 0 as *mut builtin; @@ -361,9 +349,8 @@ unsafe extern "C" fn dyn_load_builtin( } handle = 0 as *mut libc::c_void; if absolute_program(filename) == 0 as libc::c_int { - loadables_path = get_string_value( - b"BASH_LOADABLES_PATH\0" as *const u8 as *const libc::c_char, - ); + loadables_path = + get_string_value(b"BASH_LOADABLES_PATH\0" as *const u8 as *const libc::c_char); if !loadables_path.is_null() { load_path = find_in_path( filename, @@ -384,8 +371,7 @@ unsafe extern "C" fn dyn_load_builtin( builtin_error( dcgettext( 0 as *const libc::c_char, - b"cannot open shared object %s: %s\0" as *const u8 - as *const libc::c_char, + b"cannot open shared object %s: %s\0" as *const u8 as *const libc::c_char, 5 as libc::c_int, ), name, @@ -403,8 +389,7 @@ unsafe extern "C" fn dyn_load_builtin( new += 1; } new_builtins = xmalloc( - (new as libc::c_ulong) - .wrapping_mul(::std::mem::size_of::<*mut builtin>() as libc::c_ulong), + (new as libc::c_ulong).wrapping_mul(::std::mem::size_of::<*mut builtin>() as libc::c_ulong), ) as *mut *mut builtin; let mut current_block_57: u64; new = 0 as libc::c_int; @@ -425,8 +410,7 @@ unsafe extern "C" fn dyn_load_builtin( builtin_error( dcgettext( 0 as *const libc::c_char, - b"cannot find %s in shared object %s: %s\0" as *const u8 - as *const libc::c_char, + b"cannot find %s in shared object %s: %s\0" as *const u8 as *const libc::c_char, 5 as libc::c_int, ), struct_name, @@ -441,9 +425,7 @@ unsafe extern "C" fn dyn_load_builtin( funcname = xrealloc( struct_name as *mut libc::c_void, (size as libc::c_ulong) - .wrapping_add( - ::std::mem::size_of::<[libc::c_char; 14]>() as libc::c_ulong, - ) + .wrapping_add(::std::mem::size_of::<[libc::c_char; 14]>() as libc::c_ulong) .wrapping_add(1 as libc::c_int as libc::c_ulong), ) as *mut libc::c_char; strcpy(funcname, name); @@ -451,10 +433,9 @@ unsafe extern "C" fn dyn_load_builtin( funcname.offset(size as isize), b"_builtin_load\0" as *const u8 as *const libc::c_char, ); - loadfunc = ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(dlsym(handle, funcname)); + loadfunc = ::std::mem::transmute::<*mut libc::c_void, Option>(dlsym( + handle, funcname, + )); if loadfunc.is_some() { if !old_builtin.is_null() && (*old_builtin).flags & 0x4 as libc::c_int == 0 as libc::c_int @@ -475,8 +456,8 @@ unsafe extern "C" fn dyn_load_builtin( builtin_error( dcgettext( 0 as *const libc::c_char, - b"load function for %s returns failure (%d): not loaded\0" - as *const u8 as *const libc::c_char, + b"load function for %s returns failure (%d): not loaded\0" as *const u8 + as *const libc::c_char, 5 as libc::c_int, ), name, @@ -505,8 +486,7 @@ unsafe extern "C" fn dyn_load_builtin( libc::memcpy( old_builtin as *mut libc::c_char as *mut libc::c_void, b as *mut libc::c_char as *const libc::c_void, - ::std::mem::size_of::() as libc::c_ulong - as libc::size_t, + ::std::mem::size_of::() as libc::c_ulong as libc::size_t, ); } else { let fresh1 = new; @@ -542,8 +522,7 @@ unsafe extern "C" fn dyn_load_builtin( libc::memcpy( &mut *new_shell_builtins.offset((num_shell_builtins + replaced) as isize) as *mut builtin as *mut libc::c_char as *mut libc::c_void, - *new_builtins.offset(replaced as isize) as *mut libc::c_char - as *const libc::c_void, + *new_builtins.offset(replaced as isize) as *mut libc::c_char as *const libc::c_void, ::std::mem::size_of::() as libc::c_ulong as libc::size_t, ); replaced += 1; @@ -575,14 +554,13 @@ unsafe extern "C" fn delete_builtin(mut b: *mut builtin) { libc::memcpy( new_shell_builtins as *mut libc::c_char as *mut libc::c_void, shell_builtins as *mut libc::c_char as *const libc::c_void, - (ind as libc::c_ulong) - .wrapping_mul(::std::mem::size_of::() as libc::c_ulong) + (ind as libc::c_ulong).wrapping_mul(::std::mem::size_of::() as libc::c_ulong) as libc::size_t, ); } libc::memcpy( - &mut *new_shell_builtins.offset(ind as isize) as *mut builtin - as *mut libc::c_char as *mut libc::c_void, + &mut *new_shell_builtins.offset(ind as isize) as *mut builtin as *mut libc::c_char + as *mut libc::c_void, &mut *shell_builtins.offset((ind + 1 as libc::c_int) as isize) as *mut builtin as *mut libc::c_char as *const libc::c_void, ((num_shell_builtins - ind) as libc::c_ulong) @@ -602,7 +580,7 @@ unsafe extern "C" fn dyn_unload_builtin(mut name: *mut libc::c_char) -> libc::c_ let mut b: *mut builtin = 0 as *mut builtin; let mut handle: *mut libc::c_void = 0 as *mut libc::c_void; let mut funcname: *mut libc::c_char = 0 as *mut libc::c_char; - let mut unloadfunc: Option:: = None; + let mut unloadfunc: Option = None; let mut ref_0: libc::c_int = 0; let mut i: libc::c_int = 0; let mut size: libc::c_int = 0; @@ -642,13 +620,13 @@ unsafe extern "C" fn dyn_unload_builtin(mut name: *mut libc::c_char) -> libc::c_ funcname.offset(size as isize), b"_builtin_unload\0" as *const u8 as *const libc::c_char, ); - unloadfunc = ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(dlsym(handle, funcname)); + unloadfunc = ::std::mem::transmute::<*mut libc::c_void, Option>(dlsym( + handle, funcname, + )); if unloadfunc.is_some() { - (Some(unloadfunc.expect("non-null function pointer"))) - .expect("no-null function pointer")(name); + (Some(unloadfunc.expect("non-null function pointer"))).expect("no-null function pointer")( + name, + ); } free(funcname as *mut libc::c_void); if ref_0 == 1 as libc::c_int && local_dlclose(handle) != 0 as libc::c_int { diff --git a/bash-5.1/builtins_rust/eval/src/lib.rs b/bash-5.1/builtins_rust/eval/src/lib.rs index bde54e670598a6e569c7f56ae70be810f3b1f3ef..398a6fc381cebdc63bd644d356e319e28faeaa3f 100644 --- a/bash-5.1/builtins_rust/eval/src/lib.rs +++ b/bash-5.1/builtins_rust/eval/src/lib.rs @@ -1,34 +1,33 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later extern crate libc; extern crate rcommon; -use libc::{c_char,c_int}; -use std::ffi::{CString}; -use rcommon::{r_no_options}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; -use rhelp::r_builtin_help; +use libc::c_char; +use rcommon::r_no_options; +use rcommon::{WordList, EXECUTION_SUCCESS, EX_USAGE}; +use std::ffi::CString; #[macro_export] macro_rules! SEVAL_NOHIST { - () => {0x004} + () => { + 0x004 + }; } - extern "C" { - static loptend:*mut WordList; + static loptend: *mut WordList; // fn no_options(list:*mut WordList)->i32; - fn evalstring(string:*mut c_char,from_file:*const c_char,flag:i32)->i32; - fn string_list(list:*mut WordList)->*mut c_char; + fn evalstring(string: *mut c_char, from_file: *const c_char, flag: i32) -> i32; + fn string_list(list: *mut WordList) -> *mut c_char; } #[no_mangle] -pub extern "C" fn r_eval_builtin(mut list:*mut WordList)->i32{ - - unsafe{ - if r_no_options(list) != 0{ +pub extern "C" fn r_eval_builtin(mut list: *mut WordList) -> i32 { + unsafe { + if r_no_options(list) != 0 { return EX_USAGE; } @@ -37,13 +36,11 @@ pub extern "C" fn r_eval_builtin(mut list:*mut WordList)->i32{ if !list.is_null() { let c_str = CString::new("eval").unwrap(); let c_ptr = c_str.as_ptr(); - return evalstring(string_list(list),c_ptr,SEVAL_NOHIST!()); - } - else{ + return evalstring(string_list(list), c_ptr, SEVAL_NOHIST!()); + } else { return EXECUTION_SUCCESS!(); } } - } #[cfg(test)] diff --git a/bash-5.1/builtins_rust/exec/src/lib.rs b/bash-5.1/builtins_rust/exec/src/lib.rs index cf21ea48a733e0b08fbb091742abce27da78a3ef..4edefab0f30787f2dd5b1a1f21f05105daa8fcd9 100644 --- a/bash-5.1/builtins_rust/exec/src/lib.rs +++ b/bash-5.1/builtins_rust/exec/src/lib.rs @@ -1,33 +1,36 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later extern crate libc; extern crate nix; extern crate rcommon; -use libc::{c_char,c_int, strlen, strcpy, size_t, c_void, free}; -use std::ffi::{CString,CStr}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN,r_builtin_usage, r_savestring}; +use libc::{c_char, c_int, c_void, free, size_t, strcpy, strlen}; use nix::errno::errno; use rcommon::r_sh_restricted; +use rcommon::{ + r_builtin_usage, r_savestring, WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, + EX_NOEXEC, EX_NOTFOUND, EX_USAGE, SUBSHELL_PAREN, +}; use rhelp::r_builtin_help; +use std::ffi::{CStr, CString}; #[repr(C)] -struct redirect{ - next:*mut redirect, - redirector:REDIRECTEE, - rflags:i32, - flags:i32, - insturction:r_instruction, - redirectee:REDIRECTEE, - here_doc_eof:*mut c_char, +struct redirect { + next: *mut redirect, + redirector: REDIRECTEE, + rflags: i32, + flags: i32, + insturction: r_instruction, + redirectee: REDIRECTEE, + here_doc_eof: *mut c_char, } type REDIRECT = redirect; -#[repr (C)] +#[repr(C)] union REDIRECTEE { - dest:i32, - filename:*mut WordDesc, + dest: i32, + filename: *mut WordDesc, } pub type r_instruction = libc::c_uint; @@ -52,109 +55,111 @@ pub const r_inputa_direction: r_instruction = 2; pub const r_input_direction: r_instruction = 1; pub const r_output_direction: r_instruction = 0; - #[macro_export] macro_rules! FREE { ($s:expr) => { - if ($s) != std::ptr::null_mut(){ + if ($s) != std::ptr::null_mut() { free($s); } - } + }; } extern "C" { // static errno:i32; - static mut exec_argv0:*mut c_char; - static list_optarg:*mut c_char; - static loptend:*mut WordList; - static mut redirection_undo_list:*mut REDIRECT; - static restricted:i32; + static mut exec_argv0: *mut c_char; + static list_optarg: *mut c_char; + static loptend: *mut WordList; + static mut redirection_undo_list: *mut REDIRECT; + static restricted: i32; // static comsub_ignore_return:i32; - static export_env:*mut *mut c_char; - static interactive_shell:i32; - static subshell_environment:i32; - static job_control:i32; - static interactive:i32; - static default_buffered_input:i32; - static no_exit_on_failed_exec:i32; - fn xmalloc(n:size_t)->*mut c_void; + static export_env: *mut *mut c_char; + static interactive_shell: i32; + static subshell_environment: i32; + static job_control: i32; + static interactive: i32; + static default_buffered_input: i32; + static no_exit_on_failed_exec: i32; + fn xmalloc(n: size_t) -> *mut c_void; fn reset_internal_getopt(); - fn internal_getopt(list:*mut WordList,opts:*mut c_char)->i32; + fn internal_getopt(list: *mut WordList, opts: *mut c_char) -> i32; // fn builtin_usage(); - fn dispose_redirects(list:*mut REDIRECT); + fn dispose_redirects(list: *mut REDIRECT); // fn sh_restricted(s:*mut c_char); - fn strvec_from_word_list(list:*mut WordList,alloc:i32,starting_index:i32,ip:*mut i32)->*mut *mut c_char; - fn absolute_program(string:*const c_char)->i32; - fn search_for_command(pathname:*const c_char,flags:i32)->*mut c_char; - fn file_isdir(f:*const c_char)->i32; - fn builtin_error(format:*const c_char,...); - fn strerror(e:i32)->*mut c_char; - fn sh_notfound(s:*mut c_char); - fn full_pathname(file:*mut c_char)->*mut c_char; - fn adjust_shell_level(change:i32); - fn strvec_create(n:i32)->*mut *mut c_char; + fn strvec_from_word_list( + list: *mut WordList, + alloc: i32, + starting_index: i32, + ip: *mut i32, + ) -> *mut *mut c_char; + fn absolute_program(string: *const c_char) -> i32; + fn search_for_command(pathname: *const c_char, flags: i32) -> *mut c_char; + fn file_isdir(f: *const c_char) -> i32; + fn builtin_error(format: *const c_char, ...); + fn strerror(e: i32) -> *mut c_char; + fn sh_notfound(s: *mut c_char); + fn full_pathname(file: *mut c_char) -> *mut c_char; + fn adjust_shell_level(change: i32); + fn strvec_create(n: i32) -> *mut *mut c_char; fn maybe_make_export_env(); - fn maybe_save_shell_history()->i32; + fn maybe_save_shell_history() -> i32; fn restore_original_signals(); fn end_job_control(); fn default_tty_job_signals(); - fn sync_buffered_stream(bfd:i32)->i32; - fn shell_execve(command:*mut c_char,args:*mut *mut c_char,env:*mut *mut c_char)->i32; - fn executable_file(file:*const c_char)->i32; - fn file_error(filename:*mut c_char); - fn exit_shell(s:i32); - fn strvec_dispose(array:*mut *mut c_char); + fn sync_buffered_stream(bfd: i32) -> i32; + fn shell_execve(command: *mut c_char, args: *mut *mut c_char, env: *mut *mut c_char) -> i32; + fn executable_file(file: *const c_char) -> i32; + fn file_error(filename: *mut c_char); + fn exit_shell(s: i32); + fn strvec_dispose(array: *mut *mut c_char); fn initialize_traps(); - fn initialize_signals(reinit:i32); + fn initialize_signals(reinit: i32); fn restart_job_control(); } /* If the user wants this to look like a login shell, then - prepend a `-' onto NAME and return the new name. */ +prepend a `-' onto NAME and return the new name. */ #[no_mangle] -extern "C" fn r_mkdashname(name:*mut c_char)->*mut c_char{ - let ret:*mut c_char; +extern "C" fn r_mkdashname(name: *mut c_char) -> *mut c_char { + let ret: *mut c_char; - unsafe{ + unsafe { ret = xmalloc(2 + strlen(name)) as *mut c_char; *ret.offset(0) = '-' as libc::c_char; strcpy(ret.offset(1), name); return ret; } - -} - +} #[no_mangle] -pub extern "C" fn r_exec_builtin(mut list:*mut WordList)->i32{ - let mut exit_value ; - let mut cleanenv:i32 = 0; - let mut login:i32 = 0; - let mut opt:i32; - let mut orig_job_control:i32 = 0; - let mut argv0:*mut c_char = std::ptr::null_mut() as *mut c_char; - let mut command:*mut c_char; - let mut args:*mut *mut c_char; - let mut env:*mut *mut c_char; - let newname:*mut c_char; - let com2:*mut c_char; - - unsafe{ +pub extern "C" fn r_exec_builtin(mut list: *mut WordList) -> i32 { + let mut exit_value; + let mut cleanenv: i32 = 0; + let mut login: i32 = 0; + let mut opt: i32; + let mut orig_job_control: i32 = 0; + let mut argv0: *mut c_char = std::ptr::null_mut() as *mut c_char; + let mut command: *mut c_char; + let mut args: *mut *mut c_char; + let mut env: *mut *mut c_char; + let newname: *mut c_char; + let com2: *mut c_char; + + unsafe { exec_argv0 = std::ptr::null_mut() as *mut c_char; reset_internal_getopt(); - - loop{ + + loop { let c_str = CString::new("cla:").unwrap(); - opt = internal_getopt(list,c_str.as_ptr() as *mut c_char); - while opt != -1{ + opt = internal_getopt(list, c_str.as_ptr() as *mut c_char); + while opt != -1 { let optu8 = opt as u8; let opt_char = char::from(optu8); - match opt_char{ + match opt_char { 'c' => cleanenv = 1, 'l' => login = 1, 'a' => argv0 = list_optarg, - _ => { + _ => { if opt == -99 { r_builtin_help(); return EX_USAGE; @@ -163,169 +168,163 @@ pub extern "C" fn r_exec_builtin(mut list:*mut WordList)->i32{ return EX_USAGE; } } - - opt = internal_getopt(list,c_str.as_ptr() as *mut c_char); + + opt = internal_getopt(list, c_str.as_ptr() as *mut c_char); } - + list = loptend; - + /* First, let the redirections remain. */ dispose_redirects(redirection_undo_list); redirection_undo_list = std::ptr::null_mut() as *mut REDIRECT; - - if list.is_null(){ + + if list.is_null() { return EXECUTION_SUCCESS!(); } - if restricted != 0{ //限制性shell + if restricted != 0 { + //限制性shell // sh_restricted(std::ptr::null_mut() as *mut c_char); r_sh_restricted(std::ptr::null_mut() as *mut c_char); return EXECUTION_FAILURE!(); } - - args = strvec_from_word_list(list,1,0,0 as *mut c_int); //这个指针这样写不清楚可不可以 + + args = strvec_from_word_list(list, 1, 0, 0 as *mut c_int); //这个指针这样写不清楚可不可以 env = 0 as *mut *mut c_char; - + /* A command with a slash anywhere in its name is not looked up in $PATH. */ - if absolute_program(*args.offset(0)) != 0{ //命令给的绝对路径,或者执行脚本 + if absolute_program(*args.offset(0)) != 0 { + //命令给的绝对路径,或者执行脚本 command = (*args).offset(0); + } else { + //exec后直接给命令 + command = search_for_command(*args.offset(0), 1); + println!("command:{}", CStr::from_ptr(command).to_str().unwrap()); } - else { //exec后直接给命令 - command = search_for_command(*args.offset(0),1); - println!("command:{}",CStr::from_ptr(command).to_str().unwrap()); - } - - if command.is_null(){ - if file_isdir(*args.offset(0)) != 0{ + + if command.is_null() { + if file_isdir(*args.offset(0)) != 0 { let c_str = CString::new("%s: cannot execute: %s").unwrap(); let c_ptr = c_str.as_ptr(); - builtin_error(c_ptr,*args.offset(0),strerror(errno())); + builtin_error(c_ptr, *args.offset(0), strerror(errno())); exit_value = EX_NOEXEC; - } - else{ + } else { sh_notfound(*args.offset(0)); exit_value = EX_NOTFOUND; } //goto failed_exec; break; } - + com2 = full_pathname(command); - if !com2.is_null(){ - if command != *args.offset(0){ + if !com2.is_null() { + if command != *args.offset(0) { free(command as *mut c_void); } command = com2; } - - if !argv0.is_null(){ //exec有-a参数 + + if !argv0.is_null() { + //exec有-a参数 free(*args.offset(0) as *mut c_void); - if login != 0{ + if login != 0 { *args.offset(0) = r_mkdashname(argv0); - } - else { + } else { *args.offset(0) = r_savestring(argv0); } exec_argv0 = r_savestring(*args.offset(0)); - } - else if login != 0{ + } else if login != 0 { newname = r_mkdashname(*args.offset(0)); free(*args.offset(0) as *mut c_void); *args.offset(0) = newname; } - + /* Decrement SHLVL by 1 so a new shell started here has the same value, - preserving the appearance. After we do that, we need to change the - exported environment to include the new value. If we've already forked - and are in a subshell, we don't want to decrement the shell level, - since we are `increasing' the level */ - - if cleanenv == 0 && (subshell_environment & SUBSHELL_PAREN!() == 0){ + preserving the appearance. After we do that, we need to change the + exported environment to include the new value. If we've already forked + and are in a subshell, we don't want to decrement the shell level, + since we are `increasing' the level */ + + if cleanenv == 0 && (subshell_environment & SUBSHELL_PAREN!() == 0) { adjust_shell_level(-1); } - - if cleanenv != 0{ + + if cleanenv != 0 { env = strvec_create(1); *env.offset(0) = 0 as *mut c_char; - } - else{ + } else { maybe_make_export_env(); env = export_env; } - - if interactive_shell !=0 && subshell_environment == 0{ + + if interactive_shell != 0 && subshell_environment == 0 { maybe_save_shell_history(); } - + restore_original_signals(); - + orig_job_control = job_control; - if subshell_environment == 0{ + if subshell_environment == 0 { end_job_control(); } - if interactive != 0 || job_control != 0{ + if interactive != 0 || job_control != 0 { default_tty_job_signals(); } - - if default_buffered_input >= 0{ + + if default_buffered_input >= 0 { sync_buffered_stream(default_buffered_input); } - - exit_value = shell_execve(command,args,env); - + + exit_value = shell_execve(command, args, env); + /* We have to set this to NULL because shell_execve has called realloc() - to stuff more items at the front of the array, which may have caused - the memory to be freed by realloc(). We don't want to free it twice. */ - + to stuff more items at the front of the array, which may have caused + the memory to be freed by realloc(). We don't want to free it twice. */ + args = std::ptr::null_mut() as *mut *mut c_char; - + if cleanenv == 0 { adjust_shell_level(1); } - - if exit_value == EX_NOTFOUND{ + + if exit_value == EX_NOTFOUND { //goto failed_exec; break; - } - else if executable_file(command) == 0{ + } else if executable_file(command) == 0 { let c_str = CString::new("%s: cannot execute: %s").unwrap(); let c_ptr = c_str.as_ptr(); - builtin_error(c_ptr,command,strerror(errno())); + builtin_error(c_ptr, command, strerror(errno())); exit_value = EX_NOEXEC; - } - else{ + } else { file_error(command); - } - + } + //跳出loop循环,只执行一次loop break; } - //fialed_exec FREE!(command as *mut c_void); - - if subshell_environment != 0 || interactive == 0 && no_exit_on_failed_exec ==0{ + + if subshell_environment != 0 || interactive == 0 && no_exit_on_failed_exec == 0 { exit_shell(exit_value); } - if !args.is_null(){ + if !args.is_null() { strvec_dispose(args); } - if !env.is_null() && env != export_env{ + if !env.is_null() && env != export_env { strvec_dispose(env); - } + } initialize_traps(); initialize_signals(1); - if orig_job_control != 0{ + if orig_job_control != 0 { restart_job_control(); } return exit_value; } } - - diff --git a/bash-5.1/builtins_rust/exec_cmd/src/lib.rs b/bash-5.1/builtins_rust/exec_cmd/src/lib.rs index f22160e5e5d73b9ecf0f31326441fdfc558079ae..5b94acddaf8894fa1bbc3eb8cc2a72e43d696857 100644 --- a/bash-5.1/builtins_rust/exec_cmd/src/lib.rs +++ b/bash-5.1/builtins_rust/exec_cmd/src/lib.rs @@ -1,41 +1,41 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use rcommon::WordList; -use ralias::{r_alias_builtin,r_unalias_builtin}; +use ralias::{r_alias_builtin, r_unalias_builtin}; use rbind::r_bind_builtin; -use rbreak::{r_break_builtin,r_continue_builtin}; +use rbreak::{r_break_builtin, r_continue_builtin}; use rbuiltin::r_builtin_builtin; use rcaller::r_caller_builtin; -use rcd::{r_cd_builtin,r_pwd_builtin}; +use rcd::{r_cd_builtin, r_pwd_builtin}; +use rcommon::WordList; //use rcmd::r_cmd_builtin; -use rcolon::{r_colon_builtin,r_false_builtin}; use command::r_command_builtin; +use rcolon::{r_colon_builtin, r_false_builtin}; //use rcommon ::r__builtin; -use rcomplete::{r_complete_builtin,r_compgen_builtin,r_compopt_builtin}; -use rdeclare::{r_declare_builtin,r_local_builtin}; +use rcomplete::{r_compgen_builtin, r_complete_builtin, r_compopt_builtin}; +use rdeclare::{r_declare_builtin, r_local_builtin}; use recho::r_echo_builtin; use renable::r_enable_builtin; use reval::r_eval_builtin; use rexec::r_exec_builtin; -use rexit::{r_exit_builtin,r_logout_builtin}; +use rexit::{r_exit_builtin, r_logout_builtin}; use rfc::r_fc_builtin; -use rfg_bg::{r_fg_builtin,r_bg_builtin}; +use rfg_bg::{r_bg_builtin, r_fg_builtin}; use rgetopts::r_getopts_builtin; use rhash::r_hash_builtin; use rhelp::r_help_builtin; use rhistory::r_history_builtin; -use rjobs::r_jobs_builtin; use rjobs::r_disown_builtin; +use rjobs::r_jobs_builtin; use rkill::r_kill_builtin; +use rlet::r_let_builtin; use rmapfile::r_mapfile_builtin; use rprintf::r_printf_builtin; -use rpushd::{r_pushd_builtin,r_dirs_builtin,r_popd_builtin}; +use rpushd::{r_dirs_builtin, r_popd_builtin, r_pushd_builtin}; use rread::r_read_builtin; -use rlet::r_let_builtin; use rreturn::r_return_builtin; -use rset::{r_set_builtin,r_unset_builtin}; -use rsetattr::{r_export_builtin,r_readonly_builtin}; +use rset::{r_set_builtin, r_unset_builtin}; +use rsetattr::{r_export_builtin, r_readonly_builtin}; use rshift::r_shift_builtin; use rshopt::r_shopt_builtin; use rsource::r_source_builtin; @@ -47,9 +47,6 @@ use rtype::r_type_builtin; use rulimit::r_ulimit_builtin; use rumask::r_umask_builtin; use rwait::r_wait_builtin; -use std::ffi::CStr; -use std::ffi::CString; -use libc::{strcmp}; enum CMDType { AliasCmd, @@ -110,415 +107,388 @@ enum CMDType { UlimitCmd, UmaskCmd, WaitCmd, - DisownCmd + DisownCmd, } - struct AliasComand ; - impl CommandExec for AliasComand{ - fn excute(&self,list : *mut WordList)-> i32{ - unsafe { - r_alias_builtin(list) - } +struct AliasComand; +impl CommandExec for AliasComand { + fn excute(&self, list: *mut WordList) -> i32 { + unsafe { r_alias_builtin(list) } } - } - struct UnAliasComand ; - impl CommandExec for UnAliasComand{ - fn excute(&self,list : *mut WordList)-> i32{ - unsafe { - r_unalias_builtin(list) - } +} +struct UnAliasComand; +impl CommandExec for UnAliasComand { + fn excute(&self, list: *mut WordList) -> i32 { + unsafe { r_unalias_builtin(list) } } - } +} - struct BindComand; - impl CommandExec for BindComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct BindComand; +impl CommandExec for BindComand { + fn excute(&self, list: *mut WordList) -> i32 { r_bind_builtin(list) } } - struct BreakComand; - impl CommandExec for BreakComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct BreakComand; +impl CommandExec for BreakComand { + fn excute(&self, list: *mut WordList) -> i32 { r_break_builtin(list) } } struct ContinueComand; - impl CommandExec for ContinueComand{ - fn excute(&self,list : *mut WordList)-> i32{ +impl CommandExec for ContinueComand { + fn excute(&self, list: *mut WordList) -> i32 { r_continue_builtin(list) } } - struct BuiltinComand; - impl CommandExec for BuiltinComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct BuiltinComand; +impl CommandExec for BuiltinComand { + fn excute(&self, list: *mut WordList) -> i32 { r_builtin_builtin(list) } } - struct CallerComand; - impl CommandExec for CallerComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct CallerComand; +impl CommandExec for CallerComand { + fn excute(&self, list: *mut WordList) -> i32 { r_caller_builtin(list) } } - struct CdComand; - impl CommandExec for CdComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct CdComand; +impl CommandExec for CdComand { + fn excute(&self, list: *mut WordList) -> i32 { r_cd_builtin(list) } } struct PwdComand; -impl CommandExec for PwdComand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_pwd_builtin(list) - } -} - struct ColonComand; - impl CommandExec for ColonComand{ - fn excute(&self,list :*mut WordList)-> i32{ +impl CommandExec for PwdComand { + fn excute(&self, list: *mut WordList) -> i32 { + r_pwd_builtin(list) + } +} +struct ColonComand; +impl CommandExec for ColonComand { + fn excute(&self, list: *mut WordList) -> i32 { r_colon_builtin(list) - // 0 + // 0 } } struct FalseComand; -impl CommandExec for FalseComand{ - fn excute(&self,list :*mut WordList)-> i32{ - r_false_builtin(list) - // 0 - } -} - struct CommandComand; - impl CommandExec for CommandComand{ - fn excute(&self,list : *mut WordList)-> i32{ - unsafe { - r_command_builtin(list) - } - +impl CommandExec for FalseComand { + fn excute(&self, list: *mut WordList) -> i32 { + r_false_builtin(list) + // 0 } } - struct CommonComand; - impl CommandExec for CommonComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct CommandComand; +impl CommandExec for CommandComand { + fn excute(&self, list: *mut WordList) -> i32 { + unsafe { r_command_builtin(list) } + } +} +struct CommonComand; +impl CommandExec for CommonComand { + fn excute(&self, _list: *mut WordList) -> i32 { 0 } } - struct CompleteComand; - impl CommandExec for CompleteComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct CompleteComand; +impl CommandExec for CompleteComand { + fn excute(&self, list: *mut WordList) -> i32 { r_complete_builtin(list) } } - -struct CompgenCommand; -impl CommandExec for CompgenCommand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_compgen_builtin(list) - } +struct CompgenCommand; +impl CommandExec for CompgenCommand { + fn excute(&self, list: *mut WordList) -> i32 { + r_compgen_builtin(list) + } } -struct CompoptCommand; -impl CommandExec for CompoptCommand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_compopt_builtin(list) - } -} - struct DeclareComand; - impl CommandExec for DeclareComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct CompoptCommand; +impl CommandExec for CompoptCommand { + fn excute(&self, list: *mut WordList) -> i32 { + r_compopt_builtin(list) + } +} +struct DeclareComand; +impl CommandExec for DeclareComand { + fn excute(&self, list: *mut WordList) -> i32 { r_declare_builtin(list) } } struct LocalComand; - impl CommandExec for LocalComand{ - fn excute(&self,list : *mut WordList)-> i32{ +impl CommandExec for LocalComand { + fn excute(&self, list: *mut WordList) -> i32 { r_local_builtin(list) } } - struct EchoComand; - impl CommandExec for EchoComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct EchoComand; +impl CommandExec for EchoComand { + fn excute(&self, list: *mut WordList) -> i32 { r_echo_builtin(list) } } - struct EnableComand; - impl CommandExec for EnableComand{ - fn excute(&self,list : *mut WordList)-> i32{ - unsafe { - r_enable_builtin(list) - } +struct EnableComand; +impl CommandExec for EnableComand { + fn excute(&self, list: *mut WordList) -> i32 { + unsafe { r_enable_builtin(list) } } } - struct EvalComand; - impl CommandExec for EvalComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct EvalComand; +impl CommandExec for EvalComand { + fn excute(&self, list: *mut WordList) -> i32 { r_eval_builtin(list) } } - struct ExecComand; - impl CommandExec for ExecComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct ExecComand; +impl CommandExec for ExecComand { + fn excute(&self, list: *mut WordList) -> i32 { r_exec_builtin(list) } } - struct ExitComand; - impl CommandExec for ExitComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct ExitComand; +impl CommandExec for ExitComand { + fn excute(&self, list: *mut WordList) -> i32 { r_exit_builtin(list) } } struct LogoutCommand; -impl CommandExec for LogoutCommand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_logout_builtin(list) - } -} - struct FcComand; - impl CommandExec for FcComand{ - fn excute(&self,list : *mut WordList)-> i32{ +impl CommandExec for LogoutCommand { + fn excute(&self, list: *mut WordList) -> i32 { + r_logout_builtin(list) + } +} +struct FcComand; +impl CommandExec for FcComand { + fn excute(&self, list: *mut WordList) -> i32 { r_fc_builtin(list) } } - struct FgComand; - impl CommandExec for FgComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct FgComand; +impl CommandExec for FgComand { + fn excute(&self, list: *mut WordList) -> i32 { r_fg_builtin(list) } } struct BgComand; -impl CommandExec for BgComand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_bg_builtin(list) - } -} - struct GetoptsComand; - impl CommandExec for GetoptsComand{ - fn excute(&self,list : *mut WordList)-> i32{ +impl CommandExec for BgComand { + fn excute(&self, list: *mut WordList) -> i32 { + r_bg_builtin(list) + } +} +struct GetoptsComand; +impl CommandExec for GetoptsComand { + fn excute(&self, list: *mut WordList) -> i32 { r_getopts_builtin(list) } } - struct HashComand; - impl CommandExec for HashComand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_hash_builtin(list) +struct HashComand; +impl CommandExec for HashComand { + fn excute(&self, list: *mut WordList) -> i32 { + r_hash_builtin(list) } } - struct HelpComand; - impl CommandExec for HelpComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct HelpComand; +impl CommandExec for HelpComand { + fn excute(&self, list: *mut WordList) -> i32 { r_help_builtin(list) } } - struct HistoryComand; - impl CommandExec for HistoryComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct HistoryComand; +impl CommandExec for HistoryComand { + fn excute(&self, list: *mut WordList) -> i32 { r_history_builtin(list) } } - struct JobsComand; - impl CommandExec for JobsComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct JobsComand; +impl CommandExec for JobsComand { + fn excute(&self, list: *mut WordList) -> i32 { r_jobs_builtin(list) } } - struct KillComand; - impl CommandExec for KillComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct KillComand; +impl CommandExec for KillComand { + fn excute(&self, list: *mut WordList) -> i32 { r_kill_builtin(list) } } - struct LetComand; - impl CommandExec for LetComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct LetComand; +impl CommandExec for LetComand { + fn excute(&self, list: *mut WordList) -> i32 { r_let_builtin(list) } } - struct MapfileComand; - impl CommandExec for MapfileComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct MapfileComand; +impl CommandExec for MapfileComand { + fn excute(&self, list: *mut WordList) -> i32 { r_mapfile_builtin(list) } } - struct PrintfComand; - impl CommandExec for PrintfComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct PrintfComand; +impl CommandExec for PrintfComand { + fn excute(&self, list: *mut WordList) -> i32 { r_printf_builtin(list) } } - struct PushdCommand; - impl CommandExec for PushdCommand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct PushdCommand; +impl CommandExec for PushdCommand { + fn excute(&self, list: *mut WordList) -> i32 { r_pushd_builtin(list) } } struct PopdComand; -impl CommandExec for PopdComand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_popd_builtin(list) - } +impl CommandExec for PopdComand { + fn excute(&self, list: *mut WordList) -> i32 { + r_popd_builtin(list) + } } struct DirsCommand; -impl CommandExec for DirsCommand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_dirs_builtin(list) - } -} - struct ReadComand; - impl CommandExec for ReadComand{ - fn excute(&self,list : *mut WordList)-> i32{ +impl CommandExec for DirsCommand { + fn excute(&self, list: *mut WordList) -> i32 { + r_dirs_builtin(list) + } +} +struct ReadComand; +impl CommandExec for ReadComand { + fn excute(&self, list: *mut WordList) -> i32 { r_read_builtin(list) } } - struct ReservedComand; - impl CommandExec for ReservedComand{ - fn excute(&self,list : *mut WordList)-> i32{ - // r_reserve_builtin(list) - 0 +struct ReservedComand; +impl CommandExec for ReservedComand { + fn excute(&self, _list: *mut WordList) -> i32 { + // r_reserve_builtin(list) + 0 } } - struct ReturnComand; - impl CommandExec for ReturnComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct ReturnComand; +impl CommandExec for ReturnComand { + fn excute(&self, list: *mut WordList) -> i32 { r_return_builtin(list) } } - struct SetattrComand; - impl CommandExec for SetattrComand{ - fn excute(&self,list : *mut WordList)-> i32{ - //r_setattr_builtin(list); - /*unkown enter which func */ - 0 - } - +struct SetattrComand; +impl CommandExec for SetattrComand { + fn excute(&self, _list: *mut WordList) -> i32 { + //r_setattr_builtin(list); + /*unkown enter which func */ + 0 + } } struct ExportComand; -impl CommandExec for ExportComand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_export_builtin(list) - } - +impl CommandExec for ExportComand { + fn excute(&self, list: *mut WordList) -> i32 { + r_export_builtin(list) + } } struct ReadonlyComand; -impl CommandExec for ReadonlyComand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_readonly_builtin(list) - } - +impl CommandExec for ReadonlyComand { + fn excute(&self, list: *mut WordList) -> i32 { + r_readonly_builtin(list) + } } - struct SetComand; - impl CommandExec for SetComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct SetComand; +impl CommandExec for SetComand { + fn excute(&self, list: *mut WordList) -> i32 { r_set_builtin(list) } - } struct UnSetComand; -impl CommandExec for UnSetComand{ - fn excute(&self,list : *mut WordList)-> i32{ - r_unset_builtin(list) - } - +impl CommandExec for UnSetComand { + fn excute(&self, list: *mut WordList) -> i32 { + r_unset_builtin(list) + } } - struct ShiftComand; - impl CommandExec for ShiftComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct ShiftComand; +impl CommandExec for ShiftComand { + fn excute(&self, list: *mut WordList) -> i32 { r_shift_builtin(list) } -} - struct ShoptComand; - impl CommandExec for ShoptComand{ - fn excute(&self,list : *mut WordList)-> i32{ - unsafe { - r_shopt_builtin(list) - } - } -} - struct SourceComand; - impl CommandExec for SourceComand{ - fn excute(&self,list : *mut WordList)-> i32{ +} +struct ShoptComand; +impl CommandExec for ShoptComand { + fn excute(&self, list: *mut WordList) -> i32 { + unsafe { r_shopt_builtin(list) } + } +} +struct SourceComand; +impl CommandExec for SourceComand { + fn excute(&self, list: *mut WordList) -> i32 { r_source_builtin(list) } } - struct SuspendComand; - impl CommandExec for SuspendComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct SuspendComand; +impl CommandExec for SuspendComand { + fn excute(&self, list: *mut WordList) -> i32 { r_suspend_builtin(list) } } - struct TestComand; - impl CommandExec for TestComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct TestComand; +impl CommandExec for TestComand { + fn excute(&self, list: *mut WordList) -> i32 { r_test_builtin(list) } } - struct TimesComand; - impl CommandExec for TimesComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct TimesComand; +impl CommandExec for TimesComand { + fn excute(&self, list: *mut WordList) -> i32 { r_times_builtin(list) } } - struct TrapComand; - impl CommandExec for TrapComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct TrapComand; +impl CommandExec for TrapComand { + fn excute(&self, list: *mut WordList) -> i32 { r_trap_builtin(list) } } - struct TypeComand; - impl CommandExec for TypeComand{ - fn excute(&self,list : *mut WordList)-> i32{ - unsafe { - r_type_builtin(list) - } - +struct TypeComand; +impl CommandExec for TypeComand { + fn excute(&self, list: *mut WordList) -> i32 { + unsafe { r_type_builtin(list) } } - } - struct UlimitComand; - impl CommandExec for UlimitComand{ - fn excute(&self,list : *mut WordList)-> i32{ - unsafe { - r_ulimit_builtin(list) - } +struct UlimitComand; +impl CommandExec for UlimitComand { + fn excute(&self, list: *mut WordList) -> i32 { + unsafe { r_ulimit_builtin(list) } } - } - struct UmaskComand; - impl CommandExec for UmaskComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct UmaskComand; +impl CommandExec for UmaskComand { + fn excute(&self, list: *mut WordList) -> i32 { r_umask_builtin(list) } } - struct WaitComand; - impl CommandExec for WaitComand{ - fn excute(&self,list : *mut WordList)-> i32{ +struct WaitComand; +impl CommandExec for WaitComand { + fn excute(&self, list: *mut WordList) -> i32 { r_wait_builtin(list) } } - struct DisownCommand ; - impl CommandExec for DisownCommand{ - fn excute(&self,list : *mut WordList)-> i32{ - unsafe { - r_disown_builtin(list) - } +struct DisownCommand; +impl CommandExec for DisownCommand { + fn excute(&self, list: *mut WordList) -> i32 { + unsafe { r_disown_builtin(list) } } - } +} // 定义接口 pub trait CommandExec { - fn excute(&self,list : *mut WordList) -> i32; + fn excute(&self, list: *mut WordList) -> i32; } - // 工厂模式 trait Factory { - fn make_product(&self, product_type : CMDType) ->Box; + fn make_product(&self, product_type: CMDType) -> Box; } struct SimpleFactory; @@ -529,401 +499,455 @@ impl SimpleFactory { } impl Factory for SimpleFactory { - fn make_product(&self, cmd_type : CMDType) -> Box { + fn make_product(&self, cmd_type: CMDType) -> Box { match cmd_type { - CMDType::AliasCmd => Box::new( - AliasComand{} - ) , - CMDType::UnAliasCmd => Box::new( - UnAliasComand{} - ) , - CMDType::BindCmd => Box::new( - BindComand{} - ), - CMDType::BreakCmd => Box::new( - BreakComand{} - ) , - CMDType::ContinueCmd => Box::new( - ContinueComand{} - ) , - CMDType::BuiltinCmd => Box::new( - BuiltinComand{} - ), - CMDType::CallerCmd => Box::new( - CallerComand{} - ), - CMDType::CdCmd => Box::new( - CdComand{} - ), - CMDType::PwdCmd => Box::new( - PwdComand{} - ), - CMDType::ColonCmd => Box::new( - ColonComand{} - ), - CMDType::FalseCmd => Box::new( - FalseComand{} - ), - CMDType::CommandCmd => Box::new( - CommandComand{} - ), - CMDType::CommonCmd => Box::new( - CommonComand{} - ), - CMDType::CompleteCmd => Box::new( - CompleteComand{} - ), - CMDType::CompoptCmd => Box::new( - CompoptCommand{} - ), - CMDType::CompgenCmd => Box::new( - CompgenCommand{} - ), - CMDType::DeclareCmd => Box::new( - DeclareComand{} - ), - CMDType::LocalCmd => Box::new( - LocalComand{} - ), - CMDType::EchoCmd => Box::new( - EchoComand{} - ), - CMDType::EnableCmd => Box::new( - EnableComand{} - ), - CMDType::EvalCmd => Box::new( - EvalComand{} - ), - CMDType::ExecCmd => Box::new( - ExecComand{} - ), - CMDType::ExitCmd => Box::new( - ExitComand{} - ), - CMDType::LogoutCmd => Box::new( - LogoutCommand{} - ), - CMDType::FcCmd => Box::new( - FcComand{} - ), - CMDType::FgCmd => Box::new( - FgComand{} - ), - CMDType::BgCmd => Box::new( - BgComand{} - ), - CMDType::GetoptsCmd => Box::new( - GetoptsComand{} - ), - CMDType::HashCmd => Box::new( - HashComand{} - ), - CMDType::HelpCmd => Box::new( - HelpComand{} - ), - CMDType::HistoryCmd => Box::new( - HistoryComand{} - ), - CMDType::JobsCmd => Box::new( - JobsComand{} - ), - CMDType::KillCmd => Box::new( - KillComand{} - ), - CMDType::LetCmd => Box::new( - LetComand{} - ), - CMDType::MapfileCmd => Box::new( - MapfileComand{} - ), - CMDType::PrintfCmd => Box::new( - PrintfComand{} - ), - CMDType::PushdCmd => Box::new( - PushdCommand{} - ), - CMDType::DirsCmd => Box::new( - DirsCommand{} - ), - CMDType::PopdCmd => Box::new( - PopdComand{} - ), - CMDType::ReadCmd => Box::new( - ReadComand{} - ), - CMDType::ReservedCmd => Box::new( - ReservedComand{} - ), - CMDType::ReturnCmd => Box::new( - ReturnComand{} - ), - CMDType::SetattrCmd => Box::new( - SetattrComand{} - ), - CMDType::ExportCmd => Box::new( - ExportComand{} - ), - CMDType::ReadonlyCmd => Box::new( - ReadonlyComand{} - ), - CMDType::SetCmd => Box::new( - SetComand{} - ), - CMDType::UnSetCmd => Box::new( - UnSetComand{} - ), - CMDType::ShiftCmd => Box::new( - ShiftComand{} - ), - CMDType::ShoptCmd => Box::new( - ShoptComand{} - ), - CMDType::SourceCmd => Box::new( - SourceComand{} - ), - CMDType::SuspendCmd => Box::new( - SuspendComand{} - ), - CMDType::TestCmd => Box::new( - TestComand{} - ), - CMDType::TimesCmd => Box::new( - TimesComand{} - ), - CMDType::TrapCmd => Box::new( - TrapComand{} - ), - CMDType::TypeCmd => Box::new( - TypeComand{} - ), - CMDType::UlimitCmd => Box::new( - UlimitComand{} - ), - CMDType::UmaskCmd => Box::new( - UmaskComand{} - ), - CMDType::WaitCmd => Box::new( - WaitComand{} - ), - CMDType::DisownCmd => Box::new( - DisownCommand{} - ) + CMDType::AliasCmd => Box::new(AliasComand {}), + CMDType::UnAliasCmd => Box::new(UnAliasComand {}), + CMDType::BindCmd => Box::new(BindComand {}), + CMDType::BreakCmd => Box::new(BreakComand {}), + CMDType::ContinueCmd => Box::new(ContinueComand {}), + CMDType::BuiltinCmd => Box::new(BuiltinComand {}), + CMDType::CallerCmd => Box::new(CallerComand {}), + CMDType::CdCmd => Box::new(CdComand {}), + CMDType::PwdCmd => Box::new(PwdComand {}), + CMDType::ColonCmd => Box::new(ColonComand {}), + CMDType::FalseCmd => Box::new(FalseComand {}), + CMDType::CommandCmd => Box::new(CommandComand {}), + CMDType::CommonCmd => Box::new(CommonComand {}), + CMDType::CompleteCmd => Box::new(CompleteComand {}), + CMDType::CompoptCmd => Box::new(CompoptCommand {}), + CMDType::CompgenCmd => Box::new(CompgenCommand {}), + CMDType::DeclareCmd => Box::new(DeclareComand {}), + CMDType::LocalCmd => Box::new(LocalComand {}), + CMDType::EchoCmd => Box::new(EchoComand {}), + CMDType::EnableCmd => Box::new(EnableComand {}), + CMDType::EvalCmd => Box::new(EvalComand {}), + CMDType::ExecCmd => Box::new(ExecComand {}), + CMDType::ExitCmd => Box::new(ExitComand {}), + CMDType::LogoutCmd => Box::new(LogoutCommand {}), + CMDType::FcCmd => Box::new(FcComand {}), + CMDType::FgCmd => Box::new(FgComand {}), + CMDType::BgCmd => Box::new(BgComand {}), + CMDType::GetoptsCmd => Box::new(GetoptsComand {}), + CMDType::HashCmd => Box::new(HashComand {}), + CMDType::HelpCmd => Box::new(HelpComand {}), + CMDType::HistoryCmd => Box::new(HistoryComand {}), + CMDType::JobsCmd => Box::new(JobsComand {}), + CMDType::KillCmd => Box::new(KillComand {}), + CMDType::LetCmd => Box::new(LetComand {}), + CMDType::MapfileCmd => Box::new(MapfileComand {}), + CMDType::PrintfCmd => Box::new(PrintfComand {}), + CMDType::PushdCmd => Box::new(PushdCommand {}), + CMDType::DirsCmd => Box::new(DirsCommand {}), + CMDType::PopdCmd => Box::new(PopdComand {}), + CMDType::ReadCmd => Box::new(ReadComand {}), + CMDType::ReservedCmd => Box::new(ReservedComand {}), + CMDType::ReturnCmd => Box::new(ReturnComand {}), + CMDType::SetattrCmd => Box::new(SetattrComand {}), + CMDType::ExportCmd => Box::new(ExportComand {}), + CMDType::ReadonlyCmd => Box::new(ReadonlyComand {}), + CMDType::SetCmd => Box::new(SetComand {}), + CMDType::UnSetCmd => Box::new(UnSetComand {}), + CMDType::ShiftCmd => Box::new(ShiftComand {}), + CMDType::ShoptCmd => Box::new(ShoptComand {}), + CMDType::SourceCmd => Box::new(SourceComand {}), + CMDType::SuspendCmd => Box::new(SuspendComand {}), + CMDType::TestCmd => Box::new(TestComand {}), + CMDType::TimesCmd => Box::new(TimesComand {}), + CMDType::TrapCmd => Box::new(TrapComand {}), + CMDType::TypeCmd => Box::new(TypeComand {}), + CMDType::UlimitCmd => Box::new(UlimitComand {}), + CMDType::UmaskCmd => Box::new(UmaskComand {}), + CMDType::WaitCmd => Box::new(WaitComand {}), + CMDType::DisownCmd => Box::new(DisownCommand {}), } } } -unsafe fn get_cmd_type (command : *mut libc::c_char) -> CMDType{ +unsafe fn get_cmd_type(command: *mut libc::c_char) -> CMDType { let mut types = CMDType::HelpCmd; - if libc::strcmp(command, b"alias\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + if libc::strcmp( + command, + b"alias\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::AliasCmd; } - if libc::strcmp(command, b"unalias\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + if libc::strcmp( + command, + b"unalias\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::UnAliasCmd; - } - else if libc::strcmp(command, b"bind\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"bind\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::BindCmd; - } - else if libc::strcmp(command, b"break\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"break\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::BreakCmd; - } - else if libc::strcmp(command, b"continue\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"continue\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::ContinueCmd; - } - else if libc::strcmp(command, b"builtin\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"builtin\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::BuiltinCmd; - } - else if libc::strcmp(command, b"caller\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"caller\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::CallerCmd; - } - else if libc::strcmp(command, b"cd\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"cd\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::CdCmd; - } - else if libc::strcmp(command, b"pwd\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"pwd\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::PwdCmd; - } - else if libc::strcmp(command, b":\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 - || libc::strcmp(command, b"true\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b":\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + || libc::strcmp( + command, + b"true\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::ColonCmd; - } - else if libc::strcmp(command, b"false\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"false\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::FalseCmd; - } - else if libc::strcmp(command, b"command\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"command\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::CommandCmd; - } - else if libc::strcmp(command, b"common\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"common\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::CommonCmd; - } - else if libc::strcmp(command, b"complete\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"complete\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::CompleteCmd; - } - else if libc::strcmp(command, b"compopt\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"compopt\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::CompoptCmd; - } - else if libc::strcmp(command, b"compgen\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"compgen\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::CompgenCmd; - } - else if libc::strcmp(command,b"declare\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 || libc::strcmp(command,b"typeset\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"declare\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + || libc::strcmp( + command, + b"typeset\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::DeclareCmd; - } - else if libc::strcmp(command,b"local\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"local\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::LocalCmd; - } - else if libc::strcmp(command,b"echo\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"echo\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::EchoCmd; - } - - else if libc::strcmp(command,b"enable\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"enable\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::EnableCmd; - } - else if libc::strcmp(command,b"eval\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"eval\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::EvalCmd; - } - - else if libc::strcmp(command,b"exec\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"exec\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::ExecCmd; - } - - else if libc::strcmp(command,b"exit\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"exit\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::ExitCmd; - } - else if libc::strcmp(command,b"logout\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"logout\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::LogoutCmd; - } - else if libc::strcmp(command,b"fc\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"fc\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::FcCmd; - } - - else if libc::strcmp(command,b"fg\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"fg\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::FgCmd; - } - else if libc::strcmp(command,b"bg\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"bg\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::BgCmd; - } - - else if libc::strcmp(command,b"getopts\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"getopts\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::GetoptsCmd; - } - - else if libc::strcmp(command, b"hash\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"hash\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::HashCmd; - } - else if libc::strcmp(command,b"help\0" as *const u8 as *const libc::c_char as * mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"help\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::HelpCmd; - } - else if libc::strcmp(command,b"history\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"history\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::HistoryCmd; - } - else if libc::strcmp(command,b"jobs\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"jobs\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::JobsCmd; - } - else if libc::strcmp(command, b"kill\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"kill\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::KillCmd; - } - else if libc::strcmp(command, b"mapfile\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 || - libc::strcmp(command, b"readarray\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ - types = CMDType::MapfileCmd;; - } - else if libc::strcmp(command,b"printf\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"mapfile\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + || libc::strcmp( + command, + b"readarray\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { + types = CMDType::MapfileCmd; + } else if libc::strcmp( + command, + b"printf\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::PrintfCmd; - } - else if libc::strcmp(command,b"pushd\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"pushd\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::PushdCmd; - } - else if libc::strcmp(command,b"dirs\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"dirs\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::DirsCmd; - } - else if libc::strcmp(command,b"popd\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"popd\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::PopdCmd; - } - else if libc::strcmp(command, b"read\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"read\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::ReadCmd; - } - - else if libc::strcmp(command, b"let\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"let\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::LetCmd; - } - - else if libc::strcmp(command,b"return\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"return\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::ReturnCmd; - } - else if libc::strcmp(command,b"set\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"set\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::SetCmd; - } - else if libc::strcmp(command,b"unset\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"unset\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::UnSetCmd; - } - else if libc::strcmp(command,b"setattr\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"setattr\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::SetattrCmd; - } - - else if libc::strcmp(command,b"readonly\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"readonly\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::ReadonlyCmd; - } - else if libc::strcmp(command,b"export\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"export\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::ExportCmd; - } - else if libc::strcmp(command,b"shift\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"shift\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::ShiftCmd; - } - - else if libc::strcmp(command,b"shopt\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"shopt\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::ShoptCmd; - } - - else if libc::strcmp(command,b"source\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 - || libc::strcmp(command,b".\0" as *const u8 as *const libc::c_char as *mut libc::c_char)== 0 { + } else if libc::strcmp( + command, + b"source\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + || libc::strcmp( + command, + b".\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::SourceCmd; - } - - else if libc::strcmp(command, b"suspend\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"suspend\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::SuspendCmd; - } - - else if libc::strcmp(command,b"test\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 - || libc::strcmp(command,b"[\0" as *const u8 as *const libc::c_char as *mut libc::c_char)== 0 { + } else if libc::strcmp( + command, + b"test\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + || libc::strcmp( + command, + b"[\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::TestCmd; - } - - - else if libc::strcmp(command ,b"times\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"times\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::TimesCmd; - } - else if libc::strcmp(command ,b"trap\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"trap\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::TrapCmd; - } - - else if libc::strcmp(command ,b"type\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"type\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::TypeCmd; - } - - else if libc::strcmp(command ,b"ulimit\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0{ + } else if libc::strcmp( + command, + b"ulimit\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::UlimitCmd; - } - - else if libc::strcmp(command ,b"umask\0" as *const u8 as *const libc::c_char as *mut libc::c_char ) == 0{ + } else if libc::strcmp( + command, + b"umask\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::UmaskCmd; - } - - else if libc::strcmp(command , b"wait\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"wait\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::WaitCmd; - } - else if libc::strcmp(command , b"disown\0" as *const u8 as *const libc::c_char as *mut libc::c_char) == 0 { + } else if libc::strcmp( + command, + b"disown\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + ) == 0 + { types = CMDType::DisownCmd; } - - types + + types } #[no_mangle] -pub extern "C" fn r_exec_cmd(command : *mut libc::c_char, mut list :*mut WordList) -> i32 { - +pub extern "C" fn r_exec_cmd(command: *mut libc::c_char, list: *mut WordList) -> i32 { // println!("enter r_exec_cmd"); // unsafe { // println!("command is {:?}",CStr::from_ptr(command)); // } - let commandType = unsafe {get_cmd_type(command)}; - let factory = SimpleFactory::new(); + let commandType = unsafe { get_cmd_type(command) }; + let factory = SimpleFactory::new(); let cmdCall = factory.make_product(commandType); cmdCall.excute(list) } diff --git a/bash-5.1/builtins_rust/exit/src/lib.rs b/bash-5.1/builtins_rust/exit/src/lib.rs index 1f0c5d96ab2c3ec4b967dcfa0798810af9e39e45..93f5a1e82b8b8b51f1a16c5969e6eff404af26d3 100644 --- a/bash-5.1/builtins_rust/exit/src/lib.rs +++ b/bash-5.1/builtins_rust/exit/src/lib.rs @@ -1,56 +1,57 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later extern crate libc; -extern crate rjobs; extern crate nix; +extern crate rjobs; use libc::c_char; use std::ffi::CString; -use rjobs::{PROCESS, COMMAND, r_jobs_builtin, JLIST_STANDARD}; +use rjobs::{r_jobs_builtin, COMMAND, JLIST_STANDARD, PROCESS}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE,err_translate_fn}; +use rcommon::{ + err_translate_fn, WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE, +}; use rhelp::r_builtin_help; #[repr(C)] pub struct JOB { wd: *mut c_char, pipe: *mut PROCESS, - pgrp:i32, - state:JOB_STATE, - flags:i32, - deferred:*mut COMMAND, - j_cleanup:*mut fn(), - cleanarg:* mut fn() + pgrp: i32, + state: JOB_STATE, + flags: i32, + deferred: *mut COMMAND, + j_cleanup: *mut fn(), + cleanarg: *mut fn(), } #[repr(C)] pub struct jobstats { /* limits */ - c_childmax:libc::c_long, + c_childmax: libc::c_long, /* child process statistics */ - c_living:libc::c_int, /* running or stopped child processes */ - c_reaped:libc::c_int, /* exited child processes still in jobs list */ - c_injobs:libc::c_int, /* total number of child processes in jobs list */ + c_living: libc::c_int, /* running or stopped child processes */ + c_reaped: libc::c_int, /* exited child processes still in jobs list */ + c_injobs: libc::c_int, /* total number of child processes in jobs list */ /* child process totals */ - c_totforked:libc::c_int, /* total number of children this shell has forked */ - c_totreaped:libc::c_int, /* total number of children this shell has reaped */ + c_totforked: libc::c_int, /* total number of children this shell has forked */ + c_totreaped: libc::c_int, /* total number of children this shell has reaped */ /* job counters and indices */ - j_jobslots:libc::c_int,/* total size of jobs array */ - j_lastj:libc::c_int, /* last (newest) job allocated */ - j_firstj:libc::c_int, /* first (oldest) job allocated */ - j_njobs:libc::c_int, /* number of non-NULL jobs in jobs array */ - j_ndead:libc::c_int, /* number of JDEAD jobs in jobs array */ + j_jobslots: libc::c_int, /* total size of jobs array */ + j_lastj: libc::c_int, /* last (newest) job allocated */ + j_firstj: libc::c_int, /* first (oldest) job allocated */ + j_njobs: libc::c_int, /* number of non-NULL jobs in jobs array */ + j_ndead: libc::c_int, /* number of JDEAD jobs in jobs array */ /* */ - j_current:libc::c_int, /* current job */ - j_previous:libc::c_int, /* previous job */ + j_current: libc::c_int, /* current job */ + j_previous: libc::c_int, /* previous job */ /* */ - j_lastmade:* mut JOB, /* last job allocated by stop_pipeline */ - j_lastasync:* mut JOB /* last async job allocated by stop_pipeline */ + j_lastmade: *mut JOB, /* last job allocated by stop_pipeline */ + j_lastasync: *mut JOB, /* last async job allocated by stop_pipeline */ } - //枚举 #[repr(i8)] #[derive(PartialEq)] @@ -59,69 +60,73 @@ pub enum JOB_STATE { JRUNNING = 1, JSTOPPED = 2, JDEAD = 4, - JMIXED = 8 + JMIXED = 8, } //宏 #[macro_export] macro_rules! get_job_by_jid { - ($ind:expr) => { - (*((jobs as usize + ($ind*8) as usize ) as *mut*mut JOB) as *mut JOB) - } + ($ind:expr) => { + (*((jobs as usize + ($ind * 8) as usize) as *mut *mut JOB) as *mut JOB) + }; } #[macro_export] macro_rules! STOPPED { ($j:expr) => { (*get_job_by_jid!($j)).state == JOB_STATE::JSTOPPED - } + }; } #[macro_export] -macro_rules! RUNNING{ +macro_rules! RUNNING { ($j:expr) => { (*get_job_by_jid!($j)).state == JOB_STATE::JRUNNING - } + }; } #[macro_export] -macro_rules! EXITPROG{ - () => { 3 } +macro_rules! EXITPROG { + () => { + 3 + }; } #[macro_export] macro_rules! SYS_BASH_LOGOOUT { () => { - CString::new(" \"/etc/bash.bash_logout\" ").unwrap().as_ptr() - } + CString::new(" \"/etc/bash.bash_logout\" ") + .unwrap() + .as_ptr() + }; } //C库 -extern "C"{ - static mut interactive:i32; - static mut login_shell:i32; +extern "C" { + static mut interactive: i32; + static mut login_shell: i32; // static mut last_shell_builtin:*mut fn(v:*mut WordList)->i32; - static mut last_shell_builtin:extern fn(v:*mut WordList)->i32; + static mut last_shell_builtin: extern "C" fn(v: *mut WordList) -> i32; // static mut this_shell_builtin:*mut fn(v:*mut WordList)->i32; - static mut this_shell_builtin:extern fn(v:*mut WordList)->i32; - static js:jobstats ; - static mut check_jobs_at_exit:i32; - static mut jobs:*mut*mut JOB; - static mut running_trap:i32; - static mut trap_saved_exit_value:i32; - static mut last_command_exit_value:i32; - static subshell_environment:i32; - - fn builtin_error(err:*const c_char,...); - fn list_all_jobs(form:i32); - fn get_exitstat(list:*mut WordList) -> i32; - fn jump_to_top_level(level:i32); - fn maybe_execute_file(fname:*const c_char,force_noninteractive:i32)->i32; + static mut this_shell_builtin: extern "C" fn(v: *mut WordList) -> i32; + static js: jobstats; + static mut check_jobs_at_exit: i32; + static mut jobs: *mut *mut JOB; + static mut running_trap: i32; + static mut trap_saved_exit_value: i32; + static mut last_command_exit_value: i32; + static subshell_environment: i32; + + fn builtin_error(err: *const c_char, ...); + fn list_all_jobs(form: i32); + fn get_exitstat(list: *mut WordList) -> i32; + fn jump_to_top_level(level: i32); + fn maybe_execute_file(fname: *const c_char, force_noninteractive: i32) -> i32; } -unsafe fn STREQ(a:*const c_char,b:*const c_char)->bool{ - return *a == *b && libc::strcmp(a,b) == 0; +unsafe fn STREQ(a: *const c_char, b: *const c_char) -> bool { + return *a == *b && libc::strcmp(a, b) == 0; } // unsafe fn printToStderr(str:*mut c_char) -> std::io::Result<()>{ @@ -132,17 +137,19 @@ unsafe fn STREQ(a:*const c_char,b:*const c_char)->bool{ // } // -static mut sourced_logout:i32 = 0; +static mut sourced_logout: i32 = 0; #[no_mangle] -pub extern "C" fn r_exit_builtin(list:*mut WordList) -> i32{ - unsafe{ +pub extern "C" fn r_exit_builtin(list: *mut WordList) -> i32 { + unsafe { let c_str = CString::new("--help").unwrap(); let c_ptr = c_str.as_ptr(); - if list != std::ptr::null_mut() && (*list).word != std::ptr::null_mut() && - STREQ((*(*list).word).word, c_ptr){ - r_builtin_help(); - return EX_USAGE; + if list != std::ptr::null_mut() + && (*list).word != std::ptr::null_mut() + && STREQ((*(*list).word).word, c_ptr) + { + r_builtin_help(); + return EX_USAGE; } if interactive != 0 { @@ -151,15 +158,14 @@ pub extern "C" fn r_exit_builtin(list:*mut WordList) -> i32{ // printToStderr(str); //eprintln!("logout"); let names = String::from("logout"); - err_translate_fn(&names,std::ptr::null_mut()); - println!(); - }else{ + err_translate_fn(&names, std::ptr::null_mut()); + println!(); + } else { // let str:*mut c_char = CString::new("exit\n").unwrap().into_raw(); // printToStderr(str); eprintln!("exit"); // libc::fprintf(stderr,CString::new("exit\n").unwrap().as_ptr()); } - } // libc::fflush(stderr); return r_exit_or_logout(list); @@ -167,52 +173,57 @@ pub extern "C" fn r_exit_builtin(list:*mut WordList) -> i32{ } #[no_mangle] -pub extern "C" fn r_logout_builtin(list:*mut WordList)->i32{ +pub extern "C" fn r_logout_builtin(list: *mut WordList) -> i32 { unsafe { let c_str = CString::new("--help").unwrap(); let c_ptr = c_str.as_ptr(); - if list != std::ptr::null_mut() && (*list).word != std::ptr::null_mut() && - STREQ((*(*list).word).word, c_ptr){ - r_builtin_help(); - return EX_USAGE; + if list != std::ptr::null_mut() + && (*list).word != std::ptr::null_mut() + && STREQ((*(*list).word).word, c_ptr) + { + r_builtin_help(); + return EX_USAGE; } - if login_shell == 0{ + if login_shell == 0 { let names = String::from("logout"); - err_translate_fn(&names,std::ptr::null_mut()); - println!(); + err_translate_fn(&names, std::ptr::null_mut()); + println!(); let c_str = CString::new("not login shell: use `exit'").unwrap(); let c_ptr = c_str.as_ptr(); builtin_error(c_ptr); return EXECUTION_FAILURE!(); - }else{ - return r_exit_or_logout(list) + } else { + return r_exit_or_logout(list); } } } -pub fn r_exit_or_logout(list:*mut WordList)->i32{ - let exit_value:i32; - let exit_immediate_okay:i32; - let mut stopmsg:i32; +pub fn r_exit_or_logout(list: *mut WordList) -> i32 { + let exit_value: i32; + let exit_immediate_okay: i32; + let mut stopmsg: i32; - unsafe{ - exit_immediate_okay = (interactive == 0 || - last_shell_builtin == r_exit_builtin || - last_shell_builtin == r_logout_builtin || - last_shell_builtin == r_jobs_builtin ) as i32; + unsafe { + exit_immediate_okay = (interactive == 0 + || last_shell_builtin == r_exit_builtin + || last_shell_builtin == r_logout_builtin + || last_shell_builtin == r_jobs_builtin) as i32; /* Check for stopped jobs if thw user wants to.*/ if exit_immediate_okay == 0 { stopmsg = 0; for i in 0..js.j_jobslots { // println!("jobs: {}", i); - if get_job_by_jid!(i) != std::ptr::null_mut() && STOPPED!(i){ + if get_job_by_jid!(i) != std::ptr::null_mut() && STOPPED!(i) { stopmsg = JOB_STATE::JSTOPPED as i32; break; - } - else if (check_jobs_at_exit != 0) && (stopmsg ==0) && get_job_by_jid!(i) != std::ptr::null_mut() && RUNNING!(i) { + } else if (check_jobs_at_exit != 0) + && (stopmsg == 0) + && get_job_by_jid!(i) != std::ptr::null_mut() + && RUNNING!(i) + { stopmsg = JOB_STATE::JRUNNING as i32; break; } @@ -220,55 +231,52 @@ pub fn r_exit_or_logout(list:*mut WordList)->i32{ if stopmsg == JOB_STATE::JSTOPPED as i32 { let names = String::from("stoppedjobs"); - err_translate_fn(&names,std::ptr::null_mut()); + err_translate_fn(&names, std::ptr::null_mut()); eprintln!(); - } - else if stopmsg == JOB_STATE::JRUNNING as i32{ + } else if stopmsg == JOB_STATE::JRUNNING as i32 { // libc::fprintf(stream,CString::new("There are runing jobs.\n").unwrap().as_ptr()); //eprintln!("There are runing jobs."); let names = String::from("runjobs"); - err_translate_fn(&names,std::ptr::null_mut()); + err_translate_fn(&names, std::ptr::null_mut()); eprintln!(); } - if stopmsg == check_jobs_at_exit{ + if stopmsg == check_jobs_at_exit { list_all_jobs(JLIST_STANDARD!()) } if stopmsg != 0 { - last_shell_builtin = r_exit_builtin ; - this_shell_builtin = last_shell_builtin ; + last_shell_builtin = r_exit_builtin; + this_shell_builtin = last_shell_builtin; return EXECUTION_FAILURE!(); } } - if (running_trap ==1) && (list == std::ptr::null_mut()) - { + if (running_trap == 1) && (list == std::ptr::null_mut()) { exit_value = trap_saved_exit_value; - }else{ + } else { exit_value = get_exitstat(list); } r_bash_logout(); - last_command_exit_value = exit_value; + last_command_exit_value = exit_value; jump_to_top_level(EXITPROG!()); - 0 + 0 } } //#[no_mangle] //pub extern "C" fn r_bash_logout(){ -pub fn r_bash_logout(){ - unsafe{ +pub fn r_bash_logout() { + unsafe { if login_shell != 0 && sourced_logout == 0 && subshell_environment == 0 { sourced_logout = sourced_logout + 1; let c_str = CString::new("~/.bash_logout").unwrap(); let c_ptr = c_str.as_ptr(); - maybe_execute_file(c_ptr,1); - maybe_execute_file(SYS_BASH_LOGOOUT!(),1); + maybe_execute_file(c_ptr, 1); + maybe_execute_file(SYS_BASH_LOGOOUT!(), 1); } } - } diff --git a/bash-5.1/builtins_rust/fc/src/lib.rs b/bash-5.1/builtins_rust/fc/src/lib.rs index 4b1daf2e03b12a39555224b1055bea9f262c8c3a..757b59ca3d05b573fa051eeb611f33fae350e989 100644 --- a/bash-5.1/builtins_rust/fc/src/lib.rs +++ b/bash-5.1/builtins_rust/fc/src/lib.rs @@ -1,14 +1,17 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -extern crate libc; +extern crate libc; extern crate nix; -use libc::{c_char, c_long, c_void, c_int}; -use nix::sys::termios::SpecialCharacterIndices; -use std::{ffi::{CString,CStr}, i32, io::{Write, stdout}, ops::Add, string, u32}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE,r_builtin_usage,r_savestring}; +use libc::{c_char, c_int, c_long, c_void}; + +use rcommon::{ + r_builtin_usage, r_savestring, WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, + EX_USAGE, +}; use rhelp::r_builtin_help; +use std::{ffi::CString, i32, io::Write}; #[repr(i8)] pub enum JOB_STATE { @@ -16,264 +19,297 @@ pub enum JOB_STATE { JRUNNING = 1, JSTOPPED = 2, JDEAD = 4, - JMIXED = 8 + JMIXED = 8, } #[repr(u8)] -enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, - cm_connection, cm_function_def, cm_until, cm_group, - cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc +enum command_type { + cm_for, + cm_case, + cm_while, + cm_if, + cm_simple, + cm_select, + cm_connection, + cm_function_def, + cm_until, + cm_group, + cm_arith, + cm_cond, + cm_arith_for, + cm_subshell, + cm_coproc, } #[repr(u8)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] enum r_instruction { - r_output_direction, r_input_direction, r_inputa_direction, - r_appending_to, r_reading_until, r_reading_string, - r_duplicating_input, r_duplicating_output, r_deblank_reading_until, - r_close_this, r_err_and_out, r_input_output, r_output_force, - r_duplicating_input_word, r_duplicating_output_word, - r_move_input, r_move_output, r_move_input_word, r_move_output_word, - r_append_err_and_out + r_output_direction, + r_input_direction, + r_inputa_direction, + r_appending_to, + r_reading_until, + r_reading_string, + r_duplicating_input, + r_duplicating_output, + r_deblank_reading_until, + r_close_this, + r_err_and_out, + r_input_output, + r_output_force, + r_duplicating_input_word, + r_duplicating_output_word, + r_move_input, + r_move_output, + r_move_input_word, + r_move_output_word, + r_append_err_and_out, } #[repr(C)] pub struct PROCESS { next: *mut PROCESS, - pid:libc::c_int, - status:libc::c_int, - running:libc::c_int, - command:*mut c_char + pid: libc::c_int, + status: libc::c_int, + running: libc::c_int, + command: *mut c_char, } #[repr(C)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] pub union REDIRECTEE { - dest:libc::c_int, - filename:* mut WordDesc + dest: libc::c_int, + filename: *mut WordDesc, } #[repr(C)] pub union REDIRECT { - next:*mut REDIRECT, - redirector:REDIRECTEE, - rflags:libc::c_int, - flags:libc::c_int, - instruction:r_instruction, - redirectee:REDIRECTEE, - here_doc_eof:*mut c_char + next: *mut REDIRECT, + redirector: REDIRECTEE, + rflags: libc::c_int, + flags: libc::c_int, + instruction: r_instruction, + redirectee: REDIRECTEE, + here_doc_eof: *mut c_char, } /* FOR command. */ #[repr(C)] pub struct for_com { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct PATTERN_LIST { - next:* mut PATTERN_LIST, - patterns:* mut WordList, - action:*mut COMMAND, - flags:libc::c_int + next: *mut PATTERN_LIST, + patterns: *mut WordList, + action: *mut COMMAND, + flags: libc::c_int, } #[repr(C)] pub struct case_com { - flags:libc::c_int, - line:libc::c_int, - word:*mut WordDesc, - clauses:*mut PATTERN_LIST + flags: libc::c_int, + line: libc::c_int, + word: *mut WordDesc, + clauses: *mut PATTERN_LIST, } #[repr(C)] pub struct while_com { - flags:libc::c_int, - test:*mut COMMAND, - action:*mut COMMAND + flags: libc::c_int, + test: *mut COMMAND, + action: *mut COMMAND, } #[repr(C)] pub struct if_com { - flags:libc::c_int, - test:*mut COMMAND, - true_case:*mut COMMAND, - false_case:*mut COMMAND + flags: libc::c_int, + test: *mut COMMAND, + true_case: *mut COMMAND, + false_case: *mut COMMAND, } #[repr(C)] pub struct connection { - ignore:libc::c_int, - first:*mut COMMAND, - second:*mut COMMAND, - connector:libc::c_int + ignore: libc::c_int, + first: *mut COMMAND, + second: *mut COMMAND, + connector: libc::c_int, } #[repr(C)] pub struct simple_com { - flags:libc::c_int, - line:libc::c_int, - words:*mut WordList, - redirects:*mut REDIRECT + flags: libc::c_int, + line: libc::c_int, + words: *mut WordList, + redirects: *mut REDIRECT, } #[repr(C)] pub struct function_def { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - command:*mut COMMAND, - source_file:*mut c_char + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + command: *mut COMMAND, + source_file: *mut c_char, } #[repr(C)] pub struct group_com { - ignore:libc::c_int, - command:*mut COMMAND, - source_file:*mut c_char + ignore: libc::c_int, + command: *mut COMMAND, + source_file: *mut c_char, } #[repr(C)] pub struct select_com { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct arith_com { - flags:libc::c_int, - line:libc::c_int, - exp:*mut WordList + flags: libc::c_int, + line: libc::c_int, + exp: *mut WordList, } #[repr(C)] pub struct cond_com { - flags:libc::c_int, - line:libc::c_int, - type_c:libc::c_int, - exp:*mut WordList + flags: libc::c_int, + line: libc::c_int, + type_c: libc::c_int, + exp: *mut WordList, } #[repr(C)] pub struct arith_for_com { - flags:libc::c_int, - line:libc::c_int, - init:*mut WordList, - test:*mut WordList, - step:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + init: *mut WordList, + test: *mut WordList, + step: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct subshell_com { - flags:i32, - line:i32, - command:*mut COMMAND + flags: i32, + line: i32, + command: *mut COMMAND, } #[repr(C)] pub struct coproc_com { - flags:i32, - name:*mut c_char, - command:*mut COMMAND + flags: i32, + name: *mut c_char, + command: *mut COMMAND, } #[repr(C)] pub union VALUE_COMMAND { - For:*mut for_com, - Case:*mut case_com, - While:*mut while_com, - If:*mut if_com, - Connection:*mut connection, - Simple:*mut simple_com, - Function_def:*mut function_def, - Group:*mut group_com, - Select:*mut select_com, - Arith:*mut arith_com, - Cond:*mut cond_com, - ArithFor:*mut arith_for_com, - Subshell:*mut subshell_com, - Coproc:*mut coproc_com + For: *mut for_com, + Case: *mut case_com, + While: *mut while_com, + If: *mut if_com, + Connection: *mut connection, + Simple: *mut simple_com, + Function_def: *mut function_def, + Group: *mut group_com, + Select: *mut select_com, + Arith: *mut arith_com, + Cond: *mut cond_com, + ArithFor: *mut arith_for_com, + Subshell: *mut subshell_com, + Coproc: *mut coproc_com, } #[repr(C)] pub struct COMMAND { - type_c:command_type, - flags:i32, - line:i32, - redirects:*mut REDIRECT, - value:VALUE_COMMAND + type_c: command_type, + flags: i32, + line: i32, + redirects: *mut REDIRECT, + value: VALUE_COMMAND, } #[repr(C)] pub struct JOB { wd: *mut c_char, pipe: *mut PROCESS, - pgrp:i32, - state:JOB_STATE, - flags:i32, - deferred:*mut COMMAND, - j_cleanup:*mut fn(), - cleanarg:* mut fn() + pgrp: i32, + state: JOB_STATE, + flags: i32, + deferred: *mut COMMAND, + j_cleanup: *mut fn(), + cleanarg: *mut fn(), } #[repr(C)] pub struct SHELL_VAR { - name:*mut c_char, - value:*mut c_char, - exportstr:*mut c_char, - dynamic_value:*mut fn(v:* mut SHELL_VAR)->*mut SHELL_VAR, - assign_func:* mut fn(v:* mut SHELL_VAR,str1:* mut c_char,t:c_long,str2:* mut c_char)->*mut SHELL_VAR, - attributes:i32, - context:i32 + name: *mut c_char, + value: *mut c_char, + exportstr: *mut c_char, + dynamic_value: *mut fn(v: *mut SHELL_VAR) -> *mut SHELL_VAR, + assign_func: *mut fn( + v: *mut SHELL_VAR, + str1: *mut c_char, + t: c_long, + str2: *mut c_char, + ) -> *mut SHELL_VAR, + attributes: i32, + context: i32, } #[repr(C)] pub struct GENERIC_LIST { - next: * mut GENERIC_LIST + next: *mut GENERIC_LIST, } #[repr(C)] pub struct REPL { - next: *mut REPL, - pat:*mut c_char, - rep:*mut c_char + next: *mut REPL, + pat: *mut c_char, + rep: *mut c_char, } #[repr(C)] pub struct HIST_ENTRY { - line:*mut c_char, - timestamp:*mut c_char, - data:*mut fn() + line: *mut c_char, + timestamp: *mut c_char, + data: *mut fn(), } - #[macro_export] macro_rules! ISHELP { - ($s:expr) => { - libc::strcmp($s as *const c_char,CString::new("--help").unwrap().as_ptr()) - } + ($s:expr) => { + libc::strcmp( + $s as *const c_char, + CString::new("--help").unwrap().as_ptr(), + ) + }; } #[macro_export] macro_rules! errno { - () => { - *libc::__errno_location() - } + () => { + *libc::__errno_location() + }; } #[macro_export] macro_rules! HN_LISTING { - () => { - 0x01 - } + () => { + 0x01 + }; } #[macro_export] @@ -307,7 +343,7 @@ macro_rules! HIST_ERANGE { #[macro_export] macro_rules! HIST_NOTFOUND { () => { - std::i32::MIN +2 + std::i32::MIN +4 } } @@ -450,7 +486,7 @@ unsafe fn printToStdoutflush() -> std::io::Result<()> { unsafe fn QUIT () { - if terminating_signal !=0 { + if terminating_signal == 0 { termsig_handler (terminating_signal); } @@ -907,7 +943,7 @@ pub extern "C" fn r_fc_builtin (mut list:* mut WordList)->i32 #[no_mangle] pub extern "C" fn r_fc_gethist (command:* mut c_char, hlist:* mut * mut HIST_ENTRY, mode:i32)->* mut c_char { - let mut i:i32; + let i:i32; if hlist == std::ptr::null_mut() { return std::ptr::null_mut(); @@ -928,13 +964,13 @@ pub extern "C" fn r_fc_gethnum (command:* mut c_char, hlist:* mut * mut HIST_ENT { let mut sign:i32; let mut n:i32; - let mut clen:i32; - let mut rh:i32; + let clen:i32; + let rh:i32; let mut i:i32=0; let mut j:i32; let mut last_hist:i32; let mut real_last:i32; - let mut listing:i32; + let listing:i32; let mut s:* mut c_char; diff --git a/bash-5.1/builtins_rust/fg_bg/src/lib.rs b/bash-5.1/builtins_rust/fg_bg/src/lib.rs index f47ae236a7ecac2a2738f4a4d3d2e3fc02207c95..dea45de070bbf01ba131fda1255c52c7bb33acdd 100644 --- a/bash-5.1/builtins_rust/fg_bg/src/lib.rs +++ b/bash-5.1/builtins_rust/fg_bg/src/lib.rs @@ -1,13 +1,13 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -extern crate libc; +extern crate libc; extern crate nix; -use libc::{c_char, c_long}; -use std::{ffi::CString, ops::Add}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE,r_builtin_usage}; +use libc::c_char; +use rcommon::{WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; +use std::{ffi::CString, ops::Add}; #[repr(i8)] pub enum JOB_STATE { @@ -15,470 +15,507 @@ pub enum JOB_STATE { JRUNNING = 1, JSTOPPED = 2, JDEAD = 4, - JMIXED = 8 + JMIXED = 8, } #[repr(u8)] -enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, - cm_connection, cm_function_def, cm_until, cm_group, - cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc +enum command_type { + cm_for, + cm_case, + cm_while, + cm_if, + cm_simple, + cm_select, + cm_connection, + cm_function_def, + cm_until, + cm_group, + cm_arith, + cm_cond, + cm_arith_for, + cm_subshell, + cm_coproc, } #[repr(u8)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] enum r_instruction { - r_output_direction, r_input_direction, r_inputa_direction, - r_appending_to, r_reading_until, r_reading_string, - r_duplicating_input, r_duplicating_output, r_deblank_reading_until, - r_close_this, r_err_and_out, r_input_output, r_output_force, - r_duplicating_input_word, r_duplicating_output_word, - r_move_input, r_move_output, r_move_input_word, r_move_output_word, - r_append_err_and_out + r_output_direction, + r_input_direction, + r_inputa_direction, + r_appending_to, + r_reading_until, + r_reading_string, + r_duplicating_input, + r_duplicating_output, + r_deblank_reading_until, + r_close_this, + r_err_and_out, + r_input_output, + r_output_force, + r_duplicating_input_word, + r_duplicating_output_word, + r_move_input, + r_move_output, + r_move_input_word, + r_move_output_word, + r_append_err_and_out, } #[repr(C)] pub struct PROCESS { next: *mut PROCESS, - pid:libc::c_int, - status:libc::c_int, - running:libc::c_int, - command:*mut c_char + pid: libc::c_int, + status: libc::c_int, + running: libc::c_int, + command: *mut c_char, } - - #[repr(C)] pub union REDIRECT { - next:*mut REDIRECT, /* Next element, or NULL. */ - redirector:libc::c_int, /* Descriptor or varname to be redirected. */ - rflags:libc::c_int, /* Private flags for this redirection */ - flags:libc::c_int, /* Flag value for `open'. */ - instruction:r_instruction, /* What to do with the information. */ - redirectee:libc::c_int, /* File descriptor or filename */ - here_doc_eof:*mut c_char /* The word that appeared in < { + ($sig:expr, $nvar:expr, $ovar:expr) => { $nvar.unwrap().clear(); $nvar.unwrap().add($sig); $nvar.unwrap().clear(); - nix::sys::signal::sigprocmask(nix::sys::signal::SigmaskHow::SIG_BLOCK, $nvar, $ovar); - } + nix::sys::signal::sigprocmask(nix::sys::signal::SigmaskHow::SIG_BLOCK, $nvar, $ovar); + }; } #[macro_export] macro_rules! UNBLOCK_SIGNAL { - ($ovar:expr) => { - nix::sys::signal::sigprocmask(nix::sys::signal::SigmaskHow::SIG_SETMASK, $ovar, None) - } + ($ovar:expr) => { + nix::sys::signal::sigprocmask(nix::sys::signal::SigmaskHow::SIG_SETMASK, $ovar, None) + }; } #[macro_export] macro_rules! UNBLOCK_CHILD { - ($ovar:expr) => { - UNBLOCK_SIGNAL!($ovar); - } + ($ovar:expr) => { + UNBLOCK_SIGNAL!($ovar); + }; } #[macro_export] macro_rules! BLOCK_CHILD { - ($nvar:expr,$ovar:expr) => { - BLOCK_SIGNAL!(nix::sys::signal::SIGCHLD, $nvar, $ovar); - } + ($nvar:expr,$ovar:expr) => { + BLOCK_SIGNAL!(nix::sys::signal::SIGCHLD, $nvar, $ovar); + }; } #[macro_export] macro_rules! DUP_JOB { - () => {-2} + () => { + -2 + }; } #[macro_export] macro_rules! get_job_by_jid { - ($ind:expr) => { - (*(((jobs as usize) + ($ind*8) as usize ) as *mut*mut JOB) as *mut JOB) - } + ($ind:expr) => { + (*(((jobs as usize) + ($ind * 8) as usize) as *mut *mut JOB) as *mut JOB) + }; } #[macro_export] macro_rules! J_JOBCONTROL { - () => {0x04} + () => { + 0x04 + }; } #[macro_export] macro_rules! IS_JOBCONTROL { - ($j:expr) => { - ((*get_job_by_jid!($j)).flags & J_JOBCONTROL!()) != 0 - } + ($j:expr) => { + ((*get_job_by_jid!($j)).flags & J_JOBCONTROL!()) != 0 + }; } #[macro_export] macro_rules! INVALID_JOB { - ($j:expr) => { - $j <0 || $j >= js.j_jobslots || get_job_by_jid !($j) == std::ptr::null_mut() - } + ($j:expr) => { + $j < 0 || $j >= js.j_jobslots || get_job_by_jid!($j) == std::ptr::null_mut() + }; } #[macro_export] macro_rules! ISHELP { - ($s:expr) => { - libc::strcmp($s as *const c_char,CString::new("--help").unwrap().as_ptr()) - } + ($s:expr) => { + libc::strcmp( + $s as *const c_char, + CString::new("--help").unwrap().as_ptr() + ) + }; } #[macro_export] macro_rules! CHECK_HELPOPT { - ($l:expr) => { - if $l !=std::ptr::null_mut() && (*$l).word !=std::ptr::null_mut() && ISHELP!((*(*$l).word).word) == 0 { - r_builtin_help (); - return EX_USAGE; - } - } + ($l:expr) => { + if $l != std::ptr::null_mut() + && (*$l).word != std::ptr::null_mut() + && ISHELP!((*(*$l).word).word) == 0 + { + r_builtin_help(); + return EX_USAGE; + } + }; } -extern "C" { - fn builtin_error(err:*const c_char,...); - fn get_job_spec (list:*mut WordList)->i32; - fn sh_badjob (str:*mut c_char); - static jobs:*mut*mut JOB; - static js:jobstats ; - - static mut loptend:*mut WordList; - fn sh_nojobs (str:*mut c_char); - fn no_options (list:*mut WordList)->i32; - static mut job_control:i32; - static mut last_asynchronous_pid:i32; - fn start_job (job:i32, foreground:i32)->i32; +extern "C" { + fn builtin_error(err: *const c_char, ...); + fn get_job_spec(list: *mut WordList) -> i32; + fn sh_badjob(str: *mut c_char); + static jobs: *mut *mut JOB; + static js: jobstats; + + static mut loptend: *mut WordList; + fn sh_nojobs(str: *mut c_char); + fn no_options(list: *mut WordList) -> i32; + static mut job_control: i32; + static mut last_asynchronous_pid: i32; + fn start_job(job: i32, foreground: i32) -> i32; } /* How to bring a job into the foreground. */ #[no_mangle] -pub extern "C" fn r_fg_builtin (list:*mut WordList)->i32 { - let fg_bit:i32; - unsafe { - CHECK_HELPOPT! (list); - - if job_control == 0 { - sh_nojobs (0 as *mut c_char); - return EXECUTION_FAILURE!(); - } +pub extern "C" fn r_fg_builtin(list: *mut WordList) -> i32 { + let fg_bit: i32; + unsafe { + CHECK_HELPOPT!(list); + + if job_control == 0 { + sh_nojobs(0 as *mut c_char); + return EXECUTION_FAILURE!(); + } + + if no_options(list) != 0 { + return EX_USAGE; + } - if no_options (list) !=0 { - return EX_USAGE; - } - - /* If the last arg on the line is '&', then start this job in the - background. Else, fg the job. */ - - if loptend == std::ptr::null_mut() { - return r_fg_bg (loptend, 1); - } else { - let mut t:WordList=*loptend; - while t.next !=std::ptr::null_mut() { - t=*(t.next); - } - let cstr:&std::ffi::CStr=std::ffi::CStr::from_ptr((*(t.word)).word ); - let mut isfg:bool=char::from( cstr.to_bytes()[0] ) == '&'; - isfg =isfg && char::from( cstr.to_bytes()[1]) == '\0'; - isfg = isfg ==false; - if isfg { - fg_bit=1; - } else { - fg_bit=0; - } - return r_fg_bg (loptend, fg_bit); + /* If the last arg on the line is '&', then start this job in the + background. Else, fg the job. */ + + if loptend == std::ptr::null_mut() { + return r_fg_bg(loptend, 1); + } else { + let mut t: WordList = *loptend; + while t.next != std::ptr::null_mut() { + t = *(t.next); + } + let cstr: &std::ffi::CStr = std::ffi::CStr::from_ptr((*(t.word)).word); + let mut isfg: bool = char::from(cstr.to_bytes()[0]) == '&'; + isfg = isfg && char::from(cstr.to_bytes()[1]) == '\0'; + isfg = isfg == false; + if isfg { + fg_bit = 1; + } else { + fg_bit = 0; + } + return r_fg_bg(loptend, fg_bit); + } } - } } /* How to put a job into the background. */ #[no_mangle] -pub extern "C" fn r_bg_builtin (list:*mut WordList)->i32 { - let mut r:i32; - unsafe { - CHECK_HELPOPT !(list); - - if job_control == 0 { - sh_nojobs (0 as *mut c_char); - return EXECUTION_FAILURE!(); - } - - if no_options (list) !=0 { - return EX_USAGE; - } - - /* This relies on the fact that fg_bg() takes a WordList *, but only acts - on the first member (if any) of that list. */ - r = EXECUTION_SUCCESS!(); - - if r_fg_bg(loptend,0) == EXECUTION_FAILURE!() { - r = EXECUTION_FAILURE!(); - } - - if loptend !=std::ptr::null_mut() { - let mut t:WordList=*loptend; - while t.next !=std::ptr::null_mut() { - if r_fg_bg (&mut t, 0) == EXECUTION_FAILURE!() { - r = EXECUTION_FAILURE!(); +pub extern "C" fn r_bg_builtin(list: *mut WordList) -> i32 { + let mut r: i32; + unsafe { + CHECK_HELPOPT!(list); + + if job_control == 0 { + sh_nojobs(0 as *mut c_char); + return EXECUTION_FAILURE!(); + } + + if no_options(list) != 0 { + return EX_USAGE; + } + + /* This relies on the fact that fg_bg() takes a WordList *, but only acts + on the first member (if any) of that list. */ + r = EXECUTION_SUCCESS!(); + + if r_fg_bg(loptend, 0) == EXECUTION_FAILURE!() { + r = EXECUTION_FAILURE!(); + } + + if loptend != std::ptr::null_mut() { + let mut t: WordList = *loptend; + while t.next != std::ptr::null_mut() { + if r_fg_bg(&mut t, 0) == EXECUTION_FAILURE!() { + r = EXECUTION_FAILURE!(); + } + t = *(t.next); + } + return r; + } else { + return r; } - t = *(t.next); - } - return r; - } else { - return r; - } - } + } } /* How to put a job into the foreground/background. */ #[no_mangle] -pub extern "C" fn r_fg_bg (list:*mut WordList, foreground:i32)->i32{ - - let mut set:nix::sys::signal::SigSet=nix::sys::signal::SigSet::empty(); - let mut oset:nix::sys::signal::SigSet =nix::sys::signal::SigSet::empty(); - let job:i32; - let status:i32; - let mut old_async_pid:i32=0; - let j:*mut JOB; - - unsafe { - BLOCK_CHILD !(Some(&mut set), Some(&mut oset)); - job = get_job_spec (list); - - if INVALID_JOB !(job) { - if job != DUP_JOB!() { - if list != std::ptr::null_mut() { - sh_badjob ( (*(*list).word).word ); - } else { - let mut c_str_current = CString::new("current").unwrap(); // from a &str, creates a new allocation - sh_badjob (c_str_current.as_ptr() as * mut c_char); - } - } +pub extern "C" fn r_fg_bg(list: *mut WordList, foreground: i32) -> i32 { + let mut set: nix::sys::signal::SigSet = nix::sys::signal::SigSet::empty(); + let mut oset: nix::sys::signal::SigSet = nix::sys::signal::SigSet::empty(); + let job: i32; + let status: i32; + let mut old_async_pid: i32 = 0; + let j: *mut JOB; + + unsafe { + BLOCK_CHILD!(Some(&mut set), Some(&mut oset)); + job = get_job_spec(list); + + if INVALID_JOB!(job) { + if job != DUP_JOB!() { + if list != std::ptr::null_mut() { + sh_badjob((*(*list).word).word); + } else { + let c_str_current = CString::new("current").unwrap(); // from a &str, creates a new allocation + sh_badjob(c_str_current.as_ptr() as *mut c_char); + } + } + + UNBLOCK_CHILD!(Some(&oset)); + return EXECUTION_FAILURE!(); + } + + j = get_job_by_jid!(job); + /* Or if j->pgrp == shell_pgrp. */ + if !IS_JOBCONTROL!(job) { + let jobNum: i32 = job + 1; + builtin_error( + String::from("job ") + .add(&jobNum.to_string()) + .add(&String::from("started without job control").to_string()) + .as_ptr() as *const c_char, + ); + UNBLOCK_CHILD!(Some(&oset)); + return EXECUTION_FAILURE!(); + } + + if foreground == 0 { + old_async_pid = i32::from(last_asynchronous_pid); + last_asynchronous_pid = i32::from((*j).pgrp); /* As per Posix.2 5.4.2 */ + } - UNBLOCK_CHILD !(Some(&oset)); - return EXECUTION_FAILURE!(); - } - - j = get_job_by_jid !(job); - /* Or if j->pgrp == shell_pgrp. */ - if ! IS_JOBCONTROL !(job) { - let jobNum:i32=job + 1; - builtin_error ( String::from("job ").add(&jobNum.to_string()).add(&String::from("started without job control").to_string()).as_ptr() as * const c_char); - UNBLOCK_CHILD !(Some(&oset)); - return EXECUTION_FAILURE!(); - } - - if foreground == 0 { - old_async_pid = i32::from(last_asynchronous_pid); - last_asynchronous_pid = i32::from((*j).pgrp); /* As per Posix.2 5.4.2 */ - } - - status = start_job (job, foreground); - - if status >= 0 { - /* win: */ - UNBLOCK_CHILD !(Some(&oset)); - if foreground !=0 { - return status; - } else { - return EXECUTION_SUCCESS!(); - } - } else { - if foreground == 0 { - last_asynchronous_pid = i32::from(old_async_pid); - } - - UNBLOCK_CHILD !(Some(&oset)); - return EXECUTION_FAILURE!(); + status = start_job(job, foreground); + + if status >= 0 { + /* win: */ + UNBLOCK_CHILD!(Some(&oset)); + if foreground != 0 { + return status; + } else { + return EXECUTION_SUCCESS!(); + } + } else { + if foreground == 0 { + last_asynchronous_pid = i32::from(old_async_pid); + } + + UNBLOCK_CHILD!(Some(&oset)); + return EXECUTION_FAILURE!(); + } } - } } /* diff --git a/bash-5.1/builtins_rust/getopts/src/lib.rs b/bash-5.1/builtins_rust/getopts/src/lib.rs index 91eda74803adb60cd5a6b2eda9cb473c54efa33f..4736107685b3981b5ea6f502570981722dabe96d 100644 --- a/bash-5.1/builtins_rust/getopts/src/lib.rs +++ b/bash-5.1/builtins_rust/getopts/src/lib.rs @@ -3,7 +3,7 @@ //# SPDX-License-Identifier: GPL-3.0-or-later extern crate libc; extern crate nix; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE,GETOPT_HELP, r_builtin_usage}; +use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE,GETOPT_HELP}; use libc::{c_char, c_long, c_void}; use std::{ffi::CString}; use rhelp::r_builtin_help; diff --git a/bash-5.1/builtins_rust/hash/Cargo.tom b/bash-5.1/builtins_rust/hash/Cargo.tom new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/bash-5.1/builtins_rust/hash/src/lib.rs b/bash-5.1/builtins_rust/hash/src/lib.rs index 769cde8c78dd2c8ff3d7eb1c98cfbd73f9175fd2..462d73a9b0447de5231314da0a44ff313e1f642d 100644 --- a/bash-5.1/builtins_rust/hash/src/lib.rs +++ b/bash-5.1/builtins_rust/hash/src/lib.rs @@ -1,39 +1,39 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later extern crate libc; extern crate rread; -use libc::{c_char,c_int, strchr,free,c_void,strerror,EISDIR}; -use std::ffi::{CStr,CString}; -use std::io::{stdout, Write}; -use rread::{SHELL_VAR}; -use rcommon::{r_find_shell_builtin,r_builtin_usage}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; +use libc::{c_char, c_int, c_void, free, strchr, strerror, EISDIR}; +use rcommon::r_builtin_usage; +use rcommon::{WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; +use rread::SHELL_VAR; +use std::ffi::{CStr, CString}; use std::fs; +use std::io::{stdout, Write}; use std::os::linux::fs::MetadataExt; -type PTR_T=c_void; -#[repr (C)] -pub struct bucket_contents{ - pub next:*mut bucket_contents, - pub key:*mut c_char, - pub data:*mut PTR_T, //void * or char * - pub khash:u32, - pub times_found:i32, +type PTR_T = c_void; +#[repr(C)] +pub struct bucket_contents { + pub next: *mut bucket_contents, + pub key: *mut c_char, + pub data: *mut PTR_T, //void * or char * + pub khash: u32, + pub times_found: i32, } -type BUCKET_CONTENTS=bucket_contents; -#[repr (C)] -pub struct hash_table{ - pub bucket_array:*mut *mut BUCKET_CONTENTS, - pub nbucjets:i32, - pub nentries:i32, +type BUCKET_CONTENTS = bucket_contents; +#[repr(C)] +pub struct hash_table { + pub bucket_array: *mut *mut BUCKET_CONTENTS, + pub nbucjets: i32, + pub nentries: i32, } type HASH_TABLE = hash_table; -#[repr (C)] -pub struct _pathdata{ - pub path:*mut c_char, - pub flags:i32, +#[repr(C)] +pub struct _pathdata { + pub path: *mut c_char, + pub flags: i32, } type PATH_DATA = _pathdata; //enum @@ -53,20 +53,18 @@ pub unsafe fn hash_entries(ht: *mut HASH_TABLE) -> i32 { #[macro_export] macro_rules! HASH_ENTRIES { ($ht:expr) => { - if ($ht) != std::ptr::null_mut(){ + if ($ht) != std::ptr::null_mut() { return (*$ht).nentries; - } - else{ + } else { return 0; } }; } -fn HASH_ENTRIES(ht:*mut HASH_TABLE)->i32{ - unsafe{ - if ht != std::ptr::null_mut(){ +fn HASH_ENTRIES(ht: *mut HASH_TABLE) -> i32 { + unsafe { + if ht != std::ptr::null_mut() { return (*ht).nentries; - } - else{ + } else { return 0; } } @@ -80,7 +78,7 @@ macro_rules! pathdata { #[macro_export] macro_rules! FREE { ($s:expr) => { - if $s != std::ptr::null_mut(){ + if $s != std::ptr::null_mut() { free($s as *mut c_void); } }; @@ -94,56 +92,56 @@ pub struct alias { } pub type AliasT = alias; // type i32 hash_efunc PARAMS(*mut BUCKET_CONTENTS); -type hash_wfunc = extern fn(*mut BUCKET_CONTENTS)->i32; -type sh_builtin_func_t = extern fn (*mut WordList)->i32; +type hash_wfunc = extern "C" fn(*mut BUCKET_CONTENTS) -> i32; +type sh_builtin_func_t = extern "C" fn(*mut WordList) -> i32; //extern c -extern "C"{ - static loptend:*mut WordList; - static hashing_enabled:i32; - static list_optarg:*mut c_char; - static this_command_name:*mut c_char; - static posixly_correct:i32; - static restricted:i32; - static shell_compatibility_level:i32; - static hashed_filenames:*mut HASH_TABLE; - static dot_found_in_search:i32; - fn builtin_error(format:*const c_char,...); +extern "C" { + static loptend: *mut WordList; + static hashing_enabled: i32; + static list_optarg: *mut c_char; + static this_command_name: *mut c_char; + static posixly_correct: i32; + static restricted: i32; + static shell_compatibility_level: i32; + static hashed_filenames: *mut HASH_TABLE; + static dot_found_in_search: i32; + fn builtin_error(format: *const c_char, ...); fn reset_internal_getopt(); - fn internal_getopt(list:*mut WordList,opts:*mut c_char)->i32; + fn internal_getopt(list: *mut WordList, opts: *mut c_char) -> i32; fn all_aliases() -> *mut *mut AliasT; - fn sh_needarg(s:*mut c_char); + fn sh_needarg(s: *mut c_char); fn phash_flush(); - fn sh_restricted(s:*mut c_char); - fn absolute_program(string:*const c_char)->i32; - fn find_user_command(name:*const c_char)->*mut c_char; - fn executable_file(file:*const c_char)->i32; - fn sh_notfound(s:*mut c_char); - fn is_directory(file:*const c_char)->i32; - fn phash_insert(filename:*mut c_char,full_path:*mut c_char,check_dot:i32,found:i32); - fn phash_remove(filename:*const c_char)->i32; - fn find_function(name:*const c_char)->*mut SHELL_VAR; - fn find_shell_builtin(name:*mut c_char)->*mut sh_builtin_func_t; - fn hash_walk(table:*mut HASH_TABLE,func:*mut hash_wfunc); - fn phash_search(filename:*const c_char)->*mut c_char; - fn printable_filename(f:*mut c_char,flage:i32)->*mut c_char; + fn sh_restricted(s: *mut c_char); + fn absolute_program(string: *const c_char) -> i32; + fn find_user_command(name: *const c_char) -> *mut c_char; + fn executable_file(file: *const c_char) -> i32; + fn sh_notfound(s: *mut c_char); + fn is_directory(file: *const c_char) -> i32; + fn phash_insert(filename: *mut c_char, full_path: *mut c_char, check_dot: i32, found: i32); + fn phash_remove(filename: *const c_char) -> i32; + fn find_function(name: *const c_char) -> *mut SHELL_VAR; + fn find_shell_builtin(name: *mut c_char) -> *mut sh_builtin_func_t; + fn hash_walk(table: *mut HASH_TABLE, func: *mut hash_wfunc); + fn phash_search(filename: *const c_char) -> *mut c_char; + fn printable_filename(f: *mut c_char, flage: i32) -> *mut c_char; } static mut common_inode: c_int = 0; //rust /* Print statistics on the current state of hashed commands. If LIST is - not empty, then rehash (or hash in the first place) the specified - commands. */ +not empty, then rehash (or hash in the first place) the specified +commands. */ #[no_mangle] -pub extern "C" fn r_hash_builtin(mut list:*mut WordList)->i32{ - let mut expunge_hash_table:i32; - let mut list_targets:i32; - let mut list_portably:i32; - let mut delete:i32; - let mut opt:i32; - let mut w:*mut c_char; - let mut pathname:*mut c_char; - unsafe{ - if hashing_enabled == 0{ +pub extern "C" fn r_hash_builtin(mut list: *mut WordList) -> i32 { + let mut expunge_hash_table: i32; + let mut list_targets: i32; + let mut list_portably: i32; + let mut delete: i32; + let mut opt: i32; + let mut w: *mut c_char; + let mut pathname: *mut c_char; + unsafe { + if hashing_enabled == 0 { let c_str = CString::new("hashing disabled").unwrap(); let c_str_ptr = c_str.as_ptr(); builtin_error(c_str_ptr); @@ -156,73 +154,75 @@ pub extern "C" fn r_hash_builtin(mut list:*mut WordList)->i32{ pathname = std::ptr::null_mut(); reset_internal_getopt(); let opts = CString::new("dlp:rt").unwrap(); - opt = internal_getopt(list,opts.as_ptr() as *mut c_char); - while opt != -1{ + opt = internal_getopt(list, opts.as_ptr() as *mut c_char); + while opt != -1 { let optu8 = opt as u8; let opt_char = char::from(optu8); - match opt_char{ + match opt_char { 'd' => delete = 1, 'l' => list_portably = 1, 'p' => pathname = list_optarg, 'r' => expunge_hash_table = 1, 't' => list_targets = 1, - _ => { + _ => { if opt == -99 { r_builtin_help(); return EX_USAGE; } - r_builtin_usage(); - return EX_USAGE; - } + r_builtin_usage(); + return EX_USAGE; + } } - opt = internal_getopt(list,opts.as_ptr() as *mut c_char); + opt = internal_getopt(list, opts.as_ptr() as *mut c_char); } list = loptend; /* hash -t requires at least one argument. */ if list == std::ptr::null_mut() && (delete != 0 || list_targets != 0) { - let temp:CString; - let temp_ptr:*mut c_char; - if delete != 0{ + let temp: CString; + let temp_ptr: *mut c_char; + if delete != 0 { temp = CString::new("-d").unwrap(); temp_ptr = temp.as_ptr() as *mut c_char; sh_needarg(temp_ptr); - } - else{ + } else { temp = CString::new("-t").unwrap(); temp_ptr = temp.as_ptr() as *mut c_char; sh_needarg(temp_ptr); } return EXECUTION_FAILURE!(); } - + /* We want hash -r to be silent, but hash -- to print hashing info, so - we test expunge_hash_table. */ - if list==std::ptr::null_mut() && expunge_hash_table == 0{ + we test expunge_hash_table. */ + if list == std::ptr::null_mut() && expunge_hash_table == 0 { opt = r_print_hashed_commands(list_portably); - if opt==0 && posixly_correct==0 && (list_portably==0 || shell_compatibility_level<=50){ + if opt == 0 + && posixly_correct == 0 + && (list_portably == 0 || shell_compatibility_level <= 50) + { let s_cstr = CStr::from_ptr(this_command_name); let s_str = s_cstr.to_str().unwrap(); let s_string = s_str.to_owned(); - println!("{}:hash table empty",s_string); + println!("{}:hash table empty", s_string); } return EXECUTION_SUCCESS!(); } - if expunge_hash_table != 0{ + if expunge_hash_table != 0 { phash_flush(); } /* If someone runs `hash -r -t xyz' he will be disappointed. */ - if list_targets != 0{ - return r_list_hashed_filename_targets(list,list_portably); + if list_targets != 0 { + return r_list_hashed_filename_targets(list, list_portably); } - if restricted != 0 && pathname != std::ptr::null_mut(){ - if strchr(pathname,'/' as c_int) != std::ptr::null_mut(){ + if restricted != 0 && pathname != std::ptr::null_mut() { + if strchr(pathname, '/' as c_int) != std::ptr::null_mut() { sh_restricted(pathname); return EXECUTION_FAILURE!(); } /* If we are changing the hash table in a restricted shell, make sure the - target pathname can be found using a $PATH search. */ + target pathname can be found using a $PATH search. */ w = find_user_command(pathname); - if w==std::ptr::null_mut() || *w==0 || executable_file(w)==0{ + if w == std::ptr::null_mut() || *w == 0 || executable_file(w) == 0 { sh_notfound(pathname); free(w as *mut c_void); return EXECUTION_FAILURE!(); @@ -230,55 +230,49 @@ pub extern "C" fn r_hash_builtin(mut list:*mut WordList)->i32{ free(w as *mut c_void); } opt = EXECUTION_SUCCESS!(); - while list != std::ptr::null_mut(){ + while list != std::ptr::null_mut() { /* Add, remove or rehash the specified commands. */ w = (*(*list).word).word; - if absolute_program(w as *const c_char) != 0{ + if absolute_program(w as *const c_char) != 0 { continue; - } - else if pathname != std::ptr::null_mut(){ - if is_directory(pathname) != 0{ + } else if pathname != std::ptr::null_mut() { + if is_directory(pathname) != 0 { let c_err = CString::new("%s:%s").unwrap(); let c_err_ptr = c_err.as_ptr(); - builtin_error(c_err_ptr,pathname,strerror(EISDIR)); + builtin_error(c_err_ptr, pathname, strerror(EISDIR)); opt = EXECUTION_SUCCESS!(); + } else { + if legal_hash_rust(w, pathname) == 0 { + phash_insert(w, pathname, 0, 0); + } } - else{ - if legal_hash_rust(w,pathname) == 0{ - phash_insert(w,pathname,0,0); - } - - } - } - else if delete != 0{ - if phash_remove(w) != 0{ + } else if delete != 0 { + if phash_remove(w) != 0 { sh_notfound(w); opt = EXECUTION_FAILURE!(); } - } - else if r_add_hashed_command(w,0) != 0{ + } else if r_add_hashed_command(w, 0) != 0 { opt = EXECUTION_FAILURE!(); } list = (*list).next; } stdout().flush(); return opt; - }//unsafe + } //unsafe } -extern "C" fn r_add_hashed_command(w:*mut c_char,quiet:i32)->i32{ - let mut rv:i32; - let full_path:*mut c_char; - rv = 0; - unsafe{ - if find_function(w).is_null() && find_shell_builtin(w).is_null(){ - // if find_function(w).is_null() && r_find_shell_builtin(w).is_null(){ +extern "C" fn r_add_hashed_command(w: *mut c_char, quiet: i32) -> i32 { + let mut rv: i32; + let full_path: *mut c_char; + rv = 1; + unsafe { + if find_function(w).is_null() && find_shell_builtin(w).is_null() { + // if find_function(w).is_null() && r_find_shell_builtin(w).is_null(){ phash_remove(w); full_path = find_user_command(w); - if full_path != std::ptr::null_mut() && executable_file(full_path) != 0{ - phash_insert(w,full_path,dot_found_in_search,0) - } - else{ - if quiet == 0{ + if full_path != std::ptr::null_mut() && executable_file(full_path) != 0 { + phash_insert(w, full_path, dot_found_in_search, 0) + } else { + if quiet == 0 { sh_notfound(w); } rv += 1; @@ -286,53 +280,51 @@ extern "C" fn r_add_hashed_command(w:*mut c_char,quiet:i32)->i32{ FREE!(full_path); } return rv; - }//unsafe + } } -extern "C" fn r_print_hash_info(item:*mut BUCKET_CONTENTS)->i32{ - - unsafe{ - let path_string = CStr::from_ptr((*pathdata!(item)).path).to_str().unwrap();//.to_owned() - println!("{:04}\t{}",(*item).times_found,path_string); +extern "C" fn r_print_hash_info(item: *mut BUCKET_CONTENTS) -> i32 { + unsafe { + let path_string = CStr::from_ptr((*pathdata!(item)).path).to_str().unwrap(); //.to_owned() + println!("{:04}\t{}", (*item).times_found, path_string); // println!("{:04}\t{}",(*item).times_found,*(*pathdata!(item)).path); - }//unsafe + } 0 } #[no_mangle] -extern "C" fn r_print_portable_hash_info(item:*mut BUCKET_CONTENTS)->i32{ - let fp:*mut c_char; - let f:*mut c_char; - unsafe{ - fp = printable_filename((*pathdata!(item)).path,1); - f = printable_filename((*item).key,1); - let fp_string = CStr::from_ptr(fp).to_str().unwrap();//.to_owned() - let f_string = CStr::from_ptr(f).to_str().unwrap();//.to_owned() - println!("builtin hash -p {} {}",fp_string,f_string); - if fp != (*pathdata!(item)).path{ +extern "C" fn r_print_portable_hash_info(item: *mut BUCKET_CONTENTS) -> i32 { + let fp: *mut c_char; + let f: *mut c_char; + unsafe { + fp = printable_filename((*pathdata!(item)).path, 1); + f = printable_filename((*item).key, 1); + let fp_string = CStr::from_ptr(fp).to_str().unwrap(); //.to_owned() + let f_string = CStr::from_ptr(f).to_str().unwrap(); //.to_owned() + println!("builtin hash -p {} {}", fp_string, f_string); + if fp != (*pathdata!(item)).path { free(fp as *mut c_void); } - if f != (*item).key{ + if f != (*item).key { free(f as *mut c_void); } return 0; - }//unsafe + } } #[no_mangle] -extern "C" fn r_print_hashed_commands(fmt:i32)->i32{ - unsafe{ +extern "C" fn r_print_hashed_commands(fmt: i32) -> i32 { + unsafe { if hashed_filenames.is_null() || hash_entries(hashed_filenames) == 0 { return 0; } - if fmt == 0{ + if fmt == 0 { println!("hits\tcommand"); } - let fmt_t:hash_wfunc; - if fmt != 0{ + let fmt_t: hash_wfunc; + if fmt != 0 { fmt_t = r_print_portable_hash_info; - } - else{ + } else { fmt_t = r_print_hash_info; } - hash_walk(hashed_filenames,fmt_t as *mut hash_wfunc); + hash_walk(hashed_filenames, fmt_t as *mut hash_wfunc); return 1; } } @@ -388,8 +380,8 @@ unsafe fn legal_hash_rust(name :*mut libc::c_char,value :*mut libc::c_char ) -> let alias_list: *mut *mut AliasT = all_aliases(); let mut t: *mut AliasT; let mut offset; - let mut name_w:*mut libc::c_char; - let mut target:*mut c_char; + let name_w:*mut libc::c_char; + let target:*mut c_char; offset = 0; if !alias_list.is_null() { t = *alias_list.offset(offset as isize); @@ -432,9 +424,9 @@ unsafe fn file_inode(pathname : &str,pathname2 : &str) -> std::io::Result<()> { let meta = fs::metadata( pathname )?; let meta2 = fs::metadata( pathname2 )?; common_inode = 0; - if (meta.st_ino() != meta2.st_ino()) { + if meta.st_ino() != meta2.st_ino() { println!("The name and value point to different executable files"); common_inode = 1; } Ok(()) -} \ No newline at end of file +} diff --git a/bash-5.1/builtins_rust/help/src/lib.rs b/bash-5.1/builtins_rust/help/src/lib.rs index 847fa1803682473753c5299b7a745c4ffd06e1c4..d556de0a3076120b36512aa3c87350cde84fd0ee 100644 --- a/bash-5.1/builtins_rust/help/src/lib.rs +++ b/bash-5.1/builtins_rust/help/src/lib.rs @@ -1,538 +1,587 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -extern crate libc; +extern crate libc; extern crate nix; extern crate std; -use libc::{c_char, c_void ,putchar, free}; -use std::{ffi::{CString,CStr}, i32, io::{Read, stdout, Write}, mem, string, u32}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, - EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN, - r_builtin_usage,get_local_str}; - -use fluent_bundle::{FluentBundle, FluentResource, FluentValue, FluentArgs}; +use libc::{c_char, c_void}; +use rcommon::{get_local_str, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; +use std::{ + ffi::{CStr, CString}, + i32, + io::Write, +}; + +use fluent_bundle::FluentArgs; use fluent_resmgr::resource_manager::ResourceManager; pub enum Option { None, Some(T), } -#[repr (C)] -#[derive(Copy,Clone)] +#[repr(C)] +#[derive(Copy, Clone)] pub struct builtin { - name : *mut libc::c_char, - function :*mut sh_builtin_func_t, - flags : bool, - long_doc :*mut *mut c_char, - short_doc :*mut libc::c_char, - handle :*mut libc::c_char + name: *mut libc::c_char, + function: *mut sh_builtin_func_t, + flags: bool, + long_doc: *mut *mut c_char, + short_doc: *mut libc::c_char, + handle: *mut libc::c_char, } type sh_builtin_func_t = fn(WordList) -> i32; #[repr(C)] struct FieldStruct { - name : *mut c_char, + name: *mut c_char, } #[macro_export] macro_rules! FNMATCH_EXTFLAG { - () => {0} + () => { + 0 + }; } #[macro_export] macro_rules! EX_USAGE { - () => {258} + () => { + 258 + }; } #[macro_export] -macro_rules! MB_CUR_MAX { - () => {6} - } +macro_rules! MB_CUR_MAX { + () => { + 6 + }; +} #[macro_export] -macro_rules! BASE_INDENT{ - () => {4} +macro_rules! BASE_INDENT { + () => { + 4 + }; } #[macro_export] -macro_rules! BUILTIN_ENABLED{ - () => {1} +macro_rules! BUILTIN_ENABLED { + () => { + 1 + }; } #[macro_export] -macro_rules! FNM_NOMATCH{ - () => {1} +macro_rules! FNM_NOMATCH { + () => { + 1 + }; } #[macro_export] -macro_rules! BUILTIN_SIZEOF{ - () => {48} +macro_rules! BUILTIN_SIZEOF { + () => { + 48 + }; } #[macro_export] -macro_rules! EXIT_FAILURE{ - () => {1} +macro_rules! EXIT_FAILURE { + () => { + 1 + }; } -extern "C"{ +extern "C" { fn reset_internal_getopt(); - fn internal_getopt (list:*mut WordList , opts:*mut c_char)->i32; + fn internal_getopt(list: *mut WordList, opts: *mut c_char) -> i32; //fn builtin_error(err:*const c_char,...); fn builtin_usage(); - fn show_shell_version(ver:i32); - fn glob_pattern_p(pattern:*const c_char) -> i32; - fn zcatfd(fd : i32 ,id : i32, nn :*mut c_char) -> i32; - fn zmapfd(fd : i32, name :*mut *mut libc::c_char, nn: *mut libc::c_char) -> i32; - fn sh_builtin_func_t(list :*mut WordList) -> i32; - fn builtin_address_internal(comand_name:*mut c_char, i:i32) -> *mut builtin; - fn termsig_handler (sig:i32); + fn show_shell_version(ver: i32); + fn glob_pattern_p(pattern: *const c_char) -> i32; + fn zcatfd(fd: i32, id: i32, nn: *mut c_char) -> i32; + fn zmapfd(fd: i32, name: *mut *mut libc::c_char, nn: *mut libc::c_char) -> i32; + fn sh_builtin_func_t(list: *mut WordList) -> i32; + fn builtin_address_internal(comand_name: *mut c_char, i: i32) -> *mut builtin; + fn termsig_handler(sig: i32); fn throw_to_top_level(); fn default_columns() -> usize; - fn wcsnwidth (chaa : * mut libc::wchar_t, size :i32, i: i32) -> i32; - fn xstrmatch (string1 : * mut libc::c_char, string2 : * mut libc::c_char, i : libc::c_char) -> libc::c_char; - fn open(pathname : *const libc::c_char, oflag : i32) -> i32; - fn wcwidth( c :libc::wchar_t) -> i32; - static mut loptend:*mut WordList; - static bash_copyright : *const c_char; - static bash_license : *const c_char; - static mut terminating_signal:i32; - static this_command_name:*mut libc::c_char; - static mut interrupt_state:i32; - static mut num_shell_builtins : i32; - static mut static_shell_builtin : [builtin ; 100]; - static shell_builtins:*mut builtin; - static mut current_builtin :*mut builtin; + fn wcsnwidth(chaa: *mut libc::wchar_t, size: i32, i: i32) -> i32; + fn xstrmatch( + string1: *mut libc::c_char, + string2: *mut libc::c_char, + i: libc::c_char, + ) -> libc::c_char; + fn open(pathname: *const libc::c_char, oflag: i32) -> i32; + fn wcwidth(c: libc::wchar_t) -> i32; + static mut loptend: *mut WordList; + static bash_copyright: *const c_char; + static bash_license: *const c_char; + static mut terminating_signal: i32; + static this_command_name: *mut libc::c_char; + static mut interrupt_state: i32; + static mut num_shell_builtins: i32; + static mut static_shell_builtin: [builtin; 100]; + static shell_builtins: *mut builtin; + static mut current_builtin: *mut builtin; } #[no_mangle] -pub extern "C" fn r_help_builtin(mut list:*mut WordList)->i32 { - // let mut i:i32; - let mut plen:usize; - let mut match_found:i32; - let mut sflag :i32 = 0; - let mut dflag : i32 = 0; - let mut mflag : i32 = 0; +pub extern "C" fn r_help_builtin(mut list: *mut WordList) -> i32 { + // let mut i:i32; + let mut plen: usize; + let mut _match_found: i32; + let mut sflag: i32 = 0; + let mut dflag: i32 = 0; + let mut mflag: i32 = 0; let mut m: bool; - let pass:i32 = 0; - let mut this_found:i32; - let mut pattern:*mut c_char; - let mut name:*mut c_char; - let l:*mut WordList= list; - let mut i : i32; + let _pass: i32 = 0; + let mut _this_found: i32; + let mut _pattern: *mut c_char; + let mut _name: *mut c_char; + let _l: *mut WordList = list; + let mut i: i32; unsafe { reset_internal_getopt(); } let c_str_dms = CString::new("dms").unwrap(); // from a &str, creates a new allocation - unsafe { - i = internal_getopt (list, c_str_dms.as_ptr() as * mut c_char); - } + unsafe { + i = internal_getopt(list, c_str_dms.as_ptr() as *mut c_char); + } while i != -1 { - let optu8:u8= i as u8; - let optChar:char=char::from(optu8); - match optChar{ - 'd'=> {dflag = 1; } - 'm'=> {mflag = 1; } - 's'=> {sflag = 1; } - _=>{ - unsafe { - if i == -99 { + let optu8: u8 = i as u8; + let optChar: char = char::from(optu8); + match optChar { + 'd' => { + dflag = 1; + } + 'm' => { + mflag = 1; + } + 's' => { + sflag = 1; + } + _ => unsafe { + if i == -99 { r_builtin_help(); return EX_USAGE; - } - builtin_usage (); - return EX_USAGE; } - } - } - unsafe{ - i = internal_getopt (list, c_str_dms.as_ptr() as * mut c_char); + builtin_usage(); + return EX_USAGE; + }, + } + unsafe { + i = internal_getopt(list, c_str_dms.as_ptr() as *mut c_char); } } - if list == std::ptr::null_mut(){ - unsafe { - show_shell_version (0); - } - show_builtin_command_help (); - return EXECUTION_SUCCESS!(); + if list == std::ptr::null_mut() { + unsafe { + show_shell_version(0); + } + show_builtin_command_help(); + return EXECUTION_SUCCESS!(); } - unsafe { - let mut pattern = 0; - pattern = glob_pattern_p ((*(*list).word).word); - if pattern == 1 { - println!("Shell commands matching keyword, Shell commands matching keyword"); - if list != std::ptr::null_mut() && (*list).next !=std::ptr::null_mut() { - println!("Shell commands matching keywords"); - } - else { - println!("Shell commands matching keyword"); - } - println!("{:?} ,",list); - } - // let mut loptendt=*list; - - let mut match_found = 0; - let mut pattern:*mut c_char = 0 as *mut libc::c_char; - while list !=std::ptr::null_mut() { - pattern = (*(*list).word).word; - plen = libc::strlen (pattern); - let mut this_found = 0; - let mut v : Vec<*mut libc::c_char> = Vec::new(); - for val in 0..=75 { - //let nname = &shell_builtins[val].name; - let builtin1 = unsafe{&(*((shell_builtins as usize + (val*BUILTIN_SIZEOF!()) as usize) as *mut builtin))}; - if builtin1.name != std::ptr::null_mut(){ - v.push(builtin1.name); - } - } - for val in 1..3 { - //for &mut namee in &mut v { - for i in 0..v.len(){ - QUIT(); - /* First val: look for exact string or pattern matches. - Second val: look for prefix matches like bash-4.2 */ - if val == 1{ - m = (libc::strcmp (pattern,v[i]) == 0)|| - (strmatch (pattern,v[i], FNMATCH_EXTFLAG!()) != FNM_NOMATCH!()); - } - else{ - m = libc::strncmp (pattern, v[i], plen) == 0; - } - if m { - this_found = 1; - match_found = match_found +1 ; - if dflag == 1{ - show_desc (i as i32); - continue; - } - else if mflag ==1{ - show_manpage (v[i], i as i32); - continue; + unsafe { + let mut pattern = 0; + pattern = glob_pattern_p((*(*list).word).word); + if pattern == 1 { + println!("Shell commands matching keyword, Shell commands matching keyword"); + if list != std::ptr::null_mut() && (*list).next != std::ptr::null_mut() { + println!("Shell commands matching keywords"); + } else { + println!("Shell commands matching keyword"); + } + println!("{:?} ,", list); + } + // let mut loptendt=*list; + + let mut match_found = 0; + let mut pattern: *mut c_char = 0 as *mut libc::c_char; + while list != std::ptr::null_mut() { + pattern = (*(*list).word).word; + plen = libc::strlen(pattern); + let mut this_found = 0; + let mut v: Vec<*mut libc::c_char> = Vec::new(); + for val in 0..=75 { + //let nname = &shell_builtins[val].name; + let builtin1 = unsafe { + &(*((shell_builtins as usize + (val * BUILTIN_SIZEOF!()) as usize) + as *mut builtin)) + }; + if builtin1.name != std::ptr::null_mut() { + v.push(builtin1.name); + } + } + for val in 1..3 { + //for &mut namee in &mut v { + for i in 0..v.len() { + QUIT(); + /* First val: look for exact string or pattern matches. + Second val: look for prefix matches like bash-4.2 */ + if val == 1 { + m = (libc::strcmp(pattern, v[i]) == 0) + || (strmatch(pattern, v[i], FNMATCH_EXTFLAG!()) != FNM_NOMATCH!()); + } else { + m = libc::strncmp(pattern, v[i], plen) == 0; } - let builtin1 = unsafe{&(*((shell_builtins as usize + (i*BUILTIN_SIZEOF!()) as usize) as *mut builtin))}; - print!("{:?}:",CStr::from_ptr(builtin1.name)); - show_helpsynopsis(i as i32); - if sflag == 0{ - show_longdoc(i as i32); - } + if m { + this_found = 1; + match_found = match_found + 1; + if dflag == 1 { + show_desc(i as i32); + continue; + } else if mflag == 1 { + show_manpage(v[i], i as i32); + continue; + } + let builtin1 = unsafe { + &(*((shell_builtins as usize + (i * BUILTIN_SIZEOF!()) as usize) + as *mut builtin)) + }; + print!("{:?}:", CStr::from_ptr(builtin1.name)); + show_helpsynopsis(i as i32); + if sflag == 0 { + show_longdoc(i as i32); + } + } + } + if val == 1 && this_found == 1 { + break; } - } - if val == 1 && this_found == 1{ - break; - } - } - if (*list).next != std::ptr::null_mut(){ - list = (*list).next; - - } - else { - - break; - } - } - if match_found == 0{ - let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); - let resources = vec![ "message.ftl".into()]; - let mut args = FluentArgs::new(); - let s1 = String::from("command"); - args.set("name",format!("{:?}",CStr::from_ptr(pattern))); - let bundle = mgr.get_bundle(get_local_str(), resources); - let mut value = bundle.get_message("helperr").unwrap(); - let mut pattern = value.value().expect("partern err"); - let mut errors = vec![]; - let mut msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); - println!("utshell: help: {}", msg1); - return EXECUTION_FAILURE!(); + } + if (*list).next != std::ptr::null_mut() { + list = (*list).next; + } else { + break; + } + } + if match_found == 0 { + let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); + let resources = vec!["message.ftl".into()]; + let mut args = FluentArgs::new(); + let _s1 = String::from("command"); + args.set("name", format!("{:?}", CStr::from_ptr(pattern))); + let bundle = mgr.get_bundle(get_local_str(), resources); + let value = bundle.get_message("helperr").unwrap(); + let pattern = value.value().expect("partern err"); + let mut errors = vec![]; + let msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); + println!("utshell: help: {}", msg1); + return EXECUTION_FAILURE!(); + } + } + unsafe { + std::io::stdout().flush(); } - } - unsafe { - std::io::stdout().flush(); - } - return EXECUTION_SUCCESS!(); + return EXECUTION_SUCCESS!(); } - #[no_mangle] -pub extern "C" fn r_help_null_builtin (mut list:*mut WordList) -> i32{ - unsafe { - show_shell_version(0); - } - show_builtin_command_help (); - return EXECUTION_SUCCESS!(); +pub extern "C" fn r_help_null_builtin(_list: *mut WordList) -> i32 { + unsafe { + show_shell_version(0); + } + show_builtin_command_help(); + return EXECUTION_SUCCESS!(); } -unsafe fn QUIT () -{ - if terminating_signal !=0 { - termsig_handler (terminating_signal); - } +unsafe fn QUIT() { + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } - if interrupt_state !=0{ - throw_to_top_level(); - } + if interrupt_state != 0 { + throw_to_top_level(); + } } -pub extern "C" fn r_builtin_help (){ +pub extern "C" fn r_builtin_help() { // print all command usage let mut ind: i32 = 5; let d: i32; unsafe { current_builtin = builtin_address_internal(this_command_name, 0); - if current_builtin == 0 as *mut builtin{ - return ; - } + if current_builtin == 0 as *mut builtin { + return; + } - d = (current_builtin as usize - shell_builtins as usize) as i32; + d = (current_builtin as usize - shell_builtins as usize) as i32; } - ind = d/BUILTIN_SIZEOF!() ; + ind = d / BUILTIN_SIZEOF!(); unsafe { - print!("{:?} : ",CStr::from_ptr(this_command_name)); + print!("{:?} : ", CStr::from_ptr(this_command_name)); } show_helpsynopsis(ind); - show_longdoc (ind); + show_longdoc(ind); } -fn open_helpfile(name :*mut c_char) -> i32{ - - let mut fd : i32; +fn open_helpfile(name: *mut c_char) -> i32 { + let fd: i32; unsafe { - fd = open (name, 0); - + fd = open(name, 0); } if fd == -1 { return -1; - } - else { - fd + } else { + fd } } -fn show_longdoc(i : i32){ - let builtin1 = unsafe{&(*((shell_builtins as usize + (i*BUILTIN_SIZEOF!()) as usize) as *mut builtin))}; - let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); - let resources = vec![ "message.ftl".into()]; - let mut args = FluentArgs::new(); - let c_str: &CStr = unsafe { CStr::from_ptr(builtin1.name) }; - let s1 = String::from("command"); - match i { - 0|1|2|3|4|5 => { - args.set("cmdName",format!("{}{}",s1,i));} - 33 => { - args.set("cmdName",format!("{}{}",s1,6))} - 75 => { - args.set("cmdName",format!("{}{}",s1,7))} - _ => { - let msg: &str = c_str.to_str().unwrap(); - args.set("cmdName",msg);} - } +fn show_longdoc(i: i32) { + let builtin1 = unsafe { + &(*((shell_builtins as usize + (i * BUILTIN_SIZEOF!()) as usize) as *mut builtin)) + }; + let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); + let resources = vec!["message.ftl".into()]; + let mut args = FluentArgs::new(); + let c_str: &CStr = unsafe { CStr::from_ptr(builtin1.name) }; + let s1 = String::from("command"); + match i { + 0 | 1 | 2 | 3 | 4 | 5 => { + args.set("cmdName", format!("{}{}", s1, i)); + } + 33 => args.set("cmdName", format!("{}{}", s1, 6)), + 75 => args.set("cmdName", format!("{}{}", s1, 7)), + _ => { + let msg: &str = c_str.to_str().unwrap(); + args.set("cmdName", msg); + } + } let bundle = mgr.get_bundle(get_local_str(), resources); - let mut value = bundle.get_message("helplongdoc").unwrap(); - let mut pattern = value.value().expect("partern err"); + let value = bundle.get_message("helplongdoc").unwrap(); + let pattern = value.value().expect("partern err"); let mut errors = vec![]; - let mut msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); - println!(" {}", msg1); + let msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); + println!(" {}", msg1); } -fn show_helpsynopsis( i : i32) -{ - let builtin1 = unsafe{&(*((shell_builtins as usize + (i*BUILTIN_SIZEOF!()) as usize) as *mut builtin))}; +fn show_helpsynopsis(i: i32) { + let builtin1 = unsafe { + &(*((shell_builtins as usize + (i * BUILTIN_SIZEOF!()) as usize) as *mut builtin)) + }; let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); - let resources = vec![ "message.ftl".into()]; + let resources = vec!["message.ftl".into()]; let mut args = FluentArgs::new(); let c_str: &CStr = unsafe { CStr::from_ptr(builtin1.name) }; let s1 = String::from("command"); match i { - 0|1|2|3|4|5 => { - args.set("cmdName",format!("{}{}",s1,i));} - 33 => { - args.set("cmdName",format!("{}{}",s1,6))} - 75 => { - args.set("cmdName",format!("{}{}",s1,7))} - _ => { - let msg: &str = c_str.to_str().unwrap(); - args.set("cmdName",msg);} - } + 0 | 1 | 2 | 3 | 4 | 5 => { + args.set("cmdName", format!("{}{}", s1, i)); + } + 33 => args.set("cmdName", format!("{}{}", s1, 6)), + 75 => args.set("cmdName", format!("{}{}", s1, 7)), + _ => { + let msg: &str = c_str.to_str().unwrap(); + args.set("cmdName", msg); + } + } let bundle = mgr.get_bundle(get_local_str(), resources); - let mut value = bundle.get_message("helpsynopsis").unwrap(); - let mut pattern = value.value().expect("partern err"); + let value = bundle.get_message("helpsynopsis").unwrap(); + let pattern = value.value().expect("partern err"); let mut errors = vec![]; - let mut msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); - println!(" {}", msg1); + let msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); + println!(" {}", msg1); } -fn show_desc (i :i32){ - let builtin1 = unsafe{&(*((shell_builtins as usize + (i*BUILTIN_SIZEOF!()) as usize) as *mut builtin))}; - let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); - let resources = vec![ "message.ftl".into()]; - let mut args = FluentArgs::new(); - let c_str: &CStr = unsafe { CStr::from_ptr(builtin1.name) }; - let s1 = String::from("command"); - match i { - 0|1|2|3|4|5 => { - args.set("cmdName",format!("{}{}",s1,i));} - 33 => { - args.set("cmdName",format!("{}{}",s1,6))} - 75 => { - args.set("cmdName",format!("{}{}",s1,7))} - _ => { - let msg: &str = c_str.to_str().unwrap(); - args.set("cmdName",msg);} - } - let bundle = mgr.get_bundle(get_local_str(), resources); - let mut value = bundle.get_message("helpname").unwrap(); - let mut pattern = value.value().expect("partern err"); - let mut errors = vec![]; - let mut msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); - println!(" {}", msg1); +fn show_desc(i: i32) { + let builtin1 = unsafe { + &(*((shell_builtins as usize + (i * BUILTIN_SIZEOF!()) as usize) as *mut builtin)) + }; + let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); + let resources = vec!["message.ftl".into()]; + let mut args = FluentArgs::new(); + let c_str: &CStr = unsafe { CStr::from_ptr(builtin1.name) }; + let s1 = String::from("command"); + match i { + 0 | 1 | 2 | 3 | 4 | 5 => { + args.set("cmdName", format!("{}{}", s1, i)); + } + 33 => args.set("cmdName", format!("{}{}", s1, 6)), + 75 => args.set("cmdName", format!("{}{}", s1, 7)), + _ => { + let msg: &str = c_str.to_str().unwrap(); + args.set("cmdName", msg); + } + } + let bundle = mgr.get_bundle(get_local_str(), resources); + let value = bundle.get_message("helpname").unwrap(); + let pattern = value.value().expect("partern err"); + let mut errors = vec![]; + let msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); + println!(" {}", msg1); } -fn show_manpage (name : *mut c_char, i : i32){ - /* NAME */ - println! ("NAME\n"); - show_desc(i); - - /* SYNOPSIS */ - println! ("SYNOPSIS\n"); - show_helpsynopsis(i); - println! ("DESCRIPTION\n"); - show_longdoc(i); - /* SEE ALSO */ - println! ("SEE ALSO\n"); - println! (" utshell(1) {} \n\n"," "); - - /* IMPLEMENTATION */ - println! ("IMPLEMENTATION\n"); - println! (" "); - unsafe { - show_shell_version (0); - } - println! (" "); - unsafe { - println! ("{:?}", CStr::from_ptr(bash_copyright)); - } - println! (" "); - unsafe { - println! ("{:?}", CStr::from_ptr(bash_license)); - } +fn show_manpage(_name: *mut c_char, i: i32) { + /* NAME */ + println!("NAME\n"); + show_desc(i); + + /* SYNOPSIS */ + println!("SYNOPSIS\n"); + show_helpsynopsis(i); + println!("DESCRIPTION\n"); + show_longdoc(i); + /* SEE ALSO */ + println!("SEE ALSO\n"); + println!(" utshell(1) {} \n\n", " "); + + /* IMPLEMENTATION */ + println!("IMPLEMENTATION\n"); + println!(" "); + unsafe { + show_shell_version(0); + } + println!(" "); + unsafe { + println!("{:?}", CStr::from_ptr(bash_copyright)); + } + println!(" "); + unsafe { + println!("{:?}", CStr::from_ptr(bash_license)); + } } #[no_mangle] -pub extern "C" fn dispcolumn (i : i32, buf : *mut c_char, bufsize :libc::c_int, width : usize, height : i32){ - let mut j : i32; - let mut dispcols : usize; - let mut helpdoc :*mut libc::c_char; - /* first column */ - let mut builtin1 = unsafe{&(*((shell_builtins as usize + (i*BUILTIN_SIZEOF!()) as usize) as *mut builtin))}; +pub extern "C" fn dispcolumn( + i: i32, + buf: *mut c_char, + _bufsize: libc::c_int, + width: usize, + height: i32, +) { + let mut _j: i32; + let dispcols: usize; + let mut helpdoc: *mut libc::c_char; + /* first column */ + let mut builtin1 = unsafe { + &(*((shell_builtins as usize + (i * BUILTIN_SIZEOF!()) as usize) as *mut builtin)) + }; helpdoc = builtin1.short_doc; unsafe { - libc::strncpy (((buf as usize + 4 as usize ) as * mut c_char), helpdoc, width - 2); - *((buf as usize + (width - 2) as usize) as * mut c_char)='>' as c_char; - *((buf as usize+(width - 1) as usize) as * mut c_char)='\0' as c_char; - } + libc::strncpy( + (buf as usize + 4 as usize) as *mut c_char, + helpdoc, + width - 2, + ); + *((buf as usize + (width - 2) as usize) as *mut c_char) = '>' as c_char; + *((buf as usize + (width - 1) as usize) as *mut c_char) = '\0' as c_char; + } /* indicate truncation */ - println! ("{:?}", buf); + println!("{:?}", buf); unsafe { - if ((i << 1) >= num_shell_builtins) || (i+height >= num_shell_builtins){ - println! ("\n"); - return; - } + if ((i << 1) >= num_shell_builtins) || (i + height >= num_shell_builtins) { + println!("\n"); + return; + } } - dispcols = unsafe {libc::strlen(buf)}; + dispcols = unsafe { libc::strlen(buf) }; /* two spaces */ - for j in dispcols .. width{ - std::io::stdout().write(b" "); - } - /* second column */ - builtin1 = unsafe{&(*((shell_builtins as usize + (((i+height)*BUILTIN_SIZEOF!()) as usize)) as *mut builtin))}; - helpdoc = builtin1.short_doc as *mut libc::c_char; - unsafe { - if builtin1.flags && BUILTIN_ENABLED!()==1 { - *((buf as usize) as * mut c_char)=' ' as c_char; - } - else{ - *((buf as usize) as * mut c_char)='*' as c_char; - } - libc::strncpy (((buf as usize + 4 as usize ) as * mut c_char), helpdoc, width - 3); - *((buf as usize + (width - 3) as usize) as * mut c_char)='>' as c_char; - *((buf as usize+(width - 2) as usize) as * mut c_char)='\0' as c_char; - } - println! ("{:?}\n", buf); + for _j in dispcols..width { + std::io::stdout().write(b" "); + } + /* second column */ + builtin1 = unsafe { + &(*((shell_builtins as usize + (((i + height) * BUILTIN_SIZEOF!()) as usize)) + as *mut builtin)) + }; + helpdoc = builtin1.short_doc as *mut libc::c_char; + unsafe { + if builtin1.flags && BUILTIN_ENABLED!() == 1 { + *((buf as usize) as *mut c_char) = ' ' as c_char; + } else { + *((buf as usize) as *mut c_char) = '*' as c_char; + } + libc::strncpy( + (buf as usize + 4 as usize) as *mut c_char, + helpdoc, + width - 3, + ); + *((buf as usize + (width - 3) as usize) as *mut c_char) = '>' as c_char; + *((buf as usize + (width - 2) as usize) as *mut c_char) = '\0' as c_char; + } + println!("{:?}\n", buf); } -pub fn wdispcolumn (i : i32, buf :*mut c_char, bufsize : i32, width : i32, height : i32){ - let mut j : i32; +pub fn wdispcolumn(i: i32, _buf: *mut c_char, _bufsize: i32, _width: i32, _height: i32) { + let mut _j: i32; show_helpsynopsis(i); } -fn show_builtin_command_help (){ - let mut i : i32; - let mut j : i32; - let height : i32 = 76; - let mut width : usize; - let mut t :*mut libc::c_char; - let mut blurb:[libc::c_char;128] = ['0' as libc::c_char;128]; +fn show_builtin_command_help() { + let mut _i: i32; + let mut _j: i32; + let height: i32 = 76; + let mut width: usize; + let mut _t: *mut libc::c_char; + let mut blurb: [libc::c_char; 128] = ['0' as libc::c_char; 128]; let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); let resources = vec!["message.ftl".into()]; let bundle = mgr.get_bundle(get_local_str(), resources); let value = bundle.get_message("information").unwrap(); - let pattern = value.value().expect("partern err"); + let pattern = value.value().expect("partern err"); let mut errors = vec![]; let msg1 = bundle.format_pattern(&pattern, None, &mut errors); println!("{}\n", msg1); //println!("{}",("These shell commands are defined internally. Type `help' to see this list.\n Type `help name' to find out more about the function `name'.\n Use `info bash' to find out more about the shell in general.\n Use `man -k' or `info' to find out more about commands not in this list.\n A star (*) next to a name means that the command is disabled.\n")); - let ref2: &mut libc::c_char= &mut blurb[0]; + let ref2: &mut libc::c_char = &mut blurb[0]; unsafe { - width = default_columns(); - } - width /= 2; - if width > (std::mem::size_of::()*128) { - width = std::mem::size_of::()*128; - } - if width <= 3{ - width = 40; - } - for i in 0..height{ - unsafe { - QUIT(); - } - if MB_CUR_MAX!() > 1 { - let ptr2: *mut libc::c_char = ref2 as *mut libc::c_char; - wdispcolumn (i, ptr2,128, width as i32, height); - } -} + width = default_columns(); + } + width /= 2; + if width > (std::mem::size_of::() * 128) { + width = std::mem::size_of::() * 128; + } + if width <= 3 { + width = 40; + } + for i in 0..height { + unsafe { + QUIT(); + } + if MB_CUR_MAX!() > 1 { + let ptr2: *mut libc::c_char = ref2 as *mut libc::c_char; + wdispcolumn(i, ptr2, 128, width as i32, height); + } + } } //#endif /* HELP_BUILTIN */ -fn strmatch (pattern : *mut libc::c_char, string : *mut libc::c_char, flags : libc::c_char) -> libc::c_char -{ - if ((string as usize)as * mut c_char != std::ptr::null_mut()) || ((pattern as usize)as * mut c_char != std::ptr::null_mut()){ - return FNM_NOMATCH!(); - } - return unsafe {xstrmatch (pattern, string, flags)}; +fn strmatch( + pattern: *mut libc::c_char, + string: *mut libc::c_char, + flags: libc::c_char, +) -> libc::c_char { + if ((string as usize) as *mut c_char != std::ptr::null_mut()) + || ((pattern as usize) as *mut c_char != std::ptr::null_mut()) + { + return FNM_NOMATCH!(); + } + return unsafe { xstrmatch(pattern, string, flags) }; } struct Thing { - pointer_to_self: *mut Thing, + pointer_to_self: *mut Thing, } -fn xmalloc (size:usize) ->*mut c_void { - let ret: *mut c_void; -unsafe { - ret = libc::malloc(size); +fn xmalloc(size: usize) -> *mut c_void { + let ret: *mut c_void; + unsafe { + ret = libc::malloc(size); + } + // if (ret == 0) { + // println!("man2html: out of memory"); + // // fprintf(stderr, "man2html: out of memory"); + // (1) + // } + ret } -// if (ret == 0) { -// println!("man2html: out of memory"); -// // fprintf(stderr, "man2html: out of memory"); -// (1) -// } - ret -} // fn wcswidth(pwcs : *mut libc::wchar_t , n : i32) -> i32{ // let mut wc : libc::wchar_t; // let mut len : i32 = 0; // let mut l : i32; - + // while n-1 > 0 && *(pwcs as usize + 1 as usize) != '\0' as libc::wchar_t{ // wc = *(pwcs += 1); // if wcwidth(wc) < 0 { diff --git a/bash-5.1/builtins_rust/history/src/glob.rs b/bash-5.1/builtins_rust/history/src/glob.rs new file mode 100644 index 0000000000000000000000000000000000000000..54fc192201088d2d56e31be0fe781df4188402d2 --- /dev/null +++ b/bash-5.1/builtins_rust/history/src/glob.rs @@ -0,0 +1,4200 @@ +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. + +//# SPDX-License-Identifier: GPL-3.0-or-later + +/* automatically generated by rust-bindgen */ + +pub const __EXTENSIONS__: u32 = 1; +pub const _ALL_SOURCE: u32 = 1; +pub const _GNU_SOURCE: u32 = 1; +pub const _POSIX_PTHREAD_SEMANTICS: u32 = 1; +pub const _TANDEM_SOURCE: u32 = 1; +pub const JOB_CONTROL: u32 = 1; +pub const ALIAS: u32 = 1; +pub const PUSHD_AND_POPD: u32 = 1; +pub const BRACE_EXPANSION: u32 = 1; +pub const READLINE: u32 = 1; +pub const BANG_HISTORY: u32 = 1; +pub const HISTORY: u32 = 1; +pub const HELP_BUILTIN: u32 = 1; +pub const RESTRICTED_SHELL: u32 = 1; +pub const PROCESS_SUBSTITUTION: u32 = 1; +pub const PROMPT_STRING_DECODE: u32 = 1; +pub const SELECT_COMMAND: u32 = 1; +pub const COMMAND_TIMING: u32 = 1; +pub const ARRAY_VARS: u32 = 1; +pub const DPAREN_ARITHMETIC: u32 = 1; +pub const EXTENDED_GLOB: u32 = 1; +pub const EXTGLOB_DEFAULT: u32 = 0; +pub const COND_COMMAND: u32 = 1; +pub const COND_REGEXP: u32 = 1; +pub const COPROCESS_SUPPORT: u32 = 1; +pub const ARITH_FOR_COMMAND: u32 = 1; +pub const NETWORK_REDIRECTIONS: u32 = 1; +pub const PROGRAMMABLE_COMPLETION: u32 = 1; +pub const DEBUGGER: u32 = 1; +pub const MEMSCRAMBLE: u32 = 1; +pub const CASEMOD_ATTRS: u32 = 1; +pub const CASEMOD_EXPANSIONS: u32 = 1; +pub const GLOBASCII_DEFAULT: u32 = 1; +pub const FUNCTION_IMPORT: u32 = 1; +pub const ENABLE_NLS: u32 = 1; +pub const DEFAULT_PATH_VALUE: &'static [u8; 63usize] = + b"/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.\0"; +pub const STANDARD_UTILS_PATH: &'static [u8; 30usize] = b"/bin:/usr/bin:/usr/sbin:/sbin\0"; +pub const PPROMPT: &'static [u8; 11usize] = b"\\s-\\\\v\\\\$ \0"; +pub const SPROMPT: &'static [u8; 3usize] = b"> \0"; +pub const DEFAULT_BASHRC: &'static [u8; 10usize] = b"~/.bashrc\0"; +pub const SYS_BASH_LOGOUT: &'static [u8; 22usize] = b"/etc/bash.bash_logout\0"; +pub const MULTIPLE_COPROCS: u32 = 0; +pub const CHECKWINSIZE_DEFAULT: u32 = 1; +pub const OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT: u32 = 1; +pub const CHECKHASH_DEFAULT: u32 = 0; +pub const EVALNEST_MAX: u32 = 0; +pub const SOURCENEST_MAX: u32 = 0; +pub const OLDPWD_CHECK_DIRECTORY: u32 = 1; +pub const HISTEXPAND_DEFAULT: u32 = 1; +pub const ASSOC_KVPAIR_ASSIGNMENT: u32 = 1; +pub const HAVE_STRINGIZE: u32 = 1; +pub const HAVE_LONG_DOUBLE: u32 = 1; +pub const PROTOTYPES: u32 = 1; +pub const __PROTOTYPES: u32 = 1; +pub const HAVE_LONG_LONG: u32 = 1; +pub const HAVE_UNSIGNED_LONG_LONG: u32 = 1; +pub const SIZEOF_INT: u32 = 4; +pub const SIZEOF_LONG: u32 = 8; +pub const SIZEOF_CHAR_P: u32 = 8; +pub const SIZEOF_DOUBLE: u32 = 8; +pub const SIZEOF_INTMAX_T: u32 = 8; +pub const SIZEOF_LONG_LONG: u32 = 8; +pub const SIZEOF_WCHAR_T: u32 = 4; +pub const DEFAULT_MAIL_DIRECTORY: &'static [u8; 10usize] = b"/var/mail\0"; +pub const STDC_HEADERS: u32 = 1; +pub const HAVE_ALLOCA: u32 = 1; +pub const HAVE_ALLOCA_H: u32 = 1; +pub const MAJOR_IN_SYSMACROS: u32 = 1; +pub const HAVE_MBSTATE_T: u32 = 1; +pub const HAVE_QUAD_T: u32 = 1; +pub const HAVE_WCHAR_T: u32 = 1; +pub const HAVE_WCTYPE_T: u32 = 1; +pub const HAVE_WINT_T: u32 = 1; +pub const HAVE_DECL_SYS_SIGLIST: u32 = 1; +pub const UNDER_SYS_SIGLIST_DECLARED: u32 = 1; +pub const HAVE_SYS_SIGLIST: u32 = 1; +pub const HAVE_UNDER_SYS_SIGLIST: u32 = 1; +pub const HAVE_SYS_ERRLIST: u32 = 1; +pub const HAVE_STRUCT_DIRENT_D_INO: u32 = 1; +pub const HAVE_STRUCT_DIRENT_D_FILENO: u32 = 1; +pub const FIONREAD_IN_SYS_IOCTL: u32 = 1; +pub const GWINSZ_IN_SYS_IOCTL: u32 = 1; +pub const STRUCT_WINSIZE_IN_SYS_IOCTL: u32 = 1; +pub const TERMIOS_LDISC: u32 = 1; +pub const TERMIO_LDISC: u32 = 1; +pub const HAVE_STRUCT_STAT_ST_BLOCKS: u32 = 1; +pub const HAVE_STRUCT_TM_TM_ZONE: u32 = 1; +pub const HAVE_TM_ZONE: u32 = 1; +pub const HAVE_TIMEVAL: u32 = 1; +pub const HAVE_STRUCT_TIMEZONE: u32 = 1; +pub const WEXITSTATUS_OFFSET: u32 = 8; +pub const HAVE_STRUCT_TIMESPEC: u32 = 1; +pub const TIME_H_DEFINES_STRUCT_TIMESPEC: u32 = 1; +pub const HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC: u32 = 1; +pub const TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC: u32 = 1; +pub const HAVE_GETPW_DECLS: u32 = 1; +pub const HAVE_DECL_AUDIT_USER_TTY: u32 = 1; +pub const HAVE_DECL_CONFSTR: u32 = 1; +pub const HAVE_DECL_PRINTF: u32 = 1; +pub const HAVE_DECL_SBRK: u32 = 1; +pub const HAVE_DECL_STRCPY: u32 = 1; +pub const HAVE_DECL_STRSIGNAL: u32 = 1; +pub const HAVE_DECL_STRTOLD: u32 = 1; +pub const HAVE_DECL_STRTOIMAX: u32 = 1; +pub const HAVE_DECL_STRTOL: u32 = 1; +pub const HAVE_DECL_STRTOLL: u32 = 1; +pub const HAVE_DECL_STRTOUL: u32 = 1; +pub const HAVE_DECL_STRTOULL: u32 = 1; +pub const HAVE_DECL_STRTOUMAX: u32 = 1; +pub const GETPGRP_VOID: u32 = 1; +pub const PGRP_PIPE: u32 = 1; +pub const ULIMIT_MAXFDS: u32 = 1; +pub const CAN_REDEFINE_GETENV: u32 = 1; +pub const HAVE_STD_PUTENV: u32 = 1; +pub const HAVE_STD_UNSETENV: u32 = 1; +pub const HAVE_PRINTF_A_FORMAT: u32 = 1; +pub const HAVE_LANGINFO_CODESET: u32 = 1; +pub const HAVE_HASH_BANG_EXEC: u32 = 1; +pub const HAVE_DEV_FD: u32 = 1; +pub const DEV_FD_PREFIX: &'static [u8; 9usize] = b"/dev/fd/\0"; +pub const HAVE_DEV_STDIN: u32 = 1; +pub const VOID_SIGHANDLER: u32 = 1; +pub const HAVE_POSIX_SIGNALS: u32 = 1; +pub const HAVE_ASPRINTF: u32 = 1; +pub const HAVE_BCOPY: u32 = 1; +pub const HAVE_BZERO: u32 = 1; +pub const HAVE_CHOWN: u32 = 1; +pub const HAVE_CONFSTR: u32 = 1; +pub const HAVE_DLCLOSE: u32 = 1; +pub const HAVE_DLOPEN: u32 = 1; +pub const HAVE_DLSYM: u32 = 1; +pub const HAVE_DPRINTF: u32 = 1; +pub const HAVE_DUP2: u32 = 1; +pub const HAVE_EACCESS: u32 = 1; +pub const HAVE_FACCESSAT: u32 = 1; +pub const HAVE_FCNTL: u32 = 1; +pub const HAVE_FNMATCH: u32 = 1; +pub const FNMATCH_EQUIV_FALLBACK: u32 = 1; +pub const HAVE___FPURGE: u32 = 1; +pub const HAVE_DECL_FPURGE: u32 = 0; +pub const HAVE_GETADDRINFO: u32 = 1; +pub const HAVE_GETCWD: u32 = 1; +pub const HAVE_GETENTROPY: u32 = 1; +pub const HAVE_GETDTABLESIZE: u32 = 1; +pub const HAVE_GETGROUPS: u32 = 1; +pub const HAVE_GETHOSTBYNAME: u32 = 1; +pub const HAVE_GETHOSTNAME: u32 = 1; +pub const HAVE_GETPAGESIZE: u32 = 1; +pub const HAVE_GETPEERNAME: u32 = 1; +pub const HAVE_GETPWENT: u32 = 1; +pub const HAVE_GETPWNAM: u32 = 1; +pub const HAVE_GETPWUID: u32 = 1; +pub const HAVE_GETRANDOM: u32 = 1; +pub const HAVE_GETRLIMIT: u32 = 1; +pub const HAVE_GETRUSAGE: u32 = 1; +pub const HAVE_GETSERVBYNAME: u32 = 1; +pub const HAVE_GETSERVENT: u32 = 1; +pub const HAVE_GETTIMEOFDAY: u32 = 1; +pub const HAVE_ICONV: u32 = 1; +pub const HAVE_IMAXDIV: u32 = 1; +pub const HAVE_INET_ATON: u32 = 1; +pub const HAVE_ISASCII: u32 = 1; +pub const HAVE_ISBLANK: u32 = 1; +pub const HAVE_ISGRAPH: u32 = 1; +pub const HAVE_ISPRINT: u32 = 1; +pub const HAVE_ISSPACE: u32 = 1; +pub const HAVE_ISWCTYPE: u32 = 1; +pub const HAVE_ISWLOWER: u32 = 1; +pub const HAVE_ISWUPPER: u32 = 1; +pub const HAVE_ISXDIGIT: u32 = 1; +pub const HAVE_KILL: u32 = 1; +pub const HAVE_KILLPG: u32 = 1; +pub const HAVE_LSTAT: u32 = 1; +pub const HAVE_MBRLEN: u32 = 1; +pub const HAVE_MBRTOWC: u32 = 1; +pub const HAVE_MBSNRTOWCS: u32 = 1; +pub const HAVE_MBSRTOWCS: u32 = 1; +pub const HAVE_MEMMOVE: u32 = 1; +pub const HAVE_MEMSET: u32 = 1; +pub const HAVE_MKDTEMP: u32 = 1; +pub const HAVE_MKFIFO: u32 = 1; +pub const HAVE_MKSTEMP: u32 = 1; +pub const HAVE_PATHCONF: u32 = 1; +pub const HAVE_PSELECT: u32 = 1; +pub const HAVE_PREAD: u32 = 1; +pub const HAVE_PUTENV: u32 = 1; +pub const HAVE_RAISE: u32 = 1; +pub const HAVE_RANDOM: u32 = 1; +pub const HAVE_READLINK: u32 = 1; +pub const HAVE_REGCOMP: u32 = 1; +pub const HAVE_REGEXEC: u32 = 1; +pub const HAVE_RENAME: u32 = 1; +pub const HAVE_SBRK: u32 = 1; +pub const HAVE_SELECT: u32 = 1; +pub const HAVE_SETENV: u32 = 1; +pub const HAVE_SETITIMER: u32 = 1; +pub const HAVE_SETLINEBUF: u32 = 1; +pub const HAVE_SETLOCALE: u32 = 1; +pub const HAVE_DECL_SETREGID: u32 = 1; +pub const HAVE_SETRESGID: u32 = 1; +pub const HAVE_SETRESUID: u32 = 1; +pub const HAVE_SETVBUF: u32 = 1; +pub const HAVE_SIGINTERRUPT: u32 = 1; +pub const HAVE_POSIX_SIGSETJMP: u32 = 1; +pub const HAVE_SNPRINTF: u32 = 1; +pub const HAVE_STRCASECMP: u32 = 1; +pub const HAVE_STRCASESTR: u32 = 1; +pub const HAVE_STRCHR: u32 = 1; +pub const HAVE_STRCHRNUL: u32 = 1; +pub const HAVE_STRCOLL: u32 = 1; +pub const HAVE_STRERROR: u32 = 1; +pub const HAVE_STRFTIME: u32 = 1; +pub const HAVE_STRNLEN: u32 = 1; +pub const HAVE_STRPBRK: u32 = 1; +pub const HAVE_STRSTR: u32 = 1; +pub const HAVE_STRTOD: u32 = 1; +pub const HAVE_STRTOIMAX: u32 = 1; +pub const HAVE_STRTOL: u32 = 1; +pub const HAVE_STRTOLL: u32 = 1; +pub const HAVE_STRTOUL: u32 = 1; +pub const HAVE_STRTOULL: u32 = 1; +pub const HAVE_STRTOUMAX: u32 = 1; +pub const HAVE_STRSIGNAL: u32 = 1; +pub const HAVE_SYSCONF: u32 = 1; +pub const HAVE_SYSLOG: u32 = 1; +pub const HAVE_TCGETATTR: u32 = 1; +pub const HAVE_TCGETPGRP: u32 = 1; +pub const HAVE_TIMES: u32 = 1; +pub const HAVE_TOWLOWER: u32 = 1; +pub const HAVE_TOWUPPER: u32 = 1; +pub const HAVE_TTYNAME: u32 = 1; +pub const HAVE_TZSET: u32 = 1; +pub const HAVE_ULIMIT: u32 = 1; +pub const HAVE_UNAME: u32 = 1; +pub const HAVE_UNSETENV: u32 = 1; +pub const HAVE_VASPRINTF: u32 = 1; +pub const HAVE_VPRINTF: u32 = 1; +pub const HAVE_VSNPRINTF: u32 = 1; +pub const HAVE_WAITPID: u32 = 1; +pub const HAVE_WAIT3: u32 = 1; +pub const HAVE_WCRTOMB: u32 = 1; +pub const HAVE_WCSCOLL: u32 = 1; +pub const HAVE_WCSDUP: u32 = 1; +pub const HAVE_WCTYPE: u32 = 1; +pub const HAVE_WCSWIDTH: u32 = 1; +pub const HAVE_WCWIDTH: u32 = 1; +pub const HAVE_ARPA_INET_H: u32 = 1; +pub const HAVE_DIRENT_H: u32 = 1; +pub const HAVE_DLFCN_H: u32 = 1; +pub const HAVE_GRP_H: u32 = 1; +pub const HAVE_INTTYPES_H: u32 = 1; +pub const HAVE_LANGINFO_H: u32 = 1; +pub const HAVE_LIMITS_H: u32 = 1; +pub const HAVE_LOCALE_H: u32 = 1; +pub const HAVE_NETDB_H: u32 = 1; +pub const HAVE_NETINET_IN_H: u32 = 1; +pub const HAVE_PWD_H: u32 = 1; +pub const HAVE_REGEX_H: u32 = 1; +pub const HAVE_STDLIB_H: u32 = 1; +pub const HAVE_STDARG_H: u32 = 1; +pub const HAVE_STRING_H: u32 = 1; +pub const HAVE_STRINGS_H: u32 = 1; +pub const HAVE_MEMORY_H: u32 = 1; +pub const HAVE_STDBOOL_H: u32 = 1; +pub const HAVE_STDDEF_H: u32 = 1; +pub const HAVE_STDINT_H: u32 = 1; +pub const HAVE_SYSLOG_H: u32 = 1; +pub const HAVE_SYS_FILE_H: u32 = 1; +pub const HAVE_SYS_IOCTL_H: u32 = 1; +pub const HAVE_SYS_MMAN_H: u32 = 1; +pub const HAVE_SYS_PARAM_H: u32 = 1; +pub const HAVE_SYS_RANDOM_H: u32 = 1; +pub const HAVE_SYS_RESOURCE_H: u32 = 1; +pub const HAVE_SYS_SELECT_H: u32 = 1; +pub const HAVE_SYS_SOCKET_H: u32 = 1; +pub const HAVE_SYS_STAT_H: u32 = 1; +pub const HAVE_SYS_TIME_H: u32 = 1; +pub const TIME_WITH_SYS_TIME: u32 = 1; +pub const HAVE_SYS_TIMES_H: u32 = 1; +pub const HAVE_SYS_TYPES_H: u32 = 1; +pub const HAVE_SYS_WAIT_H: u32 = 1; +pub const HAVE_TERMCAP_H: u32 = 1; +pub const HAVE_TERMIO_H: u32 = 1; +pub const HAVE_TERMIOS_H: u32 = 1; +pub const HAVE_ULIMIT_H: u32 = 1; +pub const HAVE_UNISTD_H: u32 = 1; +pub const HAVE_WCHAR_H: u32 = 1; +pub const HAVE_WCTYPE_H: u32 = 1; +pub const HAVE_LIBDL: u32 = 1; +pub const HAVE_ARGZ_H: u32 = 1; +pub const HAVE_ERRNO_H: u32 = 1; +pub const HAVE_FCNTL_H: u32 = 1; +pub const HAVE_MALLOC_H: u32 = 1; +pub const HAVE_STDIO_EXT_H: u32 = 1; +pub const HAVE_DCGETTEXT: u32 = 1; +pub const HAVE_LOCALECONV: u32 = 1; +pub const HAVE_MEMPCPY: u32 = 1; +pub const HAVE_MMAP: u32 = 1; +pub const HAVE_MREMAP: u32 = 1; +pub const HAVE_MUNMAP: u32 = 1; +pub const HAVE_STPCPY: u32 = 1; +pub const HAVE_STRCSPN: u32 = 1; +pub const HAVE_STRDUP: u32 = 1; +pub const HAVE___ARGZ_COUNT: u32 = 1; +pub const HAVE___ARGZ_NEXT: u32 = 1; +pub const HAVE___ARGZ_STRINGIFY: u32 = 1; +pub const RESTRICTED_SHELL_NAME: &'static [u8; 6usize] = b"rbash\0"; +pub const _WCHAR_H: u32 = 1; +pub const _FEATURES_H: u32 = 1; +pub const _ISOC95_SOURCE: u32 = 1; +pub const _ISOC99_SOURCE: u32 = 1; +pub const _ISOC11_SOURCE: u32 = 1; +pub const _POSIX_SOURCE: u32 = 1; +pub const _POSIX_C_SOURCE: u32 = 200809; +pub const _XOPEN_SOURCE: u32 = 700; +pub const _XOPEN_SOURCE_EXTENDED: u32 = 1; +pub const _LARGEFILE64_SOURCE: u32 = 1; +pub const _DEFAULT_SOURCE: u32 = 1; +pub const _ATFILE_SOURCE: u32 = 1; +pub const __USE_ISOC11: u32 = 1; +pub const __USE_ISOC99: u32 = 1; +pub const __USE_ISOC95: u32 = 1; +pub const __USE_POSIX: u32 = 1; +pub const __USE_POSIX2: u32 = 1; +pub const __USE_POSIX199309: u32 = 1; +pub const __USE_POSIX199506: u32 = 1; +pub const __USE_XOPEN2K: u32 = 1; +pub const __USE_XOPEN2K8: u32 = 1; +pub const __USE_XOPEN: u32 = 1; +pub const __USE_XOPEN_EXTENDED: u32 = 1; +pub const __USE_UNIX98: u32 = 1; +pub const _LARGEFILE_SOURCE: u32 = 1; +pub const __USE_XOPEN2K8XSI: u32 = 1; +pub const __USE_XOPEN2KXSI: u32 = 1; +pub const __USE_LARGEFILE: u32 = 1; +pub const __USE_LARGEFILE64: u32 = 1; +pub const __USE_MISC: u32 = 1; +pub const __USE_ATFILE: u32 = 1; +pub const __USE_GNU: u32 = 1; +pub const __USE_FORTIFY_LEVEL: u32 = 0; +pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; +pub const _STDC_PREDEF_H: u32 = 1; +pub const __STDC_IEC_559__: u32 = 1; +pub const __STDC_IEC_559_COMPLEX__: u32 = 1; +pub const __STDC_ISO_10646__: u32 = 201706; +pub const __GNU_LIBRARY__: u32 = 6; +pub const __GLIBC__: u32 = 2; +pub const __GLIBC_MINOR__: u32 = 28; +pub const _SYS_CDEFS_H: u32 = 1; +pub const __glibc_c99_flexarr_available: u32 = 1; +pub const __WORDSIZE: u32 = 64; +pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; +pub const __SYSCALL_WORDSIZE: u32 = 64; +pub const __HAVE_GENERIC_SELECTION: u32 = 1; +pub const __GLIBC_USE_LIB_EXT2: u32 = 1; +pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 1; +pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 1; +pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 1; +pub const __HAVE_FLOAT128: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT128: u32 = 0; +pub const __HAVE_FLOAT64X: u32 = 1; +pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1; +pub const __HAVE_FLOAT16: u32 = 0; +pub const __HAVE_FLOAT32: u32 = 1; +pub const __HAVE_FLOAT64: u32 = 1; +pub const __HAVE_FLOAT32X: u32 = 1; +pub const __HAVE_FLOAT128X: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT16: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT32: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT64: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0; +pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0; +pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0; +pub const __GNUC_VA_LIST: u32 = 1; +pub const _BITS_WCHAR_H: u32 = 1; +pub const __wint_t_defined: u32 = 1; +pub const _WINT_T: u32 = 1; +pub const __mbstate_t_defined: u32 = 1; +pub const ____mbstate_t_defined: u32 = 1; +pub const ____FILE_defined: u32 = 1; +pub const __FILE_defined: u32 = 1; +pub const _BITS_TYPES_LOCALE_T_H: u32 = 1; +pub const _BITS_TYPES___LOCALE_T_H: u32 = 1; +pub const WEOF: u32 = 4294967295; +pub const _WCTYPE_H: u32 = 1; +pub const _BITS_TYPES_H: u32 = 1; +pub const _BITS_TYPESIZES_H: u32 = 1; +pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; +pub const __INO_T_MATCHES_INO64_T: u32 = 1; +pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; +pub const __FD_SETSIZE: u32 = 1024; +pub const _BITS_WCTYPE_WCHAR_H: u32 = 1; +pub const _ENDIAN_H: u32 = 1; +pub const __LITTLE_ENDIAN: u32 = 1234; +pub const __BIG_ENDIAN: u32 = 4321; +pub const __PDP_ENDIAN: u32 = 3412; +pub const __BYTE_ORDER: u32 = 1234; +pub const __FLOAT_WORD_ORDER: u32 = 1234; +pub const LITTLE_ENDIAN: u32 = 1234; +pub const BIG_ENDIAN: u32 = 4321; +pub const PDP_ENDIAN: u32 = 3412; +pub const BYTE_ORDER: u32 = 1234; +pub const _BITS_BYTESWAP_H: u32 = 1; +pub const _BITS_UINTN_IDENTITY_H: u32 = 1; +pub const HANDLE_MULTIBYTE: u32 = 1; +pub const _LIBC_LIMITS_H_: u32 = 1; +pub const MB_LEN_MAX: u32 = 16; +pub const CHAR_WIDTH: u32 = 8; +pub const SCHAR_WIDTH: u32 = 8; +pub const UCHAR_WIDTH: u32 = 8; +pub const SHRT_WIDTH: u32 = 16; +pub const USHRT_WIDTH: u32 = 16; +pub const INT_WIDTH: u32 = 32; +pub const UINT_WIDTH: u32 = 32; +pub const LONG_WIDTH: u32 = 64; +pub const ULONG_WIDTH: u32 = 64; +pub const LLONG_WIDTH: u32 = 64; +pub const ULLONG_WIDTH: u32 = 64; +pub const _BITS_POSIX1_LIM_H: u32 = 1; +pub const _POSIX_AIO_LISTIO_MAX: u32 = 2; +pub const _POSIX_AIO_MAX: u32 = 1; +pub const _POSIX_ARG_MAX: u32 = 4096; +pub const _POSIX_CHILD_MAX: u32 = 25; +pub const _POSIX_DELAYTIMER_MAX: u32 = 32; +pub const _POSIX_HOST_NAME_MAX: u32 = 255; +pub const _POSIX_LINK_MAX: u32 = 8; +pub const _POSIX_LOGIN_NAME_MAX: u32 = 9; +pub const _POSIX_MAX_CANON: u32 = 255; +pub const _POSIX_MAX_INPUT: u32 = 255; +pub const _POSIX_MQ_OPEN_MAX: u32 = 8; +pub const _POSIX_MQ_PRIO_MAX: u32 = 32; +pub const _POSIX_NAME_MAX: u32 = 14; +pub const _POSIX_NGROUPS_MAX: u32 = 8; +pub const _POSIX_OPEN_MAX: u32 = 20; +pub const _POSIX_FD_SETSIZE: u32 = 20; +pub const _POSIX_PATH_MAX: u32 = 256; +pub const _POSIX_PIPE_BUF: u32 = 512; +pub const _POSIX_RE_DUP_MAX: u32 = 255; +pub const _POSIX_RTSIG_MAX: u32 = 8; +pub const _POSIX_SEM_NSEMS_MAX: u32 = 256; +pub const _POSIX_SEM_VALUE_MAX: u32 = 32767; +pub const _POSIX_SIGQUEUE_MAX: u32 = 32; +pub const _POSIX_SSIZE_MAX: u32 = 32767; +pub const _POSIX_STREAM_MAX: u32 = 8; +pub const _POSIX_SYMLINK_MAX: u32 = 255; +pub const _POSIX_SYMLOOP_MAX: u32 = 8; +pub const _POSIX_TIMER_MAX: u32 = 32; +pub const _POSIX_TTY_NAME_MAX: u32 = 9; +pub const _POSIX_TZNAME_MAX: u32 = 6; +pub const _POSIX_QLIMIT: u32 = 1; +pub const _POSIX_HIWAT: u32 = 512; +pub const _POSIX_UIO_MAXIOV: u32 = 16; +pub const _POSIX_CLOCKRES_MIN: u32 = 20000000; +pub const NR_OPEN: u32 = 1024; +pub const NGROUPS_MAX: u32 = 65536; +pub const ARG_MAX: u32 = 131072; +pub const LINK_MAX: u32 = 127; +pub const MAX_CANON: u32 = 255; +pub const MAX_INPUT: u32 = 255; +pub const NAME_MAX: u32 = 255; +pub const PATH_MAX: u32 = 4096; +pub const PIPE_BUF: u32 = 4096; +pub const XATTR_NAME_MAX: u32 = 255; +pub const XATTR_SIZE_MAX: u32 = 65536; +pub const XATTR_LIST_MAX: u32 = 65536; +pub const RTSIG_MAX: u32 = 32; +pub const _POSIX_THREAD_KEYS_MAX: u32 = 128; +pub const PTHREAD_KEYS_MAX: u32 = 1024; +pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4; +pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4; +pub const _POSIX_THREAD_THREADS_MAX: u32 = 64; +pub const AIO_PRIO_DELTA_MAX: u32 = 20; +pub const PTHREAD_STACK_MIN: u32 = 16384; +pub const DELAYTIMER_MAX: u32 = 2147483647; +pub const TTY_NAME_MAX: u32 = 32; +pub const LOGIN_NAME_MAX: u32 = 256; +pub const HOST_NAME_MAX: u32 = 64; +pub const MQ_PRIO_MAX: u32 = 32768; +pub const SEM_VALUE_MAX: u32 = 2147483647; +pub const _BITS_POSIX2_LIM_H: u32 = 1; +pub const _POSIX2_BC_BASE_MAX: u32 = 99; +pub const _POSIX2_BC_DIM_MAX: u32 = 2048; +pub const _POSIX2_BC_SCALE_MAX: u32 = 99; +pub const _POSIX2_BC_STRING_MAX: u32 = 1000; +pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2; +pub const _POSIX2_EXPR_NEST_MAX: u32 = 32; +pub const _POSIX2_LINE_MAX: u32 = 2048; +pub const _POSIX2_RE_DUP_MAX: u32 = 255; +pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14; +pub const BC_BASE_MAX: u32 = 99; +pub const BC_DIM_MAX: u32 = 2048; +pub const BC_SCALE_MAX: u32 = 99; +pub const BC_STRING_MAX: u32 = 1000; +pub const COLL_WEIGHTS_MAX: u32 = 255; +pub const EXPR_NEST_MAX: u32 = 32; +pub const LINE_MAX: u32 = 2048; +pub const CHARCLASS_NAME_MAX: u32 = 2048; +pub const RE_DUP_MAX: u32 = 32767; +pub const _XOPEN_LIM_H: u32 = 1; +pub const _XOPEN_IOV_MAX: u32 = 16; +pub const _BITS_UIO_LIM_H: u32 = 1; +pub const __IOV_MAX: u32 = 1024; +pub const IOV_MAX: u32 = 1024; +pub const NL_ARGMAX: u32 = 4096; +pub const NL_LANGMAX: u32 = 2048; +pub const NZERO: u32 = 20; +pub const WORD_BIT: u32 = 32; +pub const LONG_BIT: u32 = 64; +pub const _UNISTD_H: u32 = 1; +pub const _POSIX_VERSION: u32 = 200809; +pub const __POSIX2_THIS_VERSION: u32 = 200809; +pub const _POSIX2_VERSION: u32 = 200809; +pub const _POSIX2_C_VERSION: u32 = 200809; +pub const _POSIX2_C_BIND: u32 = 200809; +pub const _POSIX2_C_DEV: u32 = 200809; +pub const _POSIX2_SW_DEV: u32 = 200809; +pub const _POSIX2_LOCALEDEF: u32 = 200809; +pub const _XOPEN_VERSION: u32 = 700; +pub const _XOPEN_XCU_VERSION: u32 = 4; +pub const _XOPEN_XPG2: u32 = 1; +pub const _XOPEN_XPG3: u32 = 1; +pub const _XOPEN_XPG4: u32 = 1; +pub const _XOPEN_UNIX: u32 = 1; +pub const _XOPEN_ENH_I18N: u32 = 1; +pub const _XOPEN_LEGACY: u32 = 1; +pub const _BITS_POSIX_OPT_H: u32 = 1; +pub const _POSIX_JOB_CONTROL: u32 = 1; +pub const _POSIX_SAVED_IDS: u32 = 1; +pub const _POSIX_PRIORITY_SCHEDULING: u32 = 200809; +pub const _POSIX_SYNCHRONIZED_IO: u32 = 200809; +pub const _POSIX_FSYNC: u32 = 200809; +pub const _POSIX_MAPPED_FILES: u32 = 200809; +pub const _POSIX_MEMLOCK: u32 = 200809; +pub const _POSIX_MEMLOCK_RANGE: u32 = 200809; +pub const _POSIX_MEMORY_PROTECTION: u32 = 200809; +pub const _POSIX_CHOWN_RESTRICTED: u32 = 0; +pub const _POSIX_VDISABLE: u8 = 0u8; +pub const _POSIX_NO_TRUNC: u32 = 1; +pub const _XOPEN_REALTIME: u32 = 1; +pub const _XOPEN_REALTIME_THREADS: u32 = 1; +pub const _XOPEN_SHM: u32 = 1; +pub const _POSIX_THREADS: u32 = 200809; +pub const _POSIX_REENTRANT_FUNCTIONS: u32 = 1; +pub const _POSIX_THREAD_SAFE_FUNCTIONS: u32 = 200809; +pub const _POSIX_THREAD_PRIORITY_SCHEDULING: u32 = 200809; +pub const _POSIX_THREAD_ATTR_STACKSIZE: u32 = 200809; +pub const _POSIX_THREAD_ATTR_STACKADDR: u32 = 200809; +pub const _POSIX_THREAD_PRIO_INHERIT: u32 = 200809; +pub const _POSIX_THREAD_PRIO_PROTECT: u32 = 200809; +pub const _POSIX_THREAD_ROBUST_PRIO_INHERIT: u32 = 200809; +pub const _POSIX_THREAD_ROBUST_PRIO_PROTECT: i32 = -1; +pub const _POSIX_SEMAPHORES: u32 = 200809; +pub const _POSIX_REALTIME_SIGNALS: u32 = 200809; +pub const _POSIX_ASYNCHRONOUS_IO: u32 = 200809; +pub const _POSIX_ASYNC_IO: u32 = 1; +pub const _LFS_ASYNCHRONOUS_IO: u32 = 1; +pub const _POSIX_PRIORITIZED_IO: u32 = 200809; +pub const _LFS64_ASYNCHRONOUS_IO: u32 = 1; +pub const _LFS_LARGEFILE: u32 = 1; +pub const _LFS64_LARGEFILE: u32 = 1; +pub const _LFS64_STDIO: u32 = 1; +pub const _POSIX_SHARED_MEMORY_OBJECTS: u32 = 200809; +pub const _POSIX_CPUTIME: u32 = 0; +pub const _POSIX_THREAD_CPUTIME: u32 = 0; +pub const _POSIX_REGEXP: u32 = 1; +pub const _POSIX_READER_WRITER_LOCKS: u32 = 200809; +pub const _POSIX_SHELL: u32 = 1; +pub const _POSIX_TIMEOUTS: u32 = 200809; +pub const _POSIX_SPIN_LOCKS: u32 = 200809; +pub const _POSIX_SPAWN: u32 = 200809; +pub const _POSIX_TIMERS: u32 = 200809; +pub const _POSIX_BARRIERS: u32 = 200809; +pub const _POSIX_MESSAGE_PASSING: u32 = 200809; +pub const _POSIX_THREAD_PROCESS_SHARED: u32 = 200809; +pub const _POSIX_MONOTONIC_CLOCK: u32 = 0; +pub const _POSIX_CLOCK_SELECTION: u32 = 200809; +pub const _POSIX_ADVISORY_INFO: u32 = 200809; +pub const _POSIX_IPV6: u32 = 200809; +pub const _POSIX_RAW_SOCKETS: u32 = 200809; +pub const _POSIX2_CHAR_TERM: u32 = 200809; +pub const _POSIX_SPORADIC_SERVER: i32 = -1; +pub const _POSIX_THREAD_SPORADIC_SERVER: i32 = -1; +pub const _POSIX_TRACE: i32 = -1; +pub const _POSIX_TRACE_EVENT_FILTER: i32 = -1; +pub const _POSIX_TRACE_INHERIT: i32 = -1; +pub const _POSIX_TRACE_LOG: i32 = -1; +pub const _POSIX_TYPED_MEMORY_OBJECTS: i32 = -1; +pub const _POSIX_V7_LPBIG_OFFBIG: i32 = -1; +pub const _POSIX_V6_LPBIG_OFFBIG: i32 = -1; +pub const _XBS5_LPBIG_OFFBIG: i32 = -1; +pub const _POSIX_V7_LP64_OFF64: u32 = 1; +pub const _POSIX_V6_LP64_OFF64: u32 = 1; +pub const _XBS5_LP64_OFF64: u32 = 1; +pub const __ILP32_OFF32_CFLAGS: &'static [u8; 5usize] = b"-m32\0"; +pub const __ILP32_OFF32_LDFLAGS: &'static [u8; 5usize] = b"-m32\0"; +pub const __ILP32_OFFBIG_CFLAGS: &'static [u8; 48usize] = + b"-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64\0"; +pub const __ILP32_OFFBIG_LDFLAGS: &'static [u8; 5usize] = b"-m32\0"; +pub const __LP64_OFF64_CFLAGS: &'static [u8; 5usize] = b"-m64\0"; +pub const __LP64_OFF64_LDFLAGS: &'static [u8; 5usize] = b"-m64\0"; +pub const STDIN_FILENO: u32 = 0; +pub const STDOUT_FILENO: u32 = 1; +pub const STDERR_FILENO: u32 = 2; +pub const R_OK: u32 = 4; +pub const W_OK: u32 = 2; +pub const X_OK: u32 = 1; +pub const F_OK: u32 = 0; +pub const SEEK_SET: u32 = 0; +pub const SEEK_CUR: u32 = 1; +pub const SEEK_END: u32 = 2; +pub const SEEK_DATA: u32 = 3; +pub const SEEK_HOLE: u32 = 4; +pub const L_SET: u32 = 0; +pub const L_INCR: u32 = 1; +pub const L_XTND: u32 = 2; +pub const _GETOPT_POSIX_H: u32 = 1; +pub const _GETOPT_CORE_H: u32 = 1; +pub const F_ULOCK: u32 = 0; +pub const F_LOCK: u32 = 1; +pub const F_TLOCK: u32 = 2; +pub const F_TEST: u32 = 3; +pub const _BITS_SIGNUM_H: u32 = 1; +pub const _BITS_SIGNUM_GENERIC_H: u32 = 1; +pub const SIGINT: u32 = 2; +pub const SIGILL: u32 = 4; +pub const SIGABRT: u32 = 6; +pub const SIGFPE: u32 = 8; +pub const SIGSEGV: u32 = 11; +pub const SIGTERM: u32 = 15; +pub const SIGHUP: u32 = 1; +pub const SIGQUIT: u32 = 3; +pub const SIGTRAP: u32 = 5; +pub const SIGKILL: u32 = 9; +pub const SIGBUS: u32 = 10; +pub const SIGSYS: u32 = 12; +pub const SIGPIPE: u32 = 13; +pub const SIGALRM: u32 = 14; +pub const SIGURG: u32 = 16; +pub const SIGSTOP: u32 = 17; +pub const SIGTSTP: u32 = 18; +pub const SIGCONT: u32 = 19; +pub const SIGCHLD: u32 = 20; +pub const SIGTTIN: u32 = 21; +pub const SIGTTOU: u32 = 22; +pub const SIGPOLL: u32 = 23; +pub const SIGXCPU: u32 = 24; +pub const SIGXFSZ: u32 = 25; +pub const SIGVTALRM: u32 = 26; +pub const SIGPROF: u32 = 27; +pub const SIGUSR1: u32 = 30; +pub const SIGUSR2: u32 = 31; +pub const SIGWINCH: u32 = 28; +pub const SIGIO: u32 = 23; +pub const SIGIOT: u32 = 6; +pub const SIGCLD: u32 = 20; +pub const __SIGRTMIN: u32 = 32; +pub const __SIGRTMAX: u32 = 32; +pub const _NSIG: u32 = 33; +pub const SIGSTKFLT: u32 = 16; +pub const SIGPWR: u32 = 30; +pub const __sig_atomic_t_defined: u32 = 1; +pub const __sigset_t_defined: u32 = 1; +pub const _STRUCT_TIMESPEC: u32 = 1; +pub const __siginfo_t_defined: u32 = 1; +pub const __SI_MAX_SIZE: u32 = 128; +pub const _BITS_SIGINFO_ARCH_H: u32 = 1; +pub const __SI_ERRNO_THEN_CODE: u32 = 1; +pub const __SI_HAVE_SIGSYS: u32 = 1; +pub const _BITS_SIGINFO_CONSTS_H: u32 = 1; +pub const __SI_ASYNCIO_AFTER_SIGIO: u32 = 1; +pub const _BITS_SIGINFO_CONSTS_ARCH_H: u32 = 1; +pub const __sigevent_t_defined: u32 = 1; +pub const __SIGEV_MAX_SIZE: u32 = 64; +pub const __have_pthread_attr_t: u32 = 1; +pub const _BITS_SIGEVENT_CONSTS_H: u32 = 1; +pub const NSIG: u32 = 33; +pub const _BITS_SIGACTION_H: u32 = 1; +pub const SA_NOCLDSTOP: u32 = 1; +pub const SA_NOCLDWAIT: u32 = 2; +pub const SA_SIGINFO: u32 = 4; +pub const SA_ONSTACK: u32 = 134217728; +pub const SA_RESTART: u32 = 268435456; +pub const SA_NODEFER: u32 = 1073741824; +pub const SA_RESETHAND: u32 = 2147483648; +pub const SA_INTERRUPT: u32 = 536870912; +pub const SA_NOMASK: u32 = 1073741824; +pub const SA_ONESHOT: u32 = 2147483648; +pub const SA_STACK: u32 = 134217728; +pub const SIG_BLOCK: u32 = 0; +pub const SIG_UNBLOCK: u32 = 1; +pub const SIG_SETMASK: u32 = 2; +pub const _BITS_SIGCONTEXT_H: u32 = 1; +pub const FP_XSTATE_MAGIC1: u32 = 1179670611; +pub const FP_XSTATE_MAGIC2: u32 = 1179670597; +pub const __stack_t_defined: u32 = 1; +pub const _SYS_UCONTEXT_H: u32 = 1; +pub const __NGREG: u32 = 23; +pub const NGREG: u32 = 23; +pub const _BITS_SIGSTACK_H: u32 = 1; +pub const MINSIGSTKSZ: u32 = 2048; +pub const SIGSTKSZ: u32 = 8192; +pub const _BITS_SS_FLAGS_H: u32 = 1; +pub const __sigstack_defined: u32 = 1; +pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1; +pub const _THREAD_SHARED_TYPES_H: u32 = 1; +pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1; +pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40; +pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56; +pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; +pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; +pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; +pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; +pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; +pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; +pub const __PTHREAD_MUTEX_LOCK_ELISION: u32 = 1; +pub const __PTHREAD_MUTEX_NUSERS_AFTER_KIND: u32 = 0; +pub const __PTHREAD_MUTEX_USE_UNION: u32 = 0; +pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED: u32 = 1; +pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; +pub const _BITS_SIGTHREAD_H: u32 = 1; +pub const _STDINT_H: u32 = 1; +pub const _BITS_STDINT_INTN_H: u32 = 1; +pub const _BITS_STDINT_UINTN_H: u32 = 1; +pub const INT8_MIN: i32 = -128; +pub const INT16_MIN: i32 = -32768; +pub const INT32_MIN: i32 = -2147483648; +pub const INT8_MAX: u32 = 127; +pub const INT16_MAX: u32 = 32767; +pub const INT32_MAX: u32 = 2147483647; +pub const UINT8_MAX: u32 = 255; +pub const UINT16_MAX: u32 = 65535; +pub const UINT32_MAX: u32 = 4294967295; +pub const INT_LEAST8_MIN: i32 = -128; +pub const INT_LEAST16_MIN: i32 = -32768; +pub const INT_LEAST32_MIN: i32 = -2147483648; +pub const INT_LEAST8_MAX: u32 = 127; +pub const INT_LEAST16_MAX: u32 = 32767; +pub const INT_LEAST32_MAX: u32 = 2147483647; +pub const UINT_LEAST8_MAX: u32 = 255; +pub const UINT_LEAST16_MAX: u32 = 65535; +pub const UINT_LEAST32_MAX: u32 = 4294967295; +pub const INT_FAST8_MIN: i32 = -128; +pub const INT_FAST16_MIN: i64 = -9223372036854775808; +pub const INT_FAST32_MIN: i64 = -9223372036854775808; +pub const INT_FAST8_MAX: u32 = 127; +pub const INT_FAST16_MAX: u64 = 9223372036854775807; +pub const INT_FAST32_MAX: u64 = 9223372036854775807; +pub const UINT_FAST8_MAX: u32 = 255; +pub const UINT_FAST16_MAX: i32 = -1; +pub const UINT_FAST32_MAX: i32 = -1; +pub const INTPTR_MIN: i64 = -9223372036854775808; +pub const INTPTR_MAX: u64 = 9223372036854775807; +pub const UINTPTR_MAX: i32 = -1; +pub const PTRDIFF_MIN: i64 = -9223372036854775808; +pub const PTRDIFF_MAX: u64 = 9223372036854775807; +pub const SIG_ATOMIC_MIN: i32 = -2147483648; +pub const SIG_ATOMIC_MAX: u32 = 2147483647; +pub const SIZE_MAX: i32 = -1; +pub const WINT_MIN: u32 = 0; +pub const WINT_MAX: u32 = 4294967295; +pub const INT8_WIDTH: u32 = 8; +pub const UINT8_WIDTH: u32 = 8; +pub const INT16_WIDTH: u32 = 16; +pub const UINT16_WIDTH: u32 = 16; +pub const INT32_WIDTH: u32 = 32; +pub const UINT32_WIDTH: u32 = 32; +pub const INT64_WIDTH: u32 = 64; +pub const UINT64_WIDTH: u32 = 64; +pub const INT_LEAST8_WIDTH: u32 = 8; +pub const UINT_LEAST8_WIDTH: u32 = 8; +pub const INT_LEAST16_WIDTH: u32 = 16; +pub const UINT_LEAST16_WIDTH: u32 = 16; +pub const INT_LEAST32_WIDTH: u32 = 32; +pub const UINT_LEAST32_WIDTH: u32 = 32; +pub const INT_LEAST64_WIDTH: u32 = 64; +pub const UINT_LEAST64_WIDTH: u32 = 64; +pub const INT_FAST8_WIDTH: u32 = 8; +pub const UINT_FAST8_WIDTH: u32 = 8; +pub const INT_FAST16_WIDTH: u32 = 64; +pub const UINT_FAST16_WIDTH: u32 = 64; +pub const INT_FAST32_WIDTH: u32 = 64; +pub const UINT_FAST32_WIDTH: u32 = 64; +pub const INT_FAST64_WIDTH: u32 = 64; +pub const UINT_FAST64_WIDTH: u32 = 64; +pub const INTPTR_WIDTH: u32 = 64; +pub const UINTPTR_WIDTH: u32 = 64; +pub const INTMAX_WIDTH: u32 = 64; +pub const UINTMAX_WIDTH: u32 = 64; +pub const PTRDIFF_WIDTH: u32 = 64; +pub const SIG_ATOMIC_WIDTH: u32 = 32; +pub const SIZE_WIDTH: u32 = 64; +pub const WCHAR_WIDTH: u32 = 32; +pub const WINT_WIDTH: u32 = 32; +pub const REDIR_VARASSIGN: u32 = 1; +pub const AMBIGUOUS_REDIRECT: i32 = -1; +pub const NOCLOBBER_REDIRECT: i32 = -2; +pub const RESTRICTED_REDIRECT: i32 = -3; +pub const HEREDOC_REDIRECT: i32 = -4; +pub const BADVAR_REDIRECT: i32 = -5; +pub const W_HASDOLLAR: u32 = 1; +pub const W_QUOTED: u32 = 2; +pub const W_ASSIGNMENT: u32 = 4; +pub const W_SPLITSPACE: u32 = 8; +pub const W_NOSPLIT: u32 = 16; +pub const W_NOGLOB: u32 = 32; +pub const W_NOSPLIT2: u32 = 64; +pub const W_TILDEEXP: u32 = 128; +pub const W_DOLLARAT: u32 = 256; +pub const W_DOLLARSTAR: u32 = 512; +pub const W_NOCOMSUB: u32 = 1024; +pub const W_ASSIGNRHS: u32 = 2048; +pub const W_NOTILDE: u32 = 4096; +pub const W_ITILDE: u32 = 8192; +pub const W_EXPANDRHS: u32 = 16384; +pub const W_COMPASSIGN: u32 = 32768; +pub const W_ASSNBLTIN: u32 = 65536; +pub const W_ASSIGNARG: u32 = 131072; +pub const W_HASQUOTEDNULL: u32 = 262144; +pub const W_DQUOTE: u32 = 524288; +pub const W_NOPROCSUB: u32 = 1048576; +pub const W_SAWQUOTEDNULL: u32 = 2097152; +pub const W_ASSIGNASSOC: u32 = 4194304; +pub const W_ASSIGNARRAY: u32 = 8388608; +pub const W_ARRAYIND: u32 = 16777216; +pub const W_ASSNGLOBAL: u32 = 33554432; +pub const W_NOBRACE: u32 = 67108864; +pub const PF_EXPANDRHS: u32 = 32; +pub const PF_ALLINDS: u32 = 64; +pub const SUBSHELL_ASYNC: u32 = 1; +pub const SUBSHELL_PAREN: u32 = 2; +pub const SUBSHELL_COMSUB: u32 = 4; +pub const SUBSHELL_FORK: u32 = 8; +pub const SUBSHELL_PIPE: u32 = 16; +pub const SUBSHELL_PROCSUB: u32 = 32; +pub const SUBSHELL_COPROC: u32 = 64; +pub const SUBSHELL_RESETTRAP: u32 = 128; +pub const CMD_WANT_SUBSHELL: u32 = 1; +pub const CMD_FORCE_SUBSHELL: u32 = 2; +pub const CMD_INVERT_RETURN: u32 = 4; +pub const CMD_IGNORE_RETURN: u32 = 8; +pub const CMD_NO_FUNCTIONS: u32 = 16; +pub const CMD_INHIBIT_EXPANSION: u32 = 32; +pub const CMD_NO_FORK: u32 = 64; +pub const CMD_TIME_PIPELINE: u32 = 128; +pub const CMD_TIME_POSIX: u32 = 256; +pub const CMD_AMPERSAND: u32 = 512; +pub const CMD_STDIN_REDIR: u32 = 1024; +pub const CMD_COMMAND_BUILTIN: u32 = 2048; +pub const CMD_COPROC_SUBSHELL: u32 = 4096; +pub const CMD_LASTPIPE: u32 = 8192; +pub const CMD_STDPATH: u32 = 16384; +pub const CMD_TRY_OPTIMIZING: u32 = 32768; +pub const PRId8: &'static [u8; 2usize] = b"d\0"; +pub const PRId16: &'static [u8; 2usize] = b"d\0"; +pub const PRId32: &'static [u8; 2usize] = b"d\0"; +pub const PRId64: &'static [u8; 3usize] = b"ld\0"; +pub const PRIdLEAST8: &'static [u8; 2usize] = b"d\0"; +pub const PRIdLEAST16: &'static [u8; 2usize] = b"d\0"; +pub const PRIdLEAST32: &'static [u8; 2usize] = b"d\0"; +pub const PRIdLEAST64: &'static [u8; 3usize] = b"ld\0"; +pub const PRIdFAST8: &'static [u8; 2usize] = b"d\0"; +pub const PRIdFAST16: &'static [u8; 3usize] = b"ld\0"; +pub const PRIdFAST32: &'static [u8; 3usize] = b"ld\0"; +pub const PRIdFAST64: &'static [u8; 3usize] = b"ld\0"; +pub const PRIi8: &'static [u8; 2usize] = b"i\0"; +pub const PRIi16: &'static [u8; 2usize] = b"i\0"; +pub const PRIi32: &'static [u8; 2usize] = b"i\0"; +pub const PRIi64: &'static [u8; 3usize] = b"li\0"; +pub const PRIiLEAST8: &'static [u8; 2usize] = b"i\0"; +pub const PRIiLEAST16: &'static [u8; 2usize] = b"i\0"; +pub const PRIiLEAST32: &'static [u8; 2usize] = b"i\0"; +pub const PRIiLEAST64: &'static [u8; 3usize] = b"li\0"; +pub const PRIiFAST8: &'static [u8; 2usize] = b"i\0"; +pub const PRIiFAST16: &'static [u8; 3usize] = b"li\0"; +pub const PRIiFAST32: &'static [u8; 3usize] = b"li\0"; +pub const PRIiFAST64: &'static [u8; 3usize] = b"li\0"; +pub const PRIo8: &'static [u8; 2usize] = b"o\0"; +pub const PRIo16: &'static [u8; 2usize] = b"o\0"; +pub const PRIo32: &'static [u8; 2usize] = b"o\0"; +pub const PRIo64: &'static [u8; 3usize] = b"lo\0"; +pub const PRIoLEAST8: &'static [u8; 2usize] = b"o\0"; +pub const PRIoLEAST16: &'static [u8; 2usize] = b"o\0"; +pub const PRIoLEAST32: &'static [u8; 2usize] = b"o\0"; +pub const PRIoLEAST64: &'static [u8; 3usize] = b"lo\0"; +pub const PRIoFAST8: &'static [u8; 2usize] = b"o\0"; +pub const PRIoFAST16: &'static [u8; 3usize] = b"lo\0"; +pub const PRIoFAST32: &'static [u8; 3usize] = b"lo\0"; +pub const PRIoFAST64: &'static [u8; 3usize] = b"lo\0"; +pub const PRIXFAST8: &'static [u8; 2usize] = b"X\0"; +pub const PRIXFAST16: &'static [u8; 3usize] = b"lX\0"; +pub const PRIXFAST32: &'static [u8; 3usize] = b"lX\0"; +pub const PRIXFAST64: &'static [u8; 3usize] = b"lX\0"; +pub const PRIdMAX: &'static [u8; 3usize] = b"ld\0"; +pub const PRIiMAX: &'static [u8; 3usize] = b"li\0"; +pub const PRIoMAX: &'static [u8; 3usize] = b"lo\0"; +pub const PRIuMAX: &'static [u8; 3usize] = b"lu\0"; +pub const PRIxMAX: &'static [u8; 3usize] = b"lx\0"; +pub const PRIXMAX: &'static [u8; 3usize] = b"lX\0"; +pub const PRIdPTR: &'static [u8; 3usize] = b"ld\0"; +pub const PRIiPTR: &'static [u8; 3usize] = b"li\0"; +pub const PRIoPTR: &'static [u8; 3usize] = b"lo\0"; +pub const PRIuPTR: &'static [u8; 3usize] = b"lu\0"; +pub const PRIxPTR: &'static [u8; 3usize] = b"lx\0"; +pub const PRIXPTR: &'static [u8; 3usize] = b"lX\0"; +pub const SCNd8: &'static [u8; 4usize] = b"hhd\0"; +pub const SCNd16: &'static [u8; 3usize] = b"hd\0"; +pub const SCNd32: &'static [u8; 2usize] = b"d\0"; +pub const SCNd64: &'static [u8; 3usize] = b"ld\0"; +pub const SCNdLEAST8: &'static [u8; 4usize] = b"hhd\0"; +pub const SCNdLEAST16: &'static [u8; 3usize] = b"hd\0"; +pub const SCNdLEAST32: &'static [u8; 2usize] = b"d\0"; +pub const SCNdLEAST64: &'static [u8; 3usize] = b"ld\0"; +pub const SCNuLEAST8: &'static [u8; 4usize] = b"hhu\0"; +pub const SCNuLEAST16: &'static [u8; 3usize] = b"hu\0"; +pub const SCNuLEAST32: &'static [u8; 2usize] = b"u\0"; +pub const SCNuLEAST64: &'static [u8; 3usize] = b"lu\0"; +pub const SCNuFAST8: &'static [u8; 4usize] = b"hhu\0"; +pub const SCNuFAST16: &'static [u8; 3usize] = b"lu\0"; +pub const SCNuFAST32: &'static [u8; 3usize] = b"lu\0"; +pub const SCNuFAST64: &'static [u8; 3usize] = b"lu\0"; +pub const SCNo8: &'static [u8; 4usize] = b"hho\0"; +pub const SCNo16: &'static [u8; 3usize] = b"ho\0"; +pub const SCNo32: &'static [u8; 2usize] = b"o\0"; +pub const SCNo64: &'static [u8; 3usize] = b"lo\0"; +pub const SCNx8: &'static [u8; 4usize] = b"hhx\0"; +pub const SCNx16: &'static [u8; 3usize] = b"hx\0"; +pub const SCNx32: &'static [u8; 2usize] = b"x\0"; +pub const SCNx64: &'static [u8; 3usize] = b"lx\0"; +pub const SCNdMAX: &'static [u8; 3usize] = b"ld\0"; +pub const SCNiMAX: &'static [u8; 3usize] = b"li\0"; +pub const SCNoMAX: &'static [u8; 3usize] = b"lo\0"; +pub const SCNuMAX: &'static [u8; 3usize] = b"lu\0"; +pub const SCNxMAX: &'static [u8; 3usize] = b"lx\0"; +pub const SCNdPTR: &'static [u8; 3usize] = b"ld\0"; +pub const SCNiPTR: &'static [u8; 3usize] = b"li\0"; +pub const SCNoPTR: &'static [u8; 3usize] = b"lo\0"; +pub const SCNuPTR: &'static [u8; 3usize] = b"lu\0"; +pub const SCNxPTR: &'static [u8; 3usize] = b"lx\0"; +pub const GX_MARKDIRS: u32 = 1; +pub const GX_NOCASE: u32 = 2; +pub const GX_MATCHDOT: u32 = 4; +pub const GX_MATCHDIRS: u32 = 8; +pub const GX_ALLDIRS: u32 = 16; +pub const GX_NULLDIR: u32 = 256; +pub const GX_ADDCURDIR: u32 = 512; +pub const GX_GLOBSTAR: u32 = 1024; +pub const GX_RECURSE: u32 = 2048; +pub const GX_SYMLINK: u32 = 4096; +pub const INVALID: i32 = -1; +pub const _STRMATCH_H: u32 = 1; +pub const FNM_PATHNAME: u32 = 1; +pub const FNM_NOESCAPE: u32 = 2; +pub const FNM_PERIOD: u32 = 4; +pub const FNM_LEADING_DIR: u32 = 8; +pub const FNM_CASEFOLD: u32 = 16; +pub const FNM_EXTMATCH: u32 = 32; +pub const FNM_FIRSTCHAR: u32 = 64; +pub const FNM_NOMATCH: u32 = 1; +pub type _Float32 = f32; +pub type _Float64 = f64; +pub type _Float32x = f64; +pub type _Float64x = f64; +pub type wchar_t = ::std::os::raw::c_int; +pub type va_list = __builtin_va_list; +pub type __gnuc_va_list = __builtin_va_list; +pub type wint_t = ::std::os::raw::c_uint; +fn histtime(hlist: *mut HIST_ENTRY, histtimefmt: *const c_char) -> *mut c_char +{ +unsafe { + static mut timestr: [c_char;128] = [0;128]; + + let t = history_get_time(hlist); + let tm = if t != 0 {libc::localtime(&t)} else {PT_NULL as *mut libc::tm}; + if t != 0 && !tm.is_null() { + strftime(std::mem::transmute(×tr), + std::mem::size_of_val(×tr), + histtimefmt, + tm); + } else if !(*hlist).timestamp.is_null() && (*(*hlist).timestamp) != 0 { + let c_str = CString::new("%s: invalid timestamp").unwrap(); + libc::snprintf(std::mem::transmute(×tr), + std::mem::size_of_val(×tr), c_str.as_ptr(), + if *((*hlist).timestamp) == b'#' as c_char {((*hlist).timestamp as usize + 1) as *mut c_char} else {(*hlist).timestamp}); + } else { + libc::strcpy(std::mem::transmute(×tr), b"??\0".as_ptr() as *const c_char); + } + + return timestr.as_mut_ptr(); +} +pub type mbstate_t = __mbstate_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _IO_FILE { + _unused: [u8; 0], +} +pub type __FILE = _IO_FILE; +pub type FILE = _IO_FILE; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __locale_struct { + pub __locales: [*mut __locale_data; 13usize], + pub __ctype_b: *const ::std::os::raw::c_ushort, + pub __ctype_tolower: *const ::std::os::raw::c_int, + pub __ctype_toupper: *const ::std::os::raw::c_int, + pub __names: [*const ::std::os::raw::c_char; 13usize], +} +pub type __locale_t = *mut __locale_struct; +pub type locale_t = __locale_t; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tm { + _unused: [u8; 0], +} +extern "C" { + pub fn wcscpy(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn wcsncpy(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> *mut wchar_t; +} +extern "C" { + pub fn wcscat(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn wcsncat(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> *mut wchar_t; +} +extern "C" { + pub fn wcscmp(__s1: *const wchar_t, __s2: *const wchar_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcsncmp(__s1: *const wchar_t, __s2: *const wchar_t, __n: usize) + -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcscasecmp(__s1: *const wchar_t, __s2: *const wchar_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcsncasecmp( + __s1: *const wchar_t, + __s2: *const wchar_t, + __n: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcscasecmp_l( + __s1: *const wchar_t, + __s2: *const wchar_t, + __loc: locale_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcsncasecmp_l( + __s1: *const wchar_t, + __s2: *const wchar_t, + __n: usize, + __loc: locale_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcscoll(__s1: *const wchar_t, __s2: *const wchar_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcsxfrm(__s1: *mut wchar_t, __s2: *const wchar_t, __n: usize) -> usize; +} +extern "C" { + pub fn wcscoll_l( + __s1: *const wchar_t, + __s2: *const wchar_t, + __loc: locale_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcsxfrm_l( + __s1: *mut wchar_t, + __s2: *const wchar_t, + __n: usize, + __loc: locale_t, + ) -> usize; +} +extern "C" { + pub fn wcsdup(__s: *const wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn wcschr(__wcs: *const wchar_t, __wc: wchar_t) -> *mut ::std::os::raw::c_int; +} +extern "C" { + pub fn wcsrchr(__wcs: *const wchar_t, __wc: wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn wcschrnul(__s: *const wchar_t, __wc: wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn wcscspn(__wcs: *const wchar_t, __reject: *const wchar_t) -> usize; +} +extern "C" { + pub fn wcsspn(__wcs: *const wchar_t, __accept: *const wchar_t) -> usize; +} +extern "C" { + pub fn wcspbrk(__wcs: *const wchar_t, __accept: *const wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn wcsstr(__haystack: *const wchar_t, __needle: *const wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn wcstok( + __s: *mut wchar_t, + __delim: *const wchar_t, + __ptr: *mut *mut wchar_t, + ) -> *mut wchar_t; +} +extern "C" { + pub fn wcslen(__s: *const wchar_t) -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn wcswcs(__haystack: *const wchar_t, __needle: *const wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn wcsnlen(__s: *const wchar_t, __maxlen: usize) -> usize; +} +extern "C" { + pub fn wmemchr(__s: *const wchar_t, __c: wchar_t, __n: usize) -> *mut ::std::os::raw::c_int; +} +extern "C" { + pub fn wmemcmp(__s1: *const wchar_t, __s2: *const wchar_t, __n: usize) + -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wmemcpy(__s1: *mut wchar_t, __s2: *const wchar_t, __n: usize) -> *mut wchar_t; +} +extern "C" { + pub fn wmemmove(__s1: *mut wchar_t, __s2: *const wchar_t, __n: usize) -> *mut wchar_t; +} +extern "C" { + pub fn wmemset(__s: *mut wchar_t, __c: wchar_t, __n: usize) -> *mut wchar_t; +} +extern "C" { + pub fn wmempcpy(__s1: *mut wchar_t, __s2: *const wchar_t, __n: usize) -> *mut wchar_t; +} +extern "C" { + pub fn btowc(__c: ::std::os::raw::c_int) -> wint_t; +} +extern "C" { + pub fn wctob(__c: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn mbsinit(__ps: *const mbstate_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn mbrtowc( + __pwc: *mut wchar_t, + __s: *const ::std::os::raw::c_char, + __n: usize, + __p: *mut mbstate_t, + ) -> usize; +} +extern "C" { + pub fn wcrtomb(__s: *mut ::std::os::raw::c_char, __wc: wchar_t, __ps: *mut mbstate_t) -> usize; +} +extern "C" { + pub fn __mbrlen(__s: *const ::std::os::raw::c_char, __n: usize, __ps: *mut mbstate_t) -> usize; +} +extern "C" { + pub fn mbrlen(__s: *const ::std::os::raw::c_char, __n: usize, __ps: *mut mbstate_t) -> usize; +} +extern "C" { + pub fn mbsrtowcs( + __dst: *mut wchar_t, + __src: *mut *const ::std::os::raw::c_char, + __len: usize, + __ps: *mut mbstate_t, + ) -> usize; +} +extern "C" { + pub fn wcsrtombs( + __dst: *mut ::std::os::raw::c_char, + __src: *mut *const wchar_t, + __len: usize, + __ps: *mut mbstate_t, + ) -> usize; +} +extern "C" { + pub fn mbsnrtowcs( + __dst: *mut wchar_t, + __src: *mut *const ::std::os::raw::c_char, + __nmc: usize, + __len: usize, + __ps: *mut mbstate_t, + ) -> usize; +} +extern "C" { + pub fn wcsnrtombs( + __dst: *mut ::std::os::raw::c_char, + __src: *mut *const wchar_t, + __nwc: usize, + __len: usize, + __ps: *mut mbstate_t, + ) -> usize; +} +extern "C" { + pub fn wcwidth(__c: wchar_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcswidth(__s: *const wchar_t, __n: usize) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcstod(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> f64; +} +extern "C" { + pub fn wcstof(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> f32; +} +extern "C" { + pub fn wcstold(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> f64; +} +extern "C" { + pub fn wcstof32(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> _Float32; +} +extern "C" { + pub fn wcstof64(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> _Float64; +} +extern "C" { + pub fn wcstof32x(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> _Float32x; +} +extern "C" { + pub fn wcstof64x(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> _Float64x; +} +extern "C" { + pub fn wcstol( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn wcstoul( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn wcstoll( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_longlong; +} +extern "C" { + pub fn wcstoull( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_ulonglong; +} +extern "C" { + pub fn wcstoq( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_longlong; +} +extern "C" { + pub fn wcstouq( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_ulonglong; +} +extern "C" { + pub fn wcstol_l( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __base: ::std::os::raw::c_int, + __loc: locale_t, + ) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn wcstoul_l( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __base: ::std::os::raw::c_int, + __loc: locale_t, + ) -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn wcstoll_l( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __base: ::std::os::raw::c_int, + __loc: locale_t, + ) -> ::std::os::raw::c_longlong; +} +extern "C" { + pub fn wcstoull_l( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __base: ::std::os::raw::c_int, + __loc: locale_t, + ) -> ::std::os::raw::c_ulonglong; +} +extern "C" { + pub fn wcstod_l(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t, __loc: locale_t) -> f64; +} +extern "C" { + pub fn wcstof_l(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t, __loc: locale_t) -> f32; +} +extern "C" { + pub fn wcstold_l(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t, __loc: locale_t) -> f64; +} +extern "C" { + pub fn wcstof32_l( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __loc: locale_t, + ) -> _Float32; +} +extern "C" { + pub fn wcstof64_l( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __loc: locale_t, + ) -> _Float64; +} +extern "C" { + pub fn wcstof32x_l( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __loc: locale_t, + ) -> _Float32x; +} +extern "C" { + pub fn wcstof64x_l( + __nptr: *const wchar_t, + __endptr: *mut *mut wchar_t, + __loc: locale_t, + ) -> _Float64x; +} +extern "C" { + pub fn wcpcpy(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t; +} +extern "C" { + pub fn wcpncpy(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> *mut wchar_t; +} +extern "C" { + pub fn open_wmemstream(__bufloc: *mut *mut wchar_t, __sizeloc: *mut usize) -> *mut __FILE; +} +extern "C" { + pub fn fwide(__fp: *mut __FILE, __mode: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fwprintf(__stream: *mut __FILE, __format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wprintf(__format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn swprintf( + __s: *mut wchar_t, + __n: usize, + __format: *const wchar_t, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vfwprintf( + __s: *mut __FILE, + __format: *const wchar_t, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vwprintf(__format: *const wchar_t, __arg: *mut __va_list_tag) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vswprintf( + __s: *mut wchar_t, + __n: usize, + __format: *const wchar_t, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fwscanf(__stream: *mut __FILE, __format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wscanf(__format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn swscanf(__s: *const wchar_t, __format: *const wchar_t, ...) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vfwscanf( + __s: *mut __FILE, + __format: *const wchar_t, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vwscanf(__format: *const wchar_t, __arg: *mut __va_list_tag) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn vswscanf( + __s: *const wchar_t, + __format: *const wchar_t, + __arg: *mut __va_list_tag, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fgetwc(__stream: *mut __FILE) -> wint_t; +} +extern "C" { + pub fn getwc(__stream: *mut __FILE) -> wint_t; +} +extern "C" { + pub fn getwchar() -> wint_t; +} +extern "C" { + pub fn fputwc(__wc: wchar_t, __stream: *mut __FILE) -> wint_t; +} +extern "C" { + pub fn putwc(__wc: wchar_t, __stream: *mut __FILE) -> wint_t; +} +extern "C" { + pub fn putwchar(__wc: wchar_t) -> wint_t; +} +extern "C" { + pub fn fgetws( + __ws: *mut wchar_t, + __n: ::std::os::raw::c_int, + __stream: *mut __FILE, + ) -> *mut wchar_t; +} +extern "C" { + pub fn fputws(__ws: *const wchar_t, __stream: *mut __FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn ungetwc(__wc: wint_t, __stream: *mut __FILE) -> wint_t; +} +extern "C" { + pub fn getwc_unlocked(__stream: *mut __FILE) -> wint_t; +} +extern "C" { + pub fn getwchar_unlocked() -> wint_t; +} +extern "C" { + pub fn fgetwc_unlocked(__stream: *mut __FILE) -> wint_t; +} +extern "C" { + pub fn fputwc_unlocked(__wc: wchar_t, __stream: *mut __FILE) -> wint_t; +} +extern "C" { + pub fn putwc_unlocked(__wc: wchar_t, __stream: *mut __FILE) -> wint_t; +} +extern "C" { + pub fn putwchar_unlocked(__wc: wchar_t) -> wint_t; +} +extern "C" { + pub fn fgetws_unlocked( + __ws: *mut wchar_t, + __n: ::std::os::raw::c_int, + __stream: *mut __FILE, + ) -> *mut wchar_t; +} +extern "C" { + pub fn fputws_unlocked(__ws: *const wchar_t, __stream: *mut __FILE) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcsftime( + __s: *mut wchar_t, + __maxsize: usize, + __format: *const wchar_t, + __tp: *const tm, + ) -> usize; +} +extern "C" { + pub fn wcsftime_l( + __s: *mut wchar_t, + __maxsize: usize, + __format: *const wchar_t, + __tp: *const tm, + __loc: locale_t, + ) -> usize; +} +pub type __u_char = ::std::os::raw::c_uchar; +pub type __u_short = ::std::os::raw::c_ushort; +pub type __u_int = ::std::os::raw::c_uint; +pub type __u_long = ::std::os::raw::c_ulong; +pub type __int8_t = ::std::os::raw::c_schar; +pub type __uint8_t = ::std::os::raw::c_uchar; +pub type __int16_t = ::std::os::raw::c_short; +pub type __uint16_t = ::std::os::raw::c_ushort; +pub type __int32_t = ::std::os::raw::c_int; +pub type __uint32_t = ::std::os::raw::c_uint; +pub type __int64_t = ::std::os::raw::c_long; +pub type __uint64_t = ::std::os::raw::c_ulong; +pub type __int_least8_t = __int8_t; +pub type __uint_least8_t = __uint8_t; +pub type __int_least16_t = __int16_t; +pub type __uint_least16_t = __uint16_t; +pub type __int_least32_t = __int32_t; +pub type __uint_least32_t = __uint32_t; +pub type __int_least64_t = __int64_t; +pub type __uint_least64_t = __uint64_t; +pub type __quad_t = ::std::os::raw::c_long; +pub type __u_quad_t = ::std::os::raw::c_ulong; +pub type __intmax_t = ::std::os::raw::c_long; +pub type __uintmax_t = ::std::os::raw::c_ulong; +pub type __dev_t = ::std::os::raw::c_ulong; +pub type __uid_t = ::std::os::raw::c_uint; +pub type __gid_t = ::std::os::raw::c_uint; +pub type __ino_t = ::std::os::raw::c_ulong; +pub type __ino64_t = ::std::os::raw::c_ulong; +pub type __mode_t = ::std::os::raw::c_uint; +pub type __nlink_t = ::std::os::raw::c_ulong; +pub type __off_t = ::std::os::raw::c_long; +pub type __off64_t = ::std::os::raw::c_long; +pub type __pid_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __fsid_t { + pub __val: [::std::os::raw::c_int; 2usize], +} +pub type __clock_t = ::std::os::raw::c_long; +pub type __rlim_t = ::std::os::raw::c_ulong; +pub type __rlim64_t = ::std::os::raw::c_ulong; +pub type __id_t = ::std::os::raw::c_uint; +pub type __time_t = ::std::os::raw::c_long; +pub type __useconds_t = ::std::os::raw::c_uint; +pub type __suseconds_t = ::std::os::raw::c_long; +pub type __daddr_t = ::std::os::raw::c_int; +pub type __key_t = ::std::os::raw::c_int; +pub type __clockid_t = ::std::os::raw::c_int; +pub type __timer_t = *mut ::std::os::raw::c_void; +pub type __blksize_t = ::std::os::raw::c_long; +pub type __blkcnt_t = ::std::os::raw::c_long; +pub type __blkcnt64_t = ::std::os::raw::c_long; +pub type __fsblkcnt_t = ::std::os::raw::c_ulong; +pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; +pub type __fsfilcnt_t = ::std::os::raw::c_ulong; +pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; +pub type __fsword_t = ::std::os::raw::c_long; +pub type __ssize_t = ::std::os::raw::c_long; +pub type __syscall_slong_t = ::std::os::raw::c_long; +pub type __syscall_ulong_t = ::std::os::raw::c_ulong; +pub type __loff_t = __off64_t; +pub type __caddr_t = *mut ::std::os::raw::c_char; +pub type __intptr_t = ::std::os::raw::c_long; +pub type __socklen_t = ::std::os::raw::c_uint; +pub type __sig_atomic_t = ::std::os::raw::c_int; +pub type wctype_t = ::std::os::raw::c_ulong; +pub const __ISwupper: _bindgen_ty_1 = 0; +pub const __ISwlower: _bindgen_ty_1 = 1; +pub const __ISwalpha: _bindgen_ty_1 = 2; +pub const __ISwdigit: _bindgen_ty_1 = 3; +pub const __ISwxdigit: _bindgen_ty_1 = 4; +pub const __ISwspace: _bindgen_ty_1 = 5; +pub const __ISwprint: _bindgen_ty_1 = 6; +pub const __ISwgraph: _bindgen_ty_1 = 7; +pub const __ISwblank: _bindgen_ty_1 = 8; +pub const __ISwcntrl: _bindgen_ty_1 = 9; +pub const __ISwpunct: _bindgen_ty_1 = 10; +pub const __ISwalnum: _bindgen_ty_1 = 11; +pub const _ISwupper: _bindgen_ty_1 = 16777216; +pub const _ISwlower: _bindgen_ty_1 = 33554432; +pub const _ISwalpha: _bindgen_ty_1 = 67108864; +pub const _ISwdigit: _bindgen_ty_1 = 134217728; +pub const _ISwxdigit: _bindgen_ty_1 = 268435456; +pub const _ISwspace: _bindgen_ty_1 = 536870912; +pub const _ISwprint: _bindgen_ty_1 = 1073741824; +pub const _ISwgraph: _bindgen_ty_1 = -2147483648; +pub const _ISwblank: _bindgen_ty_1 = 65536; +pub const _ISwcntrl: _bindgen_ty_1 = 131072; +pub const _ISwpunct: _bindgen_ty_1 = 262144; +pub const _ISwalnum: _bindgen_ty_1 = 524288; +pub type _bindgen_ty_1 = i32; +extern "C" { + pub fn iswalnum(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswalpha(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswcntrl(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswdigit(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswgraph(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswlower(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswprint(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswpunct(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswspace(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswupper(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswxdigit(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswblank(__wc: wint_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wctype(__property: *const ::std::os::raw::c_char) -> wctype_t; +} +extern "C" { + pub fn iswalnum_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswalpha_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswcntrl_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswdigit_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswgraph_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswlower_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswprint_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswpunct_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswspace_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswupper_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswxdigit_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iswblank_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; +} + pub fn wctrans_l(__property: *const ::std::os::raw::c_char, __locale: locale_t) -> wctrans_t; +} +extern "C" { + pub fn towctrans_l(__wc: wint_t, __desc: wctrans_t, __locale: locale_t) -> wint_t; +} +pub type gid_t = __gid_t; +pub type uid_t = __uid_t; +pub type off_t = __off_t; +pub type off64_t = __off64_t; +pub type useconds_t = __useconds_t; +pub type pid_t = __pid_t; +pub type socklen_t = __socklen_t; +extern "C" { + pub fn access( + __name: *const ::std::os::raw::c_char, + __type: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn euidaccess( + __name: *const ::std::os::raw::c_char, + __type: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lseek( + __fd: ::std::os::raw::c_int, + __offset: __off_t, + __whence: ::std::os::raw::c_int, + ) -> __off_t; +} +extern "C" { + pub fn lseek64( + __fd: ::std::os::raw::c_int, + __offset: __off64_t, + __whence: ::std::os::raw::c_int, + ) -> __off64_t; +} +extern "C" { + pub fn close(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn read( + __fd: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_void, + __nbytes: usize, + ) -> isize; +} +extern "C" { + pub fn write( + __fd: ::std::os::raw::c_int, + __buf: *const ::std::os::raw::c_void, + __n: usize, + ) -> isize; +} +extern "C" { + pub fn pread( + __fd: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_void, + __nbytes: usize, + __offset: __off_t, + ) -> isize; +} +extern "C" { + pub fn pwrite( + __fd: ::std::os::raw::c_int, + __buf: *const ::std::os::raw::c_void, + __n: usize, + __offset: __off_t, + ) -> isize; +} +extern "C" { + pub fn pread64( + __fd: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_void, + __nbytes: usize, + __offset: __off64_t, + ) -> isize; +} +extern "C" { + pub fn pwrite64( + __fd: ::std::os::raw::c_int, + __buf: *const ::std::os::raw::c_void, + __n: usize, + __offset: __off64_t, + ) -> isize; +} +extern "C" { + pub fn alarm(__seconds: ::std::os::raw::c_uint) -> ::std::os::raw::c_uint; +} +extern "C" { + pub fn sleep(__seconds: ::std::os::raw::c_uint) -> ::std::os::raw::c_uint; +} +extern "C" { + pub fn ualarm(__value: __useconds_t, __interval: __useconds_t) -> __useconds_t; +} +extern "C" { + pub fn usleep(__useconds: __useconds_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn pause() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn chown( + __file: *const ::std::os::raw::c_char, + __owner: __uid_t, + __group: __gid_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fchown( + __fd: ::std::os::raw::c_int, + __owner: __uid_t, + __group: __gid_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lchown( + __file: *const ::std::os::raw::c_char, + __owner: __uid_t, + __group: __gid_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fchownat( + __fd: ::std::os::raw::c_int, + __file: *const ::std::os::raw::c_char, + __owner: __uid_t, + __group: __gid_t, + __flag: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn chdir(__path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fchdir(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getcwd(__buf: *mut ::std::os::raw::c_char, __size: usize) + -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn dup3( + __fd: ::std::os::raw::c_int, + __fd2: ::std::os::raw::c_int, + __flags: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}__environ"] + pub static mut __environ: *mut *mut ::std::os::raw::c_char; +} +extern "C" { + #[link_name = "\u{1}environ"] + pub static mut environ: *mut *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn execve( + __path: *const ::std::os::raw::c_char, + __argv: *const *mut ::std::os::raw::c_char, + __envp: *const *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fexecve( + __fd: ::std::os::raw::c_int, + __argv: *const *mut ::std::os::raw::c_char, + __envp: *const *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn execv( + __path: *const ::std::os::raw::c_char, + __argv: *const *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn execle( + __path: *const ::std::os::raw::c_char, + __arg: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn execl( + __path: *const ::std::os::raw::c_char, + __arg: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn execvp( + __file: *const ::std::os::raw::c_char, + __argv: *const *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn execlp( + __file: *const ::std::os::raw::c_char, + __arg: *const ::std::os::raw::c_char, + ... + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn execvpe( + __file: *const ::std::os::raw::c_char, + __argv: *const *mut ::std::os::raw::c_char, + __envp: *const *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +pub const _PC_LINK_MAX: _bindgen_ty_2 = 0; +pub const _PC_MAX_CANON: _bindgen_ty_2 = 1; +pub const _PC_MAX_INPUT: _bindgen_ty_2 = 2; +pub const _PC_NAME_MAX: _bindgen_ty_2 = 3; +pub const _PC_PATH_MAX: _bindgen_ty_2 = 4; +pub const _PC_PIPE_BUF: _bindgen_ty_2 = 5; +pub const _PC_CHOWN_RESTRICTED: _bindgen_ty_2 = 6; +pub const _PC_NO_TRUNC: _bindgen_ty_2 = 7; +pub const _PC_VDISABLE: _bindgen_ty_2 = 8; +pub const _PC_SYNC_IO: _bindgen_ty_2 = 9; +pub const _PC_ASYNC_IO: _bindgen_ty_2 = 10; +pub const _PC_PRIO_IO: _bindgen_ty_2 = 11; +pub const _PC_SOCK_MAXBUF: _bindgen_ty_2 = 12; +pub const _PC_FILESIZEBITS: _bindgen_ty_2 = 13; +pub const _PC_REC_INCR_XFER_SIZE: _bindgen_ty_2 = 14; +pub const _PC_REC_MAX_XFER_SIZE: _bindgen_ty_2 = 15; +pub const _PC_REC_MIN_XFER_SIZE: _bindgen_ty_2 = 16; +pub const _PC_REC_XFER_ALIGN: _bindgen_ty_2 = 17; +pub const _PC_ALLOC_SIZE_MIN: _bindgen_ty_2 = 18; +pub const _PC_SYMLINK_MAX: _bindgen_ty_2 = 19; +pub const _PC_2_SYMLINKS: _bindgen_ty_2 = 20; +pub type _bindgen_ty_2 = u32; +pub const _SC_ARG_MAX: _bindgen_ty_3 = 0; +pub const _SC_CHILD_MAX: _bindgen_ty_3 = 1; +pub const _SC_CLK_TCK: _bindgen_ty_3 = 2; +pub const _SC_NGROUPS_MAX: _bindgen_ty_3 = 3; +pub const _SC_OPEN_MAX: _bindgen_ty_3 = 4; +pub const _SC_STREAM_MAX: _bindgen_ty_3 = 5; +pub const _SC_TZNAME_MAX: _bindgen_ty_3 = 6; +pub const _SC_JOB_CONTROL: _bindgen_ty_3 = 7; +pub const _SC_SAVED_IDS: _bindgen_ty_3 = 8; +pub const _SC_REALTIME_SIGNALS: _bindgen_ty_3 = 9; +pub const _SC_PRIORITY_SCHEDULING: _bindgen_ty_3 = 10; +pub const _SC_TIMERS: _bindgen_ty_3 = 11; +pub const _SC_ASYNCHRONOUS_IO: _bindgen_ty_3 = 12; +pub const _SC_PRIORITIZED_IO: _bindgen_ty_3 = 13; +pub const _SC_SYNCHRONIZED_IO: _bindgen_ty_3 = 14; +pub const _SC_FSYNC: _bindgen_ty_3 = 15; +pub const _SC_MAPPED_FILES: _bindgen_ty_3 = 16; +pub const _SC_MEMLOCK: _bindgen_ty_3 = 17; +pub const _SC_MEMLOCK_RANGE: _bindgen_ty_3 = 18; +pub const _SC_MEMORY_PROTECTION: _bindgen_ty_3 = 19; +pub const _SC_MESSAGE_PASSING: _bindgen_ty_3 = 20; +pub const _SC_SEMAPHORES: _bindgen_ty_3 = 21; +pub const _SC_SHARED_MEMORY_OBJECTS: _bindgen_ty_3 = 22; +pub const _SC_AIO_LISTIO_MAX: _bindgen_ty_3 = 23; +pub const _SC_AIO_MAX: _bindgen_ty_3 = 24; +pub const _SC_AIO_PRIO_DELTA_MAX: _bindgen_ty_3 = 25; +pub const _SC_DELAYTIMER_MAX: _bindgen_ty_3 = 26; +pub const _SC_MQ_OPEN_MAX: _bindgen_ty_3 = 27; +pub const _SC_MQ_PRIO_MAX: _bindgen_ty_3 = 28; +pub const _SC_VERSION: _bindgen_ty_3 = 29; +pub const _SC_PAGESIZE: _bindgen_ty_3 = 30; +pub const _SC_RTSIG_MAX: _bindgen_ty_3 = 31; +pub const _SC_SEM_NSEMS_MAX: _bindgen_ty_3 = 32; +pub const _SC_SEM_VALUE_MAX: _bindgen_ty_3 = 33; +pub const _SC_SIGQUEUE_MAX: _bindgen_ty_3 = 34; +pub const _SC_TIMER_MAX: _bindgen_ty_3 = 35; +pub const _SC_BC_BASE_MAX: _bindgen_ty_3 = 36; +pub const _SC_BC_DIM_MAX: _bindgen_ty_3 = 37; +pub const _SC_BC_SCALE_MAX: _bindgen_ty_3 = 38; +pub const _SC_BC_STRING_MAX: _bindgen_ty_3 = 39; +pub const _SC_COLL_WEIGHTS_MAX: _bindgen_ty_3 = 40; +pub const _SC_EQUIV_CLASS_MAX: _bindgen_ty_3 = 41; +pub const _SC_EXPR_NEST_MAX: _bindgen_ty_3 = 42; +pub const _SC_LINE_MAX: _bindgen_ty_3 = 43; +pub const _SC_RE_DUP_MAX: _bindgen_ty_3 = 44; +pub const _SC_CHARCLASS_NAME_MAX: _bindgen_ty_3 = 45; +pub const _SC_2_VERSION: _bindgen_ty_3 = 46; +pub const _SC_2_C_BIND: _bindgen_ty_3 = 47; +pub const _SC_2_C_DEV: _bindgen_ty_3 = 48; +pub const _SC_2_FORT_DEV: _bindgen_ty_3 = 49; +pub const _SC_2_FORT_RUN: _bindgen_ty_3 = 50; +pub const _SC_2_SW_DEV: _bindgen_ty_3 = 51; +pub const _SC_2_LOCALEDEF: _bindgen_ty_3 = 52; +pub const _SC_SSIZE_MAX: _bindgen_ty_3 = 110; +pub const _SC_SCHAR_MAX: _bindgen_ty_3 = 111; +pub const _SC_SCHAR_MIN: _bindgen_ty_3 = 112; +pub const _SC_SHRT_MAX: _bindgen_ty_3 = 113; +pub const _SC_SHRT_MIN: _bindgen_ty_3 = 114; +pub const _SC_UCHAR_MAX: _bindgen_ty_3 = 115; +pub const _SC_UINT_MAX: _bindgen_ty_3 = 116; +pub const _SC_ULONG_MAX: _bindgen_ty_3 = 117; +pub const _SC_USHRT_MAX: _bindgen_ty_3 = 118; +pub const _SC_NL_ARGMAX: _bindgen_ty_3 = 119; +pub const _SC_NL_LANGMAX: _bindgen_ty_3 = 120; +pub const _SC_NL_MSGMAX: _bindgen_ty_3 = 121; +pub const _SC_NL_NMAX: _bindgen_ty_3 = 122; +pub const _SC_NL_SETMAX: _bindgen_ty_3 = 123; +pub const _SC_NL_TEXTMAX: _bindgen_ty_3 = 124; +pub const _SC_XBS5_ILP32_OFF32: _bindgen_ty_3 = 125; +pub const _SC_XBS5_ILP32_OFFBIG: _bindgen_ty_3 = 126; +pub const _SC_XBS5_LP64_OFF64: _bindgen_ty_3 = 127; +pub const _SC_XBS5_LPBIG_OFFBIG: _bindgen_ty_3 = 128; +pub const _SC_XOPEN_LEGACY: _bindgen_ty_3 = 129; +pub const _SC_XOPEN_REALTIME: _bindgen_ty_3 = 130; +pub const _SC_XOPEN_REALTIME_THREADS: _bindgen_ty_3 = 131; +pub const _SC_ADVISORY_INFO: _bindgen_ty_3 = 132; +pub const _SC_BARRIERS: _bindgen_ty_3 = 133; +pub const _SC_LEVEL1_ICACHE_SIZE: _bindgen_ty_3 = 185; +pub const _SC_LEVEL1_ICACHE_ASSOC: _bindgen_ty_3 = 186; +pub const _SC_LEVEL1_ICACHE_LINESIZE: _bindgen_ty_3 = 187; +pub const _SC_LEVEL1_DCACHE_SIZE: _bindgen_ty_3 = 188; +pub const _SC_LEVEL1_DCACHE_ASSOC: _bindgen_ty_3 = 189; +pub const _SC_LEVEL1_DCACHE_LINESIZE: _bindgen_ty_3 = 190; +pub const _SC_LEVEL2_CACHE_SIZE: _bindgen_ty_3 = 191; +pub const _SC_LEVEL2_CACHE_ASSOC: _bindgen_ty_3 = 192; +pub const _SC_LEVEL2_CACHE_LINESIZE: _bindgen_ty_3 = 193; +pub const _SC_LEVEL3_CACHE_SIZE: _bindgen_ty_3 = 194; +pub const _SC_LEVEL3_CACHE_ASSOC: _bindgen_ty_3 = 195; +pub const _SC_LEVEL3_CACHE_LINESIZE: _bindgen_ty_3 = 196; +pub const _SC_LEVEL4_CACHE_SIZE: _bindgen_ty_3 = 197; +pub const _SC_LEVEL4_CACHE_ASSOC: _bindgen_ty_3 = 198; +pub const _SC_LEVEL4_CACHE_LINESIZE: _bindgen_ty_3 = 199; + +extern "C" { + pub fn pathconf( + __path: *const ::std::os::raw::c_char, + __name: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn fpathconf( + __fd: ::std::os::raw::c_int, + __name: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn sysconf(__name: ::std::os::raw::c_int) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn confstr( + __name: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> usize; +} +extern "C" { + pub fn getpid() -> __pid_t; +} +extern "C" { + pub fn getppid() -> __pid_t; +} +extern "C" { + pub fn getpgrp() -> __pid_t; +} +extern "C" { + pub fn __getpgid(__pid: __pid_t) -> __pid_t; +} +extern "C" { + pub fn getpgid(__pid: __pid_t) -> __pid_t; +} +extern "C" { + pub fn setpgid(__pid: __pid_t, __pgid: __pid_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn setpgrp() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn setsid() -> __pid_t; +} +extern "C" { + pub fn getsid(__pid: __pid_t) -> __pid_t; +} +extern "C" { + pub fn getuid() -> __uid_t; +} +extern "C" { + pub fn geteuid() -> __uid_t; +} +extern "C" { + pub fn getgid() -> __gid_t; +} +extern "C" { + pub fn getegid() -> __gid_t; +} +extern "C" { + pub fn link( + __from: *const ::std::os::raw::c_char, + __to: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn linkat( + __fromfd: ::std::os::raw::c_int, + __from: *const ::std::os::raw::c_char, + __tofd: ::std::os::raw::c_int, + __to: *const ::std::os::raw::c_char, + __flags: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn symlink( + __from: *const ::std::os::raw::c_char, + __to: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn readlink( + __path: *const ::std::os::raw::c_char, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> isize; +} +extern "C" { + pub fn symlinkat( + __from: *const ::std::os::raw::c_char, + __tofd: ::std::os::raw::c_int, + __to: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn readlinkat( + __fd: ::std::os::raw::c_int, + __path: *const ::std::os::raw::c_char, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> isize; +} +extern "C" { + pub fn rmdir(__path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn tcgetpgrp(__fd: ::std::os::raw::c_int) -> __pid_t; +} +extern "C" { + pub fn tcsetpgrp(__fd: ::std::os::raw::c_int, __pgrp_id: __pid_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getlogin() -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn getlogin_r( + __name: *mut ::std::os::raw::c_char, + __name_len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn setlogin(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}optarg"] + pub static mut optarg: *mut ::std::os::raw::c_char; +} +extern "C" { + #[link_name = "\u{1}optind"] + pub static mut optind: ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}opterr"] + pub static mut opterr: ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}optopt"] + pub static mut optopt: ::std::os::raw::c_int; +} +extern "C" { + pub fn getopt( + ___argc: ::std::os::raw::c_int, + ___argv: *const *mut ::std::os::raw::c_char, + __shortopts: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn gethostname(__name: *mut ::std::os::raw::c_char, __len: usize) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sethostname( + __name: *const ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn acct(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getusershell() -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn endusershell(); +} +extern "C" { + pub fn setusershell(); +} +extern "C" { + pub fn daemon( + __nochdir: ::std::os::raw::c_int, + __noclose: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn chroot(__path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getpass(__prompt: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn fsync(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn syncfs(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lockf( + __fd: ::std::os::raw::c_int, + __cmd: ::std::os::raw::c_int, + __len: __off_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lockf64( + __fd: ::std::os::raw::c_int, + __cmd: ::std::os::raw::c_int, + __len: __off64_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn copy_file_range( + __infd: ::std::os::raw::c_int, + __pinoff: *mut __off64_t, + __outfd: ::std::os::raw::c_int, + __poutoff: *mut __off64_t, + __length: usize, + __flags: ::std::os::raw::c_uint, + ) -> isize; +} +extern "C" { + pub fn fdatasync(__fildes: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn crypt( + __key: *const ::std::os::raw::c_char, + __salt: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn swab( + __from: *const ::std::os::raw::c_void, + __to: *mut ::std::os::raw::c_void, + __n: isize, + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union siginfo_t__bindgen_ty_1 { + pub _pad: [::std::os::raw::c_int; 28usize], + pub _kill: siginfo_t__bindgen_ty_1__bindgen_ty_1, + pub _timer: siginfo_t__bindgen_ty_1__bindgen_ty_2, + pub _rt: siginfo_t__bindgen_ty_1__bindgen_ty_3, + pub _sigchld: siginfo_t__bindgen_ty_1__bindgen_ty_4, + pub _sigfault: siginfo_t__bindgen_ty_1__bindgen_ty_5, + pub _sigpoll: siginfo_t__bindgen_ty_1__bindgen_ty_6, + pub _sigsys: siginfo_t__bindgen_ty_1__bindgen_ty_7, + _bindgen_union_align: [u64; 14usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct siginfo_t__bindgen_ty_1__bindgen_ty_1 { + pub si_pid: __pid_t, + pub si_uid: __uid_t, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct siginfo_t__bindgen_ty_1__bindgen_ty_2 { + pub si_tid: ::std::os::raw::c_int, + pub si_overrun: ::std::os::raw::c_int, + pub si_sigval: __sigval_t, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct siginfo_t__bindgen_ty_1__bindgen_ty_5 { + pub si_addr: *mut ::std::os::raw::c_void, + pub si_addr_lsb: ::std::os::raw::c_short, + pub _bounds: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 { + pub _addr_bnd: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, + pub _pkey: __uint32_t, + _bindgen_union_align: [u64; 2usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 { + pub _lower: *mut ::std::os::raw::c_void, + pub _upper: *mut ::std::os::raw::c_void, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct siginfo_t__bindgen_ty_1__bindgen_ty_6 { + pub si_band: ::std::os::raw::c_long, + pub si_fd: ::std::os::raw::c_int, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct siginfo_t__bindgen_ty_1__bindgen_ty_7 { + pub _call_addr: *mut ::std::os::raw::c_void, + pub _syscall: ::std::os::raw::c_int, + pub _arch: ::std::os::raw::c_uint, +} +pub const ILL_ILLOPC: _bindgen_ty_6 = 1; +pub const ILL_ILLOPN: _bindgen_ty_6 = 2; +pub const ILL_ILLADR: _bindgen_ty_6 = 3; +pub const ILL_ILLTRP: _bindgen_ty_6 = 4; +pub const ILL_PRVOPC: _bindgen_ty_6 = 5; +pub const ILL_PRVREG: _bindgen_ty_6 = 6; +pub const ILL_COPROC: _bindgen_ty_6 = 7; +pub const ILL_BADSTK: _bindgen_ty_6 = 8; + +pub const POLL_IN: _bindgen_ty_12 = 1; +pub const POLL_OUT: _bindgen_ty_12 = 2; +pub const POLL_MSG: _bindgen_ty_12 = 3; +pub const POLL_ERR: _bindgen_ty_12 = 4; +pub const POLL_PRI: _bindgen_ty_12 = 5; +pub const POLL_HUP: _bindgen_ty_12 = 6; +pub type _bindgen_ty_12 = u32; +pub type sigval_t = __sigval_t; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sigevent { + pub sigev_value: __sigval_t, + pub sigev_signo: ::std::os::raw::c_int, + pub sigev_notify: ::std::os::raw::c_int, + pub _sigev_un: sigevent__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sigevent__bindgen_ty_1 { + pub _pad: [::std::os::raw::c_int; 12usize], + pub _tid: __pid_t, + pub _sigev_thread: sigevent__bindgen_ty_1__bindgen_ty_1, + _bindgen_union_align: [u64; 6usize], +} +extern "C" { + pub fn __sysv_signal(__sig: ::std::os::raw::c_int, __handler: __sighandler_t) + -> __sighandler_t; +} +extern "C" { + pub fn sysv_signal(__sig: ::std::os::raw::c_int, __handler: __sighandler_t) -> __sighandler_t; +} +extern "C" { + pub fn signal(__sig: ::std::os::raw::c_int, __handler: __sighandler_t) -> __sighandler_t; +} +extern "C" { + #[link_name = "\u{1}__xpg_sigpause"] + pub fn sigpause(__sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigblock(__mask: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigsetmask(__mask: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn siggetmask() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigandset( + __set: *mut sigset_t, + __left: *const sigset_t, + __right: *const sigset_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigorset( + __set: *mut sigset_t, + __left: *const sigset_t, + __right: *const sigset_t, + ) -> ::std::os::raw::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sigaction { + pub __sigaction_handler: sigaction__bindgen_ty_1, + pub sa_mask: __sigset_t, + pub sa_flags: ::std::os::raw::c_int, + pub sa_restorer: ::core::option::Option, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sigaction__bindgen_ty_1 { + pub sa_handler: __sighandler_t, + pub sa_sigaction: ::core::option::Option< + unsafe extern "C" fn( + arg1: ::std::os::raw::c_int, + arg2: *mut siginfo_t, + arg3: *mut ::std::os::raw::c_void, + ), + >, + _bindgen_union_align: u64, +} +extern "C" { + pub fn sigprocmask( + __how: ::std::os::raw::c_int, + __set: *const sigset_t, + __oset: *mut sigset_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigsuspend(__set: *const sigset_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigaction( + __sig: ::std::os::raw::c_int, + __act: *const sigaction, + __oact: *mut sigaction, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigpending(__set: *mut sigset_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigwait( + __set: *const sigset_t, + __sig: *mut ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigwaitinfo(__set: *const sigset_t, __info: *mut siginfo_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigtimedwait( + __set: *const sigset_t, + __info: *mut siginfo_t, + __timeout: *const timespec, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sigqueue( + __pid: __pid_t, + __sig: ::std::os::raw::c_int, + __val: sigval, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}_sys_siglist"] + pub static mut _sys_siglist: [*const ::std::os::raw::c_char; 65usize]; +} +extern "C" { + #[link_name = "\u{1}sys_siglist"] + pub static mut sys_siglist: [*const ::std::os::raw::c_char; 65usize]; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _fpx_sw_bytes { + pub magic1: __uint32_t, + pub extended_size: __uint32_t, + pub xstate_bv: __uint64_t, + pub xstate_size: __uint32_t, + pub __glibc_reserved1: [__uint32_t; 7usize], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _fpreg { + pub significand: [::std::os::raw::c_ushort; 4usize], + pub exponent: ::std::os::raw::c_ushort, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct sigcontext { + pub r8: __uint64_t, + pub r9: __uint64_t, + pub r10: __uint64_t, + pub r11: __uint64_t, + pub r12: __uint64_t, + pub r13: __uint64_t, + pub r14: __uint64_t, + pub r15: __uint64_t, + pub rdi: __uint64_t, + pub rsi: __uint64_t, + pub rbp: __uint64_t, + pub rbx: __uint64_t, + pub rdx: __uint64_t, + pub rax: __uint64_t, + pub rcx: __uint64_t, + pub rsp: __uint64_t, + pub rip: __uint64_t, + pub eflags: __uint64_t, + pub cs: ::std::os::raw::c_ushort, + pub gs: ::std::os::raw::c_ushort, + pub fs: ::std::os::raw::c_ushort, + pub __pad0: ::std::os::raw::c_ushort, + pub err: __uint64_t, + pub trapno: __uint64_t, + pub oldmask: __uint64_t, + pub cr2: __uint64_t, + pub __bindgen_anon_1: sigcontext__bindgen_ty_1, + pub __reserved1: [__uint64_t; 8usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union sigcontext__bindgen_ty_1 { + pub fpstate: *mut _fpstate, + pub __fpstate_word: __uint64_t, + _bindgen_union_align: u64, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _libc_fpstate { + pub cwd: __uint16_t, + pub swd: __uint16_t, + pub ftw: __uint16_t, + pub fop: __uint16_t, + pub rip: __uint64_t, + pub rdp: __uint64_t, + pub mxcsr: __uint32_t, + pub mxcr_mask: __uint32_t, + pub _st: [_libc_fpxreg; 8usize], + pub _xmm: [_libc_xmmreg; 16usize], + pub __glibc_reserved1: [__uint32_t; 24usize], +} +#[derive(Debug, Copy, Clone)] +pub struct ucontext_t { + pub uc_flags: ::std::os::raw::c_ulong, + pub uc_link: *mut ucontext_t, + pub uc_stack: stack_t, + pub uc_mcontext: mcontext_t, + pub uc_sigmask: sigset_t, + pub __fpregs_mem: _libc_fpstate, + pub __ssp: [::std::os::raw::c_ulonglong; 4usize], +} +extern "C" { + pub fn siginterrupt( + __sig: ::std::os::raw::c_int, + __interrupt: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +pub const SS_ONSTACK: _bindgen_ty_15 = 1; +pub const SS_DISABLE: _bindgen_ty_15 = 2; +pub type _bindgen_ty_15 = u32; +extern "C" { + pub fn sigaltstack(__ss: *const stack_t, __oss: *mut stack_t) -> ::std::os::raw::c_int; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct __pthread_cond_s { + pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1, + pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2, + pub __g_refs: [::std::os::raw::c_uint; 2usize], + pub __g_size: [::std::os::raw::c_uint; 2usize], + pub __g1_orig_size: ::std::os::raw::c_uint, + pub __wrefs: ::std::os::raw::c_uint, + pub __g_signals: [::std::os::raw::c_uint; 2usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_mutex_t { + pub __data: __pthread_mutex_s, + pub __size: [::std::os::raw::c_char; 40usize], + pub __align: ::std::os::raw::c_long, + _bindgen_union_align: [u64; 5usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_cond_t { + pub __data: __pthread_cond_s, + pub __size: [::std::os::raw::c_char; 48usize], + pub __align: ::std::os::raw::c_longlong, + _bindgen_union_align: [u64; 6usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_rwlock_t { + pub __data: __pthread_rwlock_arch_t, + pub __size: [::std::os::raw::c_char; 56usize], + pub __align: ::std::os::raw::c_long, + _bindgen_union_align: [u64; 7usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_rwlockattr_t { + pub __size: [::std::os::raw::c_char; 8usize], + pub __align: ::std::os::raw::c_long, + _bindgen_union_align: u64, +} +pub type pthread_spinlock_t = ::std::os::raw::c_int; +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_barrier_t { + pub __size: [::std::os::raw::c_char; 32usize], + pub __align: ::std::os::raw::c_long, + _bindgen_union_align: [u64; 4usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union pthread_barrierattr_t { + pub __size: [::std::os::raw::c_char; 4usize], + pub __align: ::std::os::raw::c_int, + _bindgen_union_align: u32, +} +pub const r_instruction_r_output_direction: r_instruction = 0; +pub const r_instruction_r_input_direction: r_instruction = 1; +pub const r_instruction_r_inputa_direction: r_instruction = 2; +pub const r_instruction_r_appending_to: r_instruction = 3; +pub const r_instruction_r_reading_until: r_instruction = 4; +pub const r_instruction_r_reading_string: r_instruction = 5; +pub const r_instruction_r_duplicating_input: r_instruction = 6; +pub const r_instruction_r_duplicating_output: r_instruction = 7; +pub const r_instruction_r_deblank_reading_until: r_instruction = 8; +pub type REDIRECT = redirect; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct element { + pub word: *mut WORD_DESC, + pub redirect: *mut REDIRECT, +} +pub type ELEMENT = element; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct command { + pub type_: command_type, + pub flags: ::std::os::raw::c_int, + pub line: ::std::os::raw::c_int, + pub redirects: *mut REDIRECT, + pub value: command__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union command__bindgen_ty_1 { + pub For: *mut for_com, + pub Case: *mut case_com, + pub While: *mut while_com, + pub If: *mut if_com, + pub Connection: *mut connection, + pub Simple: *mut simple_com, + pub Function_def: *mut function_def, + pub Group: *mut group_com, + pub Select: *mut select_com, + pub Arith: *mut arith_com, + pub Cond: *mut cond_com, + pub ArithFor: *mut arith_for_com, + pub Subshell: *mut subshell_com, + pub Coproc: *mut coproc_com, + _bindgen_union_align: u64, +} +pub type COMMAND = command; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct connection { + pub ignore: ::std::os::raw::c_int, + pub first: *mut COMMAND, + pub second: *mut COMMAND, + pub connector: ::std::os::raw::c_int, +} +pub type CONNECTION = connection; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct pattern_list { + pub next: *mut pattern_list, + pub patterns: *mut WORD_LIST, + pub action: *mut COMMAND, + pub flags: ::std::os::raw::c_int, +} +pub type PATTERN_LIST = pattern_list; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct case_com { + pub flags: ::std::os::raw::c_int, + pub line: ::std::os::raw::c_int, + pub word: *mut WORD_DESC, + pub clauses: *mut PATTERN_LIST, +} +pub type CASE_COM = case_com; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct for_com { + pub flags: ::std::os::raw::c_int, + pub line: ::std::os::raw::c_int, + pub name: *mut WORD_DESC, + pub map_list: *mut WORD_LIST, + pub action: *mut COMMAND, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct if_com { + pub flags: ::std::os::raw::c_int, + pub test: *mut COMMAND, + pub true_case: *mut COMMAND, + pub false_case: *mut COMMAND, +} +pub type IF_COM = if_com; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct while_com { + pub flags: ::std::os::raw::c_int, + pub test: *mut COMMAND, + pub action: *mut COMMAND, +} +pub type SIMPLE_COM = simple_com; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct function_def { + pub flags: ::std::os::raw::c_int, + pub line: ::std::os::raw::c_int, + pub name: *mut WORD_DESC, + pub command: *mut COMMAND, + pub source_file: *mut ::std::os::raw::c_char, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct coproc { + pub c_name: *mut ::std::os::raw::c_char, + pub c_pid: pid_t, + pub c_rfd: ::std::os::raw::c_int, + pub c_wfd: ::std::os::raw::c_int, + pub c_rsave: ::std::os::raw::c_int, + pub c_wsave: ::std::os::raw::c_int, + pub c_flags: ::std::os::raw::c_int, + pub c_status: ::std::os::raw::c_int, + pub c_lock: ::std::os::raw::c_int, +} +extern "C" { + #[link_name = "\u{1}global_command"] + pub static mut global_command: *mut COMMAND; +} +extern "C" { + #[link_name = "\u{1}sh_coproc"] + pub static mut sh_coproc: Coproc; +} +pub type ulong = ::std::os::raw::c_ulong; +pub type ushort = ::std::os::raw::c_ushort; +pub type uint = ::std::os::raw::c_uint; +pub type u_int8_t = ::std::os::raw::c_uchar; +pub type u_int16_t = ::std::os::raw::c_ushort; +pub type u_int32_t = ::std::os::raw::c_uint; +pub type u_int64_t = ::std::os::raw::c_ulong; +pub type register_t = ::std::os::raw::c_long; +extern "C" { + pub fn strtoumax( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> uintmax_t; +} +extern "C" { + pub fn wcstoimax( + __nptr: *const __gwchar_t, + __endptr: *mut *mut __gwchar_t, + __base: ::std::os::raw::c_int, + ) -> intmax_t; +} +extern "C" { + pub fn wcstoumax( + __nptr: *const __gwchar_t, + __endptr: *mut *mut __gwchar_t, + __base: ::std::os::raw::c_int, + ) -> uintmax_t; +} +pub const _ISupper: _bindgen_ty_16 = 256; +pub const _ISlower: _bindgen_ty_16 = 512; +pub const _ISalpha: _bindgen_ty_16 = 1024; +pub const _ISdigit: _bindgen_ty_16 = 2048; +pub const _ISxdigit: _bindgen_ty_16 = 4096; +pub const _ISspace: _bindgen_ty_16 = 8192; +pub const _ISprint: _bindgen_ty_16 = 16384; +pub const _ISgraph: _bindgen_ty_16 = 32768; +pub const _ISblank: _bindgen_ty_16 = 1; +pub const _IScntrl: _bindgen_ty_16 = 2; +pub const _ISpunct: _bindgen_ty_16 = 4; +pub const _ISalnum: _bindgen_ty_16 = 8; +extern "C" { + pub fn isctype( + __c: ::std::os::raw::c_int, + __mask: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn isascii(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn toascii(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _toupper(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn _tolower(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn isalnum_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn isalpha_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn iscntrl_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn isdigit_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn islower_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn isgraph_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn isprint_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; +}pub fn isalpha_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; +} +pub type __timezone_ptr_t = *mut timezone; +extern "C" { + pub fn gettimeofday(__tv: *mut timeval, __tz: __timezone_ptr_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn settimeofday(__tv: *const timeval, __tz: *const timezone) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn adjtime(__delta: *const timeval, __olddelta: *mut timeval) -> ::std::os::raw::c_int; +} +pub const __itimer_which_ITIMER_REAL: __itimer_which = 0; +pub const __itimer_which_ITIMER_VIRTUAL: __itimer_which = 1; +pub const __itimer_which_ITIMER_PROF: __itimer_which = 2; +pub type __itimer_which = u32; +pub const __rlimit_resource_RLIMIT_CPU: __rlimit_resource = 0; +pub const __rlimit_resource_RLIMIT_FSIZE: __rlimit_resource = 1; +pub const __rlimit_resource_RLIMIT_DATA: __rlimit_resource = 2; +pub const __rlimit_resource_RLIMIT_STACK: __rlimit_resource = 3; +pub const __rlimit_resource_RLIMIT_CORE: __rlimit_resource = 4; +pub const __rlimit_resource___RLIMIT_RSS: __rlimit_resource = 5; +pub const __rlimit_resource_RLIMIT_NOFILE: __rlimit_resource = 7; +pub const __rlimit_resource___RLIMIT_OFILE: __rlimit_resource = 7; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct rusage { + pub ru_utime: timeval, + pub ru_stime: timeval, + pub __bindgen_anon_1: rusage__bindgen_ty_1, + pub __bindgen_anon_2: rusage__bindgen_ty_2, + pub __bindgen_anon_3: rusage__bindgen_ty_3, + pub __bindgen_anon_4: rusage__bindgen_ty_4, + pub __bindgen_anon_5: rusage__bindgen_ty_5, + pub __bindgen_anon_6: rusage__bindgen_ty_6, + pub __bindgen_anon_7: rusage__bindgen_ty_7, + pub __bindgen_anon_8: rusage__bindgen_ty_8, + pub __bindgen_anon_9: rusage__bindgen_ty_9, + pub __bindgen_anon_10: rusage__bindgen_ty_10, + pub __bindgen_anon_11: rusage__bindgen_ty_11, + pub __bindgen_anon_12: rusage__bindgen_ty_12, + pub __bindgen_anon_13: rusage__bindgen_ty_13, + pub __bindgen_anon_14: rusage__bindgen_ty_14, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union rusage__bindgen_ty_2 { + pub ru_ixrss: ::std::os::raw::c_long, + pub __ru_ixrss_word: __syscall_slong_t, + _bindgen_union_align: u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union rusage__bindgen_ty_3 { + pub ru_idrss: ::std::os::raw::c_long, + pub __ru_idrss_word: __syscall_slong_t, + _bindgen_union_align: u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union rusage__bindgen_ty_6 { + pub ru_majflt: ::std::os::raw::c_long, + pub __ru_majflt_word: __syscall_slong_t, + _bindgen_union_align: u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union rusage__bindgen_ty_7 { + pub ru_nswap: ::std::os::raw::c_long, + pub __ru_nswap_word: __syscall_slong_t, + _bindgen_union_align: u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union rusage__bindgen_ty_8 { + pub ru_inblock: ::std::os::raw::c_long, + pub __ru_inblock_word: __syscall_slong_t, + _bindgen_union_align: u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union rusage__bindgen_ty_13 { + pub ru_nvcsw: ::std::os::raw::c_long, + pub __ru_nvcsw_word: __syscall_slong_t, + _bindgen_union_align: u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union rusage__bindgen_ty_14 { + pub ru_nivcsw: ::std::os::raw::c_long, + pub __ru_nivcsw_word: __syscall_slong_t, + _bindgen_union_align: u64, +} +pub const __priority_which_PRIO_PROCESS: __priority_which = 0; +pub const __priority_which_PRIO_PGRP: __priority_which = 1; +pub const __priority_which_PRIO_USER: __priority_which = 2; +pub type __priority_which = u32; +extern "C" { + pub fn prlimit( + __pid: __pid_t, + __resource: __rlimit_resource, + __new_limit: *const rlimit, + __old_limit: *mut rlimit, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getrlimit64( + __resource: __rlimit_resource_t, + __rlimits: *mut rlimit64, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn setrlimit( + __resource: __rlimit_resource_t, + __rlimits: *const rlimit, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn setrlimit64( + __resource: __rlimit_resource_t, + __rlimits: *const rlimit64, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getrusage(__who: __rusage_who_t, __usage: *mut rusage) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn getpriority(__which: __priority_which_t, __who: id_t) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn memccpy( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __c: ::std::os::raw::c_int, + __n: usize, + ) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn memset( + __s: *mut ::std::os::raw::c_void, + __c: ::std::os::raw::c_int, + __n: usize, + ) -> *mut ::std::os::raw::c_void; +} + + +extern "C" { + pub fn strcpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strncpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strcat( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strncat( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strcmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strncmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + __n: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strcoll( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strxfrm( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + ) -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn strcoll_l( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + __l: locale_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strxfrm_l( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + __l: locale_t, + ) -> usize; +} +extern "C" { + pub fn strdup(__s: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strndup( + __string: *const ::std::os::raw::c_char, + __n: usize, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strchr( + __s: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strrchr( + __s: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strchrnul( + __s: *const ::std::os::raw::c_char, + __c: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strcspn( + __s: *const ::std::os::raw::c_char, + __reject: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn strspn( + __s: *const ::std::os::raw::c_char, + __accept: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn strpbrk( + __s: *const ::std::os::raw::c_char, + __accept: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strstr( + __haystack: *const ::std::os::raw::c_char, + __needle: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strtok( + __s: *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn __strtok_r( + __s: *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, + __save_ptr: *mut *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strtok_r( + __s: *mut ::std::os::raw::c_char, + __delim: *const ::std::os::raw::c_char, + __save_ptr: *mut *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strcasestr( + __haystack: *const ::std::os::raw::c_char, + __needle: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn memmem( + __haystack: *const ::std::os::raw::c_void, + __haystacklen: usize, + __needle: *const ::std::os::raw::c_void, + __needlelen: usize, + ) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn __mempcpy( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __n: usize, + ) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn mempcpy( + __dest: *mut ::std::os::raw::c_void, + __src: *const ::std::os::raw::c_void, + __n: usize, + ) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn strncmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + __n: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strerror_l( + __errnum: ::std::os::raw::c_int, + __l: locale_t, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn bcmp( + __s1: *const ::std::os::raw::c_void, + __s2: *const ::std::os::raw::c_void, + __n: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strcoll( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; +} +extern "C" { + pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: usize) -> usize; +} +extern "C" { + pub fn explicit_bzero(__s: *mut ::std::os::raw::c_void, __n: usize); +} +extern "C" { + pub fn strncasecmp_l( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + __n: usize, + __loc: locale_t, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn stpcpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn __stpncpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn stpncpy( + __dest: *mut ::std::os::raw::c_char, + __src: *const ::std::os::raw::c_char, + __n: usize, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn strverscmp( + __s1: *const ::std::os::raw::c_char, + __s2: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct lldiv_t { + pub quot: ::std::os::raw::c_longlong, + pub rem: ::std::os::raw::c_longlong, +} +extern "C" { + pub fn __ctype_get_mb_cur_max() -> usize; +} +extern "C" { + pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64; +} +extern "C" { + pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; +} +extern "C" { + pub fn strtof32( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + ) -> _Float32; +} +extern "C" { + pub fn strtof64( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + ) -> _Float64; +} +extern "C" { + pub fn strtof32x( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + ) -> _Float32x; +} +extern "C" { + pub fn strtof64x( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + ) -> _Float64x; +} +extern "C" { + pub fn strtoq( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_longlong; +} +extern "C" { + pub fn strtouq( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __base: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_ulonglong; +} +extern "C" { + pub fn strfromd( + __dest: *mut ::std::os::raw::c_char, + __size: usize, + __format: *const ::std::os::raw::c_char, + __f: f64, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strfromf( + __dest: *mut ::std::os::raw::c_char, + __size: usize, + __format: *const ::std::os::raw::c_char, + __f: f32, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strfroml( + __dest: *mut ::std::os::raw::c_char, + __size: usize, + __format: *const ::std::os::raw::c_char, + __f: f64, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strfromf32( + __dest: *mut ::std::os::raw::c_char, + __size: usize, + __format: *const ::std::os::raw::c_char, + __f: _Float32, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strfromf64( + __dest: *mut ::std::os::raw::c_char, + __size: usize, + __format: *const ::std::os::raw::c_char, + __f: _Float64, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strfromf32x( + __dest: *mut ::std::os::raw::c_char, + __size: usize, + __format: *const ::std::os::raw::c_char, + __f: _Float32x, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strfromf64x( + __dest: *mut ::std::os::raw::c_char, + __size: usize, + __format: *const ::std::os::raw::c_char, + __f: _Float64x, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn strtold_l( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __loc: locale_t, + ) -> f64; +} +extern "C" { + pub fn strtof32_l( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __loc: locale_t, + ) -> _Float32; +} +extern "C" { + pub fn strtof64_l( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __loc: locale_t, + ) -> _Float64; +} +extern "C" { + pub fn strtof32x_l( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __loc: locale_t, + ) -> _Float32x; +} +extern "C" { + pub fn strtof64x_l( + __nptr: *const ::std::os::raw::c_char, + __endptr: *mut *mut ::std::os::raw::c_char, + __loc: locale_t, + ) -> _Float64x; +} +extern "C" { + pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; +} +extern "C" { + pub fn random() -> ::std::os::raw::c_long; +} +extern "C" { + pub fn srandom(__seed: ::std::os::raw::c_uint); +} +extern "C" { + pub fn initstate_r( + __seed: ::std::os::raw::c_uint, + __statebuf: *mut ::std::os::raw::c_char, + __statelen: usize, + __buf: *mut random_data, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn setstate_r( + __statebuf: *mut ::std::os::raw::c_char, + __buf: *mut random_data, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn rand() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn srand(__seed: ::std::os::raw::c_uint); +} +extern "C" { + pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lcong48(__param: *mut ::std::os::raw::c_ushort); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct drand48_data { + pub __x: [::std::os::raw::c_ushort; 3usize], + pub __old_x: [::std::os::raw::c_ushort; 3usize], + pub __c: ::std::os::raw::c_ushort, + pub __init: ::std::os::raw::c_ushort, + pub __a: ::std::os::raw::c_ulonglong, +} +extern "C" { + pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn erand48_r( + __xsubi: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + __result: *mut f64, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lrand48_r( + __buffer: *mut drand48_data, + __result: *mut ::std::os::raw::c_long, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn nrand48_r( + __xsubi: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + __result: *mut ::std::os::raw::c_long, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn seed48_r( + __seed16v: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn lcong48_r( + __param: *mut ::std::os::raw::c_ushort, + __buffer: *mut drand48_data, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn malloc(__size: usize) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn calloc(__nmemb: usize, __size: usize) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn realloc( + __ptr: *mut ::std::os::raw::c_void, + __size: usize, + ) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn reallocarray( + __ptr: *mut ::std::os::raw::c_void, + __nmemb: usize, + __size: usize, + ) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn free(__ptr: *mut ::std::os::raw::c_void); +} +extern "C" { + pub fn alloca(__size: usize) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn exit(__status: ::std::os::raw::c_int); +} +extern "C" { + pub fn quick_exit(__status: ::std::os::raw::c_int); +} +extern "C" { + pub fn _Exit(__status: ::std::os::raw::c_int); +} +extern "C" { + pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn secure_getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn aligned_alloc(__alignment: usize, __size: usize) -> *mut ::std::os::raw::c_void; +} +extern "C" { + pub fn abort(); +} +extern "C" { + pub fn atexit(__func: ::core::option::Option) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn clearenv() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn at_quick_exit( + __func: ::core::option::Option, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn mkstemps64( + __template: *mut ::std::os::raw::c_char, + __suffixlen: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn mkostemp( + __template: *mut ::std::os::raw::c_char, + __flags: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn canonicalize_file_name( + __name: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn fcvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn gcvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn qecvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn qfcvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn qgcvt( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn ecvt_r( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fcvt_r( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn qecvt_r( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn qfcvt_r( + __value: f64, + __ndigit: ::std::os::raw::c_int, + __decpt: *mut ::std::os::raw::c_int, + __sign: *mut ::std::os::raw::c_int, + __buf: *mut ::std::os::raw::c_char, + __len: usize, + ) -> ::std::os::raw::c_int; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct g_list { + pub next: *mut g_list, +} +pub type GENERIC_LIST = g_list; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct STRING_INT_ALIST { + pub word: *mut ::std::os::raw::c_char, + pub token: ::std::os::raw::c_int, +} +pub type Function = ::core::option::Option ::std::os::raw::c_int>; +pub type VFunction = ::core::option::Option; +pub type CPFunction = ::core::option::Option *mut ::std::os::raw::c_char>; +pub type CPPFunction = + ::core::option::Option *mut *mut ::std::os::raw::c_char>; +pub type sh_intfunc_t = ::core::option::Option< + unsafe extern "C" fn(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int, +>; +pub type sh_ivoidfunc_t = ::core::option::Option ::std::os::raw::c_int>; +pub type sh_icpfunc_t = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int, +>; +pub type sh_icppfunc_t = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int, +>; +pub type sh_iptrfunc_t = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, +>; +pub type sh_wassign_func_t = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut WORD_DESC, + arg2: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, +>; +pub type sh_load_func_t = ::core::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int, +>; +pub type sh_unload_func_t = + ::core::option::Option; +pub type sh_builtin_func_t = + ::core::option::Option ::std::os::raw::c_int>; +pub type QSFUNC = ::core::option::Option< + unsafe extern "C" fn( + arg1: *const ::std::os::raw::c_void, + arg2: *const ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +extern "C" { + pub fn posix_initialize(arg1: ::std::os::raw::c_int); +} +extern "C" { + pub fn num_posix_options() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn get_posix_options(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn set_posix_options(arg1: *const ::std::os::raw::c_char); +} +extern "C" { + pub fn save_posix_options(); +} +extern "C" { + pub fn string_to_rlimtype(arg1: *mut ::std::os::raw::c_char) -> rlim_t; +} +extern "C" { + pub fn print_rlimtype(arg1: rlim_t, arg2: ::std::os::raw::c_int); +} +extern "C" { + pub fn all_digits(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn legal_identifier(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn importable_function_name( + arg1: *const ::std::os::raw::c_char, + arg2: usize, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn exportable_function_name(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn check_identifier( + arg1: *mut WORD_DESC, + arg2: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn valid_nameref_value( + arg1: *const ::std::os::raw::c_char, + arg2: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} + pub fn sh_unset_nodelay_mode(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sh_setclexec(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sh_validfd(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn fd_ispipe(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn check_dev_tty(); +} +extern "C" { + pub fn move_to_high_fd( + arg1: ::std::os::raw::c_int, + arg2: ::std::os::raw::c_int, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn check_binary_file( + arg1: *const ::std::os::raw::c_char, + arg2: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sh_openpipe(arg1: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn sh_closepipe(arg1: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn file_exists(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn file_isdir(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn file_iswdir(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn path_dot_or_dotdot(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn absolute_pathname(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn absolute_program(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn make_absolute( + arg1: *const ::std::os::raw::c_char, + arg2: *const ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn base_pathname(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn full_pathname(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn polite_directory_format( + arg1: *mut ::std::os::raw::c_char, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn trim_pathname( + arg1: *mut ::std::os::raw::c_char, + arg2: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn printable_filename( + arg1: *mut ::std::os::raw::c_char, + arg2: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn extract_colon_unit( + arg1: *mut ::std::os::raw::c_char, + arg2: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn tilde_initialize(); +} +extern "C" { + pub fn bash_tilde_find_word( + arg1: *const ::std::os::raw::c_char, + arg2: ::std::os::raw::c_int, + arg3: *mut ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn bash_tilde_expand( + arg1: *const ::std::os::raw::c_char, + arg2: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn get_group_list(arg1: *mut ::std::os::raw::c_int) -> *mut *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn get_group_array(arg1: *mut ::std::os::raw::c_int) -> *mut ::std::os::raw::c_int; +} +extern "C" { + pub fn conf_standard_path() -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn default_columns() -> ::std::os::raw::c_int; +} +pub type arrayind_t = intmax_t; +pub const atype_array_indexed: atype = 0; +pub const atype_array_assoc: atype = 1; +pub type atype = u32; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct array { + pub type_: atype, + pub max_index: arrayind_t, + pub num_elements: ::std::os::raw::c_int, + pub head: *mut array_element, + pub lastref: *mut array_element, +} +pub type ARRAY = array; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct array_element { + pub ind: arrayind_t, + pub value: *mut ::std::os::raw::c_char, + pub next: *mut array_element, + pub prev: *mut array_element, +} +pub type ARRAY_ELEMENT = array_element; +pub type sh_ae_map_func_t = ::core::option::Option< + unsafe extern "C" fn( + arg1: *mut ARRAY_ELEMENT, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int, +>; +extern "C" { + pub fn array_create() -> *mut ARRAY; +} +extern "C" { + pub fn array_flush(arg1: *mut ARRAY); +} +extern "C" { + pub fn array_dispose(arg1: *mut ARRAY); +} +extern "C" { + pub fn array_copy(arg1: *mut ARRAY) -> *mut ARRAY; +} +extern "C" { + pub fn array_slice( + arg1: *mut ARRAY, + arg2: *mut ARRAY_ELEMENT, + arg3: *mut ARRAY_ELEMENT, + ) -> *mut ARRAY; +} +extern "C" { + pub fn array_walk(arg1: *mut ARRAY, arg2: sh_ae_map_func_t, arg3: *mut ::std::os::raw::c_void); +} +extern "C" { + pub fn array_shift( + arg1: *mut ARRAY, + arg2: ::std::os::raw::c_int, + arg3: ::std::os::raw::c_int, + ) -> *mut ARRAY_ELEMENT; +} +extern "C" { + pub fn array_rshift( + arg1: *mut ARRAY, + arg2: ::std::os::raw::c_int, + arg3: *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn array_unshift_element(arg1: *mut ARRAY) -> *mut ARRAY_ELEMENT; +} +extern "C" { + pub fn array_shift_element( + arg1: *mut ARRAY, + arg2: *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn array_quote(arg1: *mut ARRAY) -> *mut ARRAY; +} +extern "C" { + pub fn array_quote_escapes(arg1: *mut ARRAY) -> *mut ARRAY; +} +extern "C" { + pub fn array_dequote(arg1: *mut ARRAY) -> *mut ARRAY; +} +extern "C" { + pub fn array_dequote_escapes(arg1: *mut ARRAY) -> *mut ARRAY; +} +extern "C" { + pub fn array_remove_quoted_nulls(arg1: *mut ARRAY) -> *mut ARRAY; +} +extern "C" { + pub fn array_subrange( + arg1: *mut ARRAY, + arg2: arrayind_t, + arg3: arrayind_t, + arg4: ::std::os::raw::c_int, + arg5: ::std::os::raw::c_int, + arg6: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn array_patsub( + arg1: *mut ARRAY, + arg2: *mut ::std::os::raw::c_char, + arg3: *mut ::std::os::raw::c_char, + arg4: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn array_modcase( + arg1: *mut ARRAY, + arg2: *mut ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + arg4: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn array_create_element( + arg1: arrayind_t, + arg2: *mut ::std::os::raw::c_char, + ) -> *mut ARRAY_ELEMENT; +} +extern "C" { + pub fn array_copy_element(arg1: *mut ARRAY_ELEMENT) -> *mut ARRAY_ELEMENT; +} +extern "C" { + pub fn array_dispose_element(arg1: *mut ARRAY_ELEMENT); +} +extern "C" { + pub fn array_insert( + arg1: *mut ARRAY, + arg2: arrayind_t, + arg3: *mut ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn array_remove(arg1: *mut ARRAY, arg2: arrayind_t) -> *mut ARRAY_ELEMENT; +} +extern "C" { + pub fn array_reference(arg1: *mut ARRAY, arg2: arrayind_t) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn array_to_word_list(arg1: *mut ARRAY) -> *mut WORD_LIST; +} +extern "C" { + pub fn array_from_word_list(arg1: *mut WORD_LIST) -> *mut ARRAY; +} +extern "C" { + pub fn array_keys_to_word_list(arg1: *mut ARRAY) -> *mut WORD_LIST; +} +extern "C" { + pub fn array_assign_list(arg1: *mut ARRAY, arg2: *mut WORD_LIST) -> *mut ARRAY; +} +extern "C" { + pub fn array_to_argv( + arg1: *mut ARRAY, + arg2: *mut ::std::os::raw::c_int, + ) -> *mut *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn array_to_kvpair( + arg1: *mut ARRAY, + arg2: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn array_to_assign( + arg1: *mut ARRAY, + arg2: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn array_to_string( + arg1: *mut ARRAY, + arg2: *mut ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn array_from_string( + arg1: *mut ::std::os::raw::c_char, + arg2: *mut ::std::os::raw::c_char, + ) -> *mut ARRAY; +} +extern "C" { + pub fn execute_array_command( + arg1: *mut ARRAY, + arg2: *mut ::std::os::raw::c_void, + ) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}trap_list"] + pub static mut trap_list: [*mut ::std::os::raw::c_char; 0usize]; +} +extern "C" { + #[link_name = "\u{1}trapped_signal_received"] + pub static mut trapped_signal_received: ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}wait_signal_received"] + pub static mut wait_signal_received: ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}running_trap"] + pub static mut running_trap: ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}trap_saved_exit_value"] + pub static mut trap_saved_exit_value: ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}suppress_debug_trap_verbose"] + pub static mut suppress_debug_trap_verbose: ::std::os::raw::c_int; +} +extern "C" { + pub fn initialize_traps(); +} +extern "C" { + pub fn run_pending_traps(); +} +extern "C" { + pub fn queue_sigchld_trap(arg1: ::std::os::raw::c_int); +} +extern "C" { + pub fn maybe_set_sigchld_trap(arg1: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn set_impossible_sigchld_trap(); +} +extern "C" { + pub fn set_sigchld_trap(arg1: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn set_debug_trap(arg1: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn set_error_trap(arg1: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn set_return_trap(arg1: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn maybe_set_debug_trap(arg1: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn maybe_set_error_trap(arg1: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn maybe_set_return_trap(arg1: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn set_sigint_trap(arg1: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn set_signal(arg1: ::std::os::raw::c_int, arg2: *mut ::std::os::raw::c_char); +} +extern "C" { + pub fn restore_default_signal(arg1: ::std::os::raw::c_int); +} +extern "C" { + pub fn ignore_signal(arg1: ::std::os::raw::c_int); +} +extern "C" { + pub fn run_exit_trap() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn run_trap_cleanup(arg1: ::std::os::raw::c_int); +} +extern "C" { + pub fn run_debug_trap() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn run_error_trap(); +} +extern "C" { + pub fn run_return_trap(); +} +extern "C" { + pub fn free_trap_strings(); +} +extern "C" { + pub fn reset_signal_handlers(); +} +extern "C" { + pub fn restore_original_signals(); +} +extern "C" { + pub fn get_original_signal(arg1: ::std::os::raw::c_int); +} +extern "C" { + pub fn run_interrupt_trap(arg1: ::std::os::raw::c_int); +} +extern "C" { + pub fn maybe_call_trap_handler(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn signal_is_special(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn signal_is_trapped(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn signal_is_pending(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn signal_is_ignored(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn signal_is_hard_ignored(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn set_signal_hard_ignored(arg1: ::std::os::raw::c_int); +} +extern "C" { + pub fn set_signal_ignored(arg1: ::std::os::raw::c_int); +} +extern "C" { + pub fn signal_in_progress(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn set_trap_state(arg1: ::std::os::raw::c_int); +} +extern "C" { + pub fn next_pending_trap(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn first_pending_trap() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn clear_pending_traps(); +} +extern "C" { + pub fn any_signals_trapped() -> ::std::os::raw::c_int; +} +extern "C" { + pub fn check_signals(); +} +extern "C" { + pub fn check_signals_and_traps(); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct direct { + pub d_ino: ::std::os::raw::c_long, + pub d_reclen: ::std::os::raw::c_ushort, + pub d_namlen: ::std::os::raw::c_ushort, + pub d_name: [::std::os::raw::c_char; 16usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct DIR { + pub dd_fd: ::std::os::raw::c_int, + pub dd_loc: ::std::os::raw::c_int, + pub dd_size: ::std::os::raw::c_int, + pub dd_buf: [::std::os::raw::c_char; 512usize], +} +extern "C" { + pub fn opendir() -> *mut DIR; +} +extern "C" { + pub fn readdir() -> *mut direct; +} +extern "C" { + pub fn telldir() -> ::std::os::raw::c_long; +} +extern "C" { + pub fn seekdir(); +} +extern "C" { + pub fn closedir(); +} +extern "C" { + pub fn glob_pattern_p(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn glob_vector( + arg1: *mut ::std::os::raw::c_char, + arg2: *mut ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> *mut *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn glob_filename( + arg1: *mut ::std::os::raw::c_char, + arg2: ::std::os::raw::c_int, + ) -> *mut *mut ::std::os::raw::c_char; +} +extern "C" { + pub fn extglob_pattern_p(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}glob_error_return"] + pub static mut glob_error_return: *mut ::std::os::raw::c_char; +} +extern "C" { + #[link_name = "\u{1}noglob_dot_filenames"] + pub static mut noglob_dot_filenames: ::std::os::raw::c_int; +} +extern "C" { + #[link_name = "\u{1}glob_ignore_case"] + pub static mut glob_ignore_case: ::std::os::raw::c_int; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct _COLLSYM { + pub name: *mut ::std::os::raw::c_char, + pub code: ::std::os::raw::c_uchar, +} +pub type __COLLSYM = _COLLSYM; +extern "C" { + #[link_name = "\u{1}POSIXCOLL"] + pub static mut POSIXCOLL: [__COLLSYM; 96usize]; +} +extern "C" { + pub fn strmatch( + arg1: *mut ::std::os::raw::c_char, + arg2: *mut ::std::os::raw::c_char, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +extern "C" { + pub fn wcsmatch( + arg1: *mut wchar_t, + arg2: *mut wchar_t, + arg3: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; +} +pub type __builtin_va_list = [__va_list_tag; 1usize]; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __va_list_tag { + pub gp_offset: ::std::os::raw::c_uint, + pub fp_offset: ::std::os::raw::c_uint, + pub overflow_arg_area: *mut ::std::os::raw::c_void, + pub reg_save_area: *mut ::std::os::raw::c_void, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct __locale_data { + pub _address: u8, +} diff --git a/bash-5.1/builtins_rust/history/src/lib.rs b/bash-5.1/builtins_rust/history/src/lib.rs index acc108a465cbea4b72ab25e896da0e53071b5f76..e345fa806fa38c7ad9e361ac25ff8bc2a162fc2f 100644 --- a/bash-5.1/builtins_rust/history/src/lib.rs +++ b/bash-5.1/builtins_rust/history/src/lib.rs @@ -24,7 +24,7 @@ pub extern "C" fn r_history_builtin(mut list: *mut WordList) -> i32 { let mut opt: c_int; let mut result: c_int; - let mut filename: *mut c_char; + let filename: *mut c_char; let mut delete_arg: *mut c_char = PT_NULL as *mut c_char; let mut range: *mut c_char; @@ -206,7 +206,7 @@ fn histtime(hlist: *mut HIST_ENTRY, histtimefmt: *const c_char) -> *mut c_char unsafe { static mut timestr: [c_char;128] = [0;128]; - let mut t = history_get_time(hlist); + let t = history_get_time(hlist); let tm = if t != 0 {libc::localtime(&t)} else {PT_NULL as *mut libc::tm}; if t != 0 && !tm.is_null() { strftime(std::mem::transmute(×tr), @@ -239,7 +239,7 @@ unsafe fn quit() unsafe fn display_history(list: *mut WordList) -> c_int { let mut limit:c_long = 0; - let mut histtimefmt: *mut c_char; + let histtimefmt: *mut c_char; let mut timestr: *mut c_char; if !list.is_null() { @@ -317,7 +317,7 @@ fn expand_and_print_history(mut list: *mut WordList) -> c_int { unsafe { - let mut s: *mut c_char = PT_NULL as *mut c_char; + let s: *mut c_char = PT_NULL as *mut c_char; let mut result: c_int; if hist_last_line_pushed == 0 && hist_last_line_added != 0 && bash_delete_last_history() == 0 { diff --git a/bash-5.1/builtins_rust/jobs/build.rs b/bash-5.1/builtins_rust/jobs/build.rs deleted file mode 100644 index 5b5544932086123d93bad082cc9783b5d85fd090..0000000000000000000000000000000000000000 --- a/bash-5.1/builtins_rust/jobs/build.rs +++ /dev/null @@ -1,183 +0,0 @@ - - - use std::{env}; - - fn main() { - - let library_dir = "/opt/rsbash/builtins"; - - println!("cargo:rustc-link-search=native={}", env::join_paths(&[library_dir]).unwrap().to_str().unwrap()); - - println!("cargo:rustc-flags=-l dylib=jobs"); - println!("cargo:rustc-flags=-l dylib=trap"); - println!("cargo:rustc-flags=-l dylib=execute_cmd"); - println!("cargo:rustc-flags=-l dylib=unwind_prot"); - println!("cargo:rustc-flags=-l dylib=flags"); - println!("cargo:rustc-flags=-l dylib=variables"); - println!("cargo:rustc-flags=-l dylib=builtins_break"); - println!("cargo:rustc-flags=-l dylib=builtins_common"); - println!("cargo:rustc-flags=-l dylib=sig"); - println!("cargo:rustc-flags=-l dylib=builtins_wait"); - println!("cargo:rustc-flags=-l dylib=shell"); - println!("cargo:rustc-flags=-l dylib=input"); - println!("cargo:rustc-flags=-l dylib=xmalloc"); - println!("cargo:rustc-flags=-l dylib=version"); - println!("cargo:rustc-flags=-l dylib=error"); - println!("cargo:rustc-flags=-l dylib=subst"); - println!("cargo:rustc-flags=-l dylib=lib_sh_winsize"); - println!("cargo:rustc-flags=-l dylib=dispose_cmd"); - println!("cargo:rustc-flags=-l dylib=lib_readline_readline"); - println!("cargo:rustc-flags=-l dylib=general"); - println!("cargo:rustc-flags=-l dylib=lib_sh_oslib"); - println!("cargo:rustc-flags=-l dylib=list"); - println!("cargo:rustc-flags=-l dylib=builtins_evalstring"); - println!("cargo:rustc-flags=-l dylib=y.tab"); - println!("cargo:rustc-flags=-l dylib=builtins_evalfile"); - println!("cargo:rustc-flags=-l dylib=lib_sh_casemod"); - println!("cargo:rustc-flags=-l dylib=lib_sh_fmtulong"); - println!("cargo:rustc-flags=-l dylib=builtins_set"); - println!("cargo:rustc-flags=-l dylib=lib_readline_history"); - println!("cargo:rustc-flags=-l dylib=mailcheck"); - println!("cargo:rustc-flags=-l dylib=bashhist"); - println!("cargo:rustc-flags=-l dylib=bashline"); - println!("cargo:rustc-flags=-l dylib=assoc"); - println!("cargo:rustc-flags=-l dylib=builtins_shopt"); - println!("cargo:rustc-flags=-l dylib=lib_readline_histfile"); - println!("cargo:rustc-flags=-l dylib=hashlib"); - println!("cargo:rustc-flags=-l dylib=print_cmd"); - println!("cargo:rustc-flags=-l dylib=copy_cmd"); - println!("cargo:rustc-flags=-l dylib=hashcmd"); - println!("cargo:rustc-flags=-l dylib=pathexp"); - println!("cargo:rustc-flags=-l dylib=lib_sh_random"); - println!("cargo:rustc-flags=-l dylib=findcmd"); - println!("cargo:rustc-flags=-l dylib=arrayfunc"); - println!("cargo:rustc-flags=-l dylib=lib_readline_terminal"); - println!("cargo:rustc-flags=-l dylib=array"); - println!("cargo:rustc-flags=-l dylib=lib_readline_complete"); - println!("cargo:rustc-flags=-l dylib=alias"); - println!("cargo:rustc-flags=-l dylib=builtins_getopt"); - println!("cargo:rustc-flags=-l dylib=locale"); - println!("cargo:rustc-flags=-l dylib=lib_readline_shell"); - println!("cargo:rustc-flags=-l dylib=lib_sh_stringvec"); - println!("cargo:rustc-flags=-l dylib=lib_sh_itos"); - println!("cargo:rustc-flags=-l dylib=pcomplete"); - println!("cargo:rustc-flags=-l dylib=lib_sh_strtrans"); - println!("cargo:rustc-flags=-l dylib=lib_readline_histexpand"); - println!("cargo:rustc-flags=-l dylib=lib_sh_shquote"); - println!("cargo:rustc-flags=-l dylib=builtins_pushd"); - println!("cargo:rustc-flags=-l dylib=redir"); - println!("cargo:rustc-flags=-l dylib=lib_sh_pathcanon"); - println!("cargo:rustc-flags=-l dylib=builtins_getopts"); - println!("cargo:rustc-flags=-l dylib=lib_readline_colors"); - println!("cargo:rustc-flags=-l dylib=lib_readline_mbutil"); - println!("cargo:rustc-flags=-l dylib=lib_readline_signals"); - println!("cargo:rustc-flags=-l dylib=lib_readline_text"); - println!("cargo:rustc-flags=-l dylib=lib_readline_parse-colors"); - println!("cargo:rustc-flags=-l dylib=lib_readline_display"); - println!("cargo:rustc-flags=-l dylib=lib_readline_util"); - println!("cargo:rustc-flags=-l dylib=lib_glob_xmbsrtowcs"); - println!("cargo:rustc-flags=-l dylib=lib_glob_gmisc"); - println!("cargo:rustc-flags=-l dylib=lib_sh_shmbchar"); - println!("cargo:rustc-flags=-l dylib=make_cmd"); - println!("cargo:rustc-flags=-l dylib=syntax"); - println!("cargo:rustc-flags=-l dylib=lib_glob_strmatch"); - println!("cargo:rustc-flags=-l dylib=lib_glob_glob"); - println!("cargo:rustc-flags=-l dylib=builtins_declare"); - println!("cargo:rustc-flags=-l dylib=stringlib"); - println!("cargo:rustc-flags=-l dylib=builtins_setattr"); - println!("cargo:rustc-flags=-l dylib=braces"); - println!("cargo:rustc-flags=-l dylib=lib_readline_misc"); - println!("cargo:rustc-flags=-l dylib=lib_readline_rltty"); - println!("cargo:rustc-flags=-l dylib=lib_readline_keymaps"); - println!("cargo:rustc-flags=-l dylib=lib_readline_kill"); - println!("cargo:rustc-flags=-l dylib=lib_readline_input"); - println!("cargo:rustc-flags=-l dylib=lib_readline_vi_mode"); - println!("cargo:rustc-flags=-l dylib=lib_readline_macro"); - println!("cargo:rustc-flags=-l dylib=lib_readline_bind"); - println!("cargo:rustc-flags=-l dylib=lib_readline_undo"); - println!("cargo:rustc-flags=-l dylib=lib_readline_funmap"); - println!("cargo:rustc-flags=-l dylib=lib_readline_nls"); - println!("cargo:rustc-flags=-l dylib=builtins_read"); - println!("cargo:rustc-flags=-l dylib=eval"); - println!("cargo:rustc-flags=-l dylib=lib_sh_setlinebuf"); - println!("cargo:rustc-flags=-l dylib=lib_sh_netconn"); - println!("cargo:rustc-flags=-l dylib=lib_sh_input_avail"); - println!("cargo:rustc-flags=-l dylib=lib_sh_shtty"); - println!("cargo:rustc-flags=-l dylib=lib_sh_zread"); - println!("cargo:rustc-flags=-l dylib=lib_sh_ufuncs"); - println!("cargo:rustc-flags=-l dylib=lib_sh_uconvert"); - println!("cargo:rustc-flags=-l dylib=pcomplib"); - println!("cargo:rustc-flags=-l dylib=bracecomp"); - println!("cargo:rustc-flags=-l dylib=lib_sh_spell"); - println!("cargo:rustc-flags=-l dylib=lib_sh_fnxform"); - println!("cargo:rustc-flags=-l dylib=lib_termcap_termcap"); - println!("cargo:rustc-flags=-l dylib=lib_termcap_tparam"); - println!("cargo:rustc-flags=-l dylib=builtins_bashgetopt"); - println!("cargo:rustc-flags=-l dylib=builtins_source"); - println!("cargo:rustc-flags=-l dylib=lib_sh_shmatch"); - println!("cargo:rustc-flags=-l dylib=test"); - println!("cargo:rustc-flags=-l dylib=builtins_return"); - println!("cargo:rustc-flags=-l dylib=builtins_exec"); - println!("cargo:rustc-flags=-l dylib=builtins_command"); - println!("cargo:rustc-flags=-l dylib=lib_sh_mbschr"); - println!("cargo:rustc-flags=-l dylib=expr"); - println!("cargo:rustc-flags=-l dylib=lib_sh_timeval"); - println!("cargo:rustc-flags=-l dylib=lib_sh_fpurge"); - println!("cargo:rustc-flags=-l dylib=builtins_fc"); - println!("cargo:rustc-flags=-l dylib=builtins_mapfile"); - println!("cargo:rustc-flags=-l dylib=builtins_eval"); - println!("cargo:rustc-flags=-l dylib=builtins_jobs"); - println!("cargo:rustc-flags=-l dylib=builtins_cd"); - println!("cargo:rustc-flags=-l dylib=builtins_shopt"); - println!("cargo:rustc-flags=-l dylib=builtins_echo"); - println!("cargo:rustc-flags=-l dylib=lib_glob_smatch"); - println!("cargo:rustc-flags=-l dylib=lib_sh_utf8"); - println!("cargo:rustc-flags=-l dylib=lib_readline_search"); - println!("cargo:rustc-flags=-l dylib=lib_readline_isearch"); - println!("cargo:rustc-flags=-l dylib=lib_sh_stringlist"); - println!("cargo:rustc-flags=-l dylib=builtins_complete"); - println!("cargo:rustc-flags=-l dylib=builtins_exit"); - println!("cargo:rustc-flags=-l dylib=lib_sh_tmpfile"); - println!("cargo:rustc-flags=-l dylib=lib_sh_netopen"); - println!("cargo:rustc-flags=-l dylib=lib_sh_eaccess"); - println!("cargo:rustc-flags=-l dylib=lib_readline_histsearch"); - println!("cargo:rustc-flags=-l dylib=lib_tilde_tilde"); - println!("cargo:rustc-flags=-l dylib=lib_sh_makepath"); - println!("cargo:rustc-flags=-l dylib=builtins_shift"); - println!("cargo:rustc-flags=-l dylib=lib_readline_parens"); - println!("cargo:rustc-flags=-l dylib=builtins_type"); - println!("cargo:rustc-flags=-l dylib=lib_sh_zmapfd"); - println!("cargo:rustc-flags=-l dylib=lib_sh_mailstat"); - println!("cargo:rustc-flags=-l dylib=builtins_builtins"); - println!("cargo:rustc-flags=-l dylib=builtins_kill"); - println!("cargo:rustc-flags=-l dylib=builtins_times"); - println!("cargo:rustc-flags=-l dylib=builtins_printf"); - println!("cargo:rustc-flags=-l dylib=builtins_umask"); - println!("cargo:rustc-flags=-l dylib=builtins_let"); - println!("cargo:rustc-flags=-l dylib=builtins_suspend"); - println!("cargo:rustc-flags=-l dylib=builtins_history"); - println!("cargo:rustc-flags=-l dylib=builtins_bind"); - println!("cargo:rustc-flags=-l dylib=builtins_fg_bg"); - println!("cargo:rustc-flags=-l dylib=builtins_builtin"); - println!("cargo:rustc-flags=-l dylib=builtins_alias"); - println!("cargo:rustc-flags=-l dylib=builtins_hash"); - println!("cargo:rustc-flags=-l dylib=builtins_enable"); - println!("cargo:rustc-flags=-l dylib=builtins_help"); - println!("cargo:rustc-flags=-l dylib=builtins_trap"); - println!("cargo:rustc-flags=-l dylib=builtins_caller"); - println!("cargo:rustc-flags=-l dylib=builtins_colon"); - println!("cargo:rustc-flags=-l dylib=builtins_ulimit"); - println!("cargo:rustc-flags=-l dylib=builtins_test"); - println!("cargo:rustc-flags=-l dylib=lib_sh_wcsnwidth"); - println!("cargo:rustc-flags=-l dylib=lib_readline_callback"); - println!("cargo:rustc-flags=-l dylib=lib_sh_zcatfd"); - println!("cargo:rustc-flags=-l dylib=lib_sh_zwrite"); - println!("cargo:rustc-flags=-l dylib=lib_sh_unicode"); - println!("cargo:rustc-flags=-l dylib=lib_sh_zgetline"); - println!("cargo:rustc-flags=-l dylib=lib_malloc_malloc"); - println!("cargo:rustc-flags=-l dylib=lib_sh_pathphys"); - println!("cargo:rustc-flags=-l dylib=lib_sh_fmtumax"); - - - - } diff --git a/bash-5.1/builtins_rust/jobs/src/lib.rs b/bash-5.1/builtins_rust/jobs/src/lib.rs index cc0ee93fb01c9b312eefffa6584c82ebc12519a9..87b0577b85ced085aca5ba28d40aff2462aded6d 100644 --- a/bash-5.1/builtins_rust/jobs/src/lib.rs +++ b/bash-5.1/builtins_rust/jobs/src/lib.rs @@ -397,7 +397,7 @@ extern "C" { l=(*l).next; } - let mut c_str_jobs_builtin = CString::new("jobs_builtin").unwrap(); + let c_str_jobs_builtin = CString::new("jobs_builtin").unwrap(); /* Next make a new simple command and execute it. */ begin_unwind_frame (c_str_jobs_builtin.as_ptr() as * mut c_char); @@ -433,7 +433,7 @@ pub extern "C" fn r_jobs_builtin(mut list:*mut WordList)->i32 { unsafe { reset_internal_getopt(); - let mut c_str_lpnxrs = CString::new("lpnxrs").unwrap(); // from a &str, creates a new allocation + let c_str_lpnxrs = CString::new("lpnxrs").unwrap(); // from a &str, creates a new allocation opt = internal_getopt (list, c_str_lpnxrs.as_ptr() as * mut c_char); while opt != -1 { @@ -444,7 +444,7 @@ pub extern "C" fn r_jobs_builtin(mut list:*mut WordList)->i32 { 'n'=>{form = JLIST_CHANGED_ONLY!();} 'x'=>{ if form != JLIST_STANDARD!() { - let mut c_str_err = CString::new("no other options allowed with `-x'").unwrap(); // from a &str, creates a new allocation + let c_str_err = CString::new("no other options allowed with `-x'").unwrap(); // from a &str, creates a new allocation builtin_error (c_str_err.as_ptr()); return EXECUTION_FAILURE!(); } @@ -519,7 +519,7 @@ pub extern "C" fn r_disown_builtin (list:* mut WordList)->libc::c_int { let mut pid_value:c_long=0; unsafe { reset_internal_getopt (); - let mut c_str_ahr = CString::new("ahr").unwrap(); // from a &str, creates a new allocation + let c_str_ahr = CString::new("ahr").unwrap(); // from a &str, creates a new allocation opt = internal_getopt (list, c_str_ahr.as_ptr() as * mut c_char); while opt != -1 { let opt_char:char= opt as u8 as char; @@ -551,7 +551,7 @@ pub extern "C" fn r_disown_builtin (list:* mut WordList)->libc::c_int { return EXECUTION_SUCCESS!(); } BLOCK_CHILD !(Some(&mut set), Some(&mut oset)); - if (loptend !=std::ptr::null_mut() && legal_number ((*(*loptend).word).word, &mut pid_value) !=0 && pid_value == pid_value) { + if loptend !=std::ptr::null_mut() && legal_number ((*(*loptend).word).word, &mut pid_value) !=0 && pid_value == pid_value { job=get_job_by_pid ( pid_value as i32, 0, 0 as *mut*mut PROCESS); }else { job = get_job_spec (loptend); diff --git a/bash-5.1/builtins_rust/printf/src/lib.rs b/bash-5.1/builtins_rust/printf/src/lib.rs index c6a9c6c839acd2d5a46dd5b67ba484524a4e3ca8..31c0cf5447ee09c16bde0303a652d9201e9b9e48 100644 --- a/bash-5.1/builtins_rust/printf/src/lib.rs +++ b/bash-5.1/builtins_rust/printf/src/lib.rs @@ -1,7 +1,7 @@ //# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use std::ffi::CStr; + use std::{ffi::CString}; use libc::{size_t, c_int, c_uint, c_char, c_long, c_void, PT_NULL, c_ulong, strchr, }; @@ -186,8 +186,8 @@ unsafe { if *fmt == b'\\' as c_char { fmt = (fmt as usize + 1) as *mut c_char; - let mut mbch: [libc::c_char;25] = [0; 25]; - let mut mblen: c_int = 0; + let mbch: [libc::c_char;25] = [0; 25]; + let mblen: c_int = 0; fmt = (fmt as usize + tescape(fmt, mbch.as_ptr() as *mut c_char, std::mem::transmute(&mblen), PT_NULL as *mut c_int) as usize) as *mut c_char; let mut mbind = 0; @@ -502,7 +502,7 @@ unsafe { } } b'b' => { - let mut rlen: c_int = 0; + let rlen: c_int = 0; let mut r: c_int = 0; ch = 0; let p = getstr(); @@ -999,9 +999,9 @@ unsafe fn tescape(estart: *mut c_char, cp:*mut c_char, lenp: *mut c_int, sawc: * unsafe fn bexpand(string: *mut c_char, len: c_int, sawc: *mut c_int, lenp: *mut c_int) -> *mut c_char { let mut mbch:[c_char; 25]; - let mut mblen: c_int = 0; + let mblen: c_int = 0; - let mut ret: *mut c_char; + let ret: *mut c_char; let mut r: *mut c_char; let mut s: *mut c_char; let mut c: c_char; @@ -1030,7 +1030,7 @@ unsafe fn bexpand(string: *mut c_char, len: c_int, sawc: *mut c_int, lenp: *mut continue; } - let mut temp: c_int = 0; + let temp: c_int = 0; mbch = [0; 25]; let n = tescape(s, mbch.as_mut_ptr() as *mut c_char, std::mem::transmute(&mblen), std::mem::transmute(&temp)); @@ -1154,7 +1154,7 @@ unsafe fn getintmax() -> c_long return asciicode(); } - let mut ep: *mut c_char = PT_NULL as *mut c_char; + let ep: *mut c_char = PT_NULL as *mut c_char; *libc::__errno_location() = 0; let ret = libc::strtol((*(*garglist).word).word, std::mem::transmute(&ep), 0); if *ep != 0 { @@ -1179,7 +1179,7 @@ unsafe fn getuintmax() -> c_ulong } *libc::__errno_location() = 0; - let mut ep: *mut c_char = PT_NULL as *mut c_char; + let ep: *mut c_char = PT_NULL as *mut c_char; let ret = libc::strtoul((*(*garglist).word).word, std::mem::transmute(&ep), 0); if *ep != 0 { sh_invalidnum((*(*garglist).word).word); diff --git a/bash-5.1/builtins_rust/pushd/src/lib.rs b/bash-5.1/builtins_rust/pushd/src/lib.rs index f3caec293bdd52f869f371dedb22c881731250f6..48cd8d5dc14c08165a5d4eab0299b55fb8bef8e8 100644 --- a/bash-5.1/builtins_rust/pushd/src/lib.rs +++ b/bash-5.1/builtins_rust/pushd/src/lib.rs @@ -1,123 +1,149 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -extern crate libc; +extern crate libc; extern crate nix; -use libc::{c_char, c_long, c_void}; -use std::{ffi::{CString,CStr}}; +use libc::{c_char, c_void}; +use std::ffi::CString; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN,r_builtin_usage, r_savestring}; +use rcommon::{r_savestring, WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; #[repr(u8)] -enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, - cm_connection, cm_function_def, cm_until, cm_group, - cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc +enum command_type { + cm_for, + cm_case, + cm_while, + cm_if, + cm_simple, + cm_select, + cm_connection, + cm_function_def, + cm_until, + cm_group, + cm_arith, + cm_cond, + cm_arith_for, + cm_subshell, + cm_coproc, } #[repr(u8)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] enum r_instruction { - r_output_direction, r_input_direction, r_inputa_direction, - r_appending_to, r_reading_until, r_reading_string, - r_duplicating_input, r_duplicating_output, r_deblank_reading_until, - r_close_this, r_err_and_out, r_input_output, r_output_force, - r_duplicating_input_word, r_duplicating_output_word, - r_move_input, r_move_output, r_move_input_word, r_move_output_word, - r_append_err_and_out + r_output_direction, + r_input_direction, + r_inputa_direction, + r_appending_to, + r_reading_until, + r_reading_string, + r_duplicating_input, + r_duplicating_output, + r_deblank_reading_until, + r_close_this, + r_err_and_out, + r_input_output, + r_output_force, + r_duplicating_input_word, + r_duplicating_output_word, + r_move_input, + r_move_output, + r_move_input_word, + r_move_output_word, + r_append_err_and_out, } #[repr(C)] pub union REDIRECT { - next:*mut REDIRECT, - redirector:libc::c_int, - rflags:libc::c_int, - flags:libc::c_int, - instruction:r_instruction, - redirectee:libc::c_int, - here_doc_eof:*mut c_char + next: *mut REDIRECT, + redirector: libc::c_int, + rflags: libc::c_int, + flags: libc::c_int, + instruction: r_instruction, + redirectee: libc::c_int, + here_doc_eof: *mut c_char, } /* FOR command. */ #[repr(C)] pub struct for_com { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct PATTERN_LIST { - next:* mut PATTERN_LIST, - patterns:* mut WordList, - action:*mut COMMAND, - flags:libc::c_int + next: *mut PATTERN_LIST, + patterns: *mut WordList, + action: *mut COMMAND, + flags: libc::c_int, } #[repr(C)] pub struct case_com { - flags:libc::c_int, - line:libc::c_int, - word:*mut WordDesc, - clauses:*mut PATTERN_LIST + flags: libc::c_int, + line: libc::c_int, + word: *mut WordDesc, + clauses: *mut PATTERN_LIST, } #[repr(C)] pub struct while_com { - flags:libc::c_int, - test:*mut COMMAND, - action:*mut COMMAND + flags: libc::c_int, + test: *mut COMMAND, + action: *mut COMMAND, } #[repr(C)] pub struct if_com { - flags:libc::c_int, - test:*mut COMMAND, - true_case:*mut COMMAND, - false_case:*mut COMMAND + flags: libc::c_int, + test: *mut COMMAND, + true_case: *mut COMMAND, + false_case: *mut COMMAND, } #[repr(C)] pub struct connection { - ignore:libc::c_int, - first:*mut COMMAND, - second:*mut COMMAND, - connector:libc::c_int + ignore: libc::c_int, + first: *mut COMMAND, + second: *mut COMMAND, + connector: libc::c_int, } #[repr(C)] pub struct simple_com { - flags:libc::c_int, - line:libc::c_int, - words:*mut WordList, - redirects:*mut REDIRECT + flags: libc::c_int, + line: libc::c_int, + words: *mut WordList, + redirects: *mut REDIRECT, } #[repr(C)] pub struct function_def { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - command:*mut COMMAND, - source_file:*mut c_char + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + command: *mut COMMAND, + source_file: *mut c_char, } #[repr(C)] pub struct group_com { - ignore:libc::c_int, - command:*mut COMMAND, - source_file:*mut c_char + ignore: libc::c_int, + command: *mut COMMAND, + source_file: *mut c_char, } #[repr(C)] pub struct select_com { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] @@ -186,33 +212,32 @@ pub struct COMMAND { value:VALUE_COMMAND } - #[macro_export] macro_rules! NOCD { - () => { - 0x01 - } + () => { + 0x01 + }; } #[macro_export] macro_rules! ROTATE { - () => { - 0x02 - } + () => { + 0x02 + }; } #[macro_export] macro_rules! LONGFORM { - () => { - 0x04 - } + () => { + 0x04 + }; } #[macro_export] macro_rules! CLEARSTAK { - () => { - 0x08 - } + () => { + 0x08 + }; } extern "C" { @@ -469,7 +494,7 @@ while list != std::ptr::null_mut() { direction = *((*((*list).word)).word); if direction == '+' as c_char || direction == '-' as c_char { - if legal_number ((((*((*list).word)).word as usize + 1) as * mut c_char), & mut which) == 0 { + if legal_number (((*((*list).word)).word as usize + 1) as * mut c_char, & mut which) == 0 { sh_invalidnum ((*((*list).word)).word); builtin_usage (); return EX_USAGE; @@ -850,7 +875,7 @@ pub extern "C" fn r_get_dirstack_from_string (strt:* mut c_char)-> * mut c_char #[no_mangle] pub extern "C" fn r_get_dirstack_element (ind:libc::c_long, sign:i32)-> * mut c_char { - let mut i:i32; + let i:i32; unsafe { i = r_get_dirstack_index (ind, sign, std::ptr::null_mut()); if i < 0 || i > directory_list_offset { diff --git a/bash-5.1/builtins_rust/pushed/Cargo.toml b/bash-5.1/builtins_rust/pushed/Cargo.toml new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/bash-5.1/builtins_rust/pushed/src/lib.rs b/bash-5.1/builtins_rust/pushed/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/bash-5.1/builtins_rust/read/src/intercdep.rs b/bash-5.1/builtins_rust/read/src/intercdep.rs index fd31529edbd535251e76bc403beac2411662e34e..7f9cbcd69193899db870730890b9ad6df4319ced 100644 --- a/bash-5.1/builtins_rust/read/src/intercdep.rs +++ b/bash-5.1/builtins_rust/read/src/intercdep.rs @@ -1,7 +1,7 @@ //# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use rcommon::{r_builtin_usage,r_sh_invalidid,r_builtin_bind_variable,WordList,WordDesc}; +use rcommon::{r_builtin_usage,r_sh_invalidid,r_builtin_bind_variable,WordList}; pub type SHELL_VAR = rcommon::SHELL_VAR; use rhelp::r_builtin_help; pub type __intmax_t = c_long; diff --git a/bash-5.1/builtins_rust/read/src/lib.rs b/bash-5.1/builtins_rust/read/src/lib.rs index 627d34a2debca4da5322942a3c729d0a6ef2c0d8..3b9142e963890e904b5b7aad0207d287fe7128c5 100644 --- a/bash-5.1/builtins_rust/read/src/lib.rs +++ b/bash-5.1/builtins_rust/read/src/lib.rs @@ -1,826 +1,901 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use libc::{c_int, c_char, c_long, c_ulong, c_uint, size_t, c_void, PT_NULL, ssize_t}; +use libc::{c_char, c_int, c_long, c_uint, c_ulong, c_void, size_t, ssize_t, PT_NULL}; use nix::errno::errno; -use std::{ffi::{CString, CStr}, ptr::null_mut,}; -//use rcommon::{r_builtin_usage,r_sh_invalidid,r_builtin_bind_variable,SHELL_VAR}; +use std::{ + ffi::{CStr, CString}, + ptr::null_mut, +}; include!(concat!("intercdep.rs")); #[no_mangle] -pub static mut alrmbuf:sigjmp_buf = [__jmp_buf_tag{ - __jmpbuf:[0;8], - __mask_was_saved:0, - __saved_mask:__sigset_t{__val:[0;16]}, -};1]; +pub static mut alrmbuf: sigjmp_buf = [__jmp_buf_tag { + __jmpbuf: [0; 8], + __mask_was_saved: 0, + __saved_mask: __sigset_t { __val: [0; 16] }, +}; 1]; -static mut old_alrm : *mut SigHandler = PT_NULL as *mut SigHandler; +static mut old_alrm: *mut SigHandler = PT_NULL as *mut SigHandler; -// static mut sigalrm_seen : c_int = 0; -static mut reading : c_int = 0; -static mut tty_modified : c_int = 0; +static mut reading: c_int = 0; +static mut tty_modified: c_int = 0; -static mut delim : c_char= b'\n' as c_char; +static mut delim: c_char = b'\n' as c_char; #[derive(Clone, Copy)] pub struct tty_save { fd: i32, attrs: libc::termios, } -// static mut termsave : Option = None; -static mut termsave:tty_save = tty_save{ - fd:0, - attrs:libc::termios { - c_iflag: (0), - c_oflag: (0), - c_cflag: (0), - c_lflag: (0), - c_line: (0), - c_cc: [0;32], - c_ispeed: (0), - c_ospeed: (0) - } +static mut termsave: tty_save = tty_save { + fd: 0, + attrs: libc::termios { + c_iflag: (0), + c_oflag: (0), + c_cflag: (0), + c_lflag: (0), + c_line: (0), + c_cc: [0; 32], + c_ispeed: (0), + c_ospeed: (0), + }, }; -static mut interactive : c_int = 0; -static mut default_buffered_input : c_int = -1; - +static mut interactive: c_int = 0; +static mut default_buffered_input: c_int = -1; #[no_mangle] pub extern "C" fn r_read_builtin(mut list: *mut WordList) -> i32 { - - let mut varname :*mut c_char = libc::PT_NULL as *mut c_char; - let mut size : c_int = 0; - let mut nr : c_int = 0; - let mut pass_next : c_int = 0; - let mut saw_escape : c_int = 0; - let mut eof : c_int; - let mut opt : c_int; - let mut retval : c_int; - let mut code : c_int; - let mut print_ps2 : c_int; - let mut nflag : c_int = 0; - - let mut i : c_int = 0; - - let mut input_is_tty : c_int = 0; - let mut input_is_pipe : c_int = 0; - let mut unbuffered_read : c_int = 0; - let mut skip_ctlesc : c_int; - let mut skip_ctlnul : c_int; - - let mut raw : c_int = 0; - let mut edit : c_int = 0; - let mut nchars : c_int = 0; - let mut silent : c_int = 0; - let mut have_timeout : c_int = 0; - let mut ignore_delim : c_int = 0; - let mut fd : c_int = 0; - - let mut lastsig : c_int = 0; - let mut t_errno : c_int; - - let mut mb_cur_max : c_int; - - let mut tmsec : c_uint = 0; - let mut tmusec : c_uint = 0; - - let mut ival : c_long = 0; - let mut uval : c_long = 0; - let mut intval : c_long = 0; - - let mut c : c_char = 0; - - let mut input_string : *mut c_char; - let mut orig_input_string : *mut c_char; + let mut varname: *mut c_char = libc::PT_NULL as *mut c_char; + let mut size: c_int = 0; + let mut nr: c_int = 0; + let mut pass_next: c_int = 0; + let mut saw_escape: c_int = 0; + let mut eof: c_int; + let mut opt: c_int; + let mut retval: c_int; + let mut code: c_int; + let mut print_ps2: c_int; + let mut nflag: c_int = 0; + + let mut i: c_int = 0; + + let mut input_is_tty: c_int = 0; + let mut input_is_pipe: c_int = 0; + let mut unbuffered_read: c_int = 0; + let mut skip_ctlesc: c_int; + let mut skip_ctlnul: c_int; + + let mut raw: c_int = 0; + let mut edit: c_int = 0; + let mut nchars: c_int = 0; + let mut silent: c_int = 0; + let mut have_timeout: c_int = 0; + let mut ignore_delim: c_int = 0; + let mut fd: c_int = 0; + + let mut lastsig: c_int = 0; + let t_errno: c_int; + + let mut _mb_cur_max: c_int; + + let mut tmsec: c_uint = 0; + let mut tmusec: c_uint = 0; + + let mut ival: c_long = 0; + let mut uval: c_long = 0; + let mut intval: c_long = 0; + + let mut c: c_char = 0; + + let mut input_string: *mut c_char; + let mut orig_input_string: *mut c_char; let ifs_chars_null = CString::new("").unwrap(); - let mut ifs_chars : *mut c_char; - let mut prompt : *mut c_char = PT_NULL as *mut c_char; - let mut arrayname : *mut c_char = PT_NULL as *mut c_char; + let mut ifs_chars: *mut c_char; + let mut prompt: *mut c_char = PT_NULL as *mut c_char; + let mut arrayname: *mut c_char = PT_NULL as *mut c_char; - let mut e : *mut c_char; - let t : *mut c_char; - let t1 : *mut c_char; - let mut ps2 : *mut c_char; - let mut tofree : *mut c_char; + let mut e: *mut c_char; + let t: *mut c_char; + let t1: *mut c_char; + let mut ps2: *mut c_char; + let mut tofree: *mut c_char; - let mut tsb : libc::stat; + let mut tsb: libc::stat; - let mut var : *mut SHELL_VAR = PT_NULL as *mut SHELL_VAR; + let mut var: *mut SHELL_VAR = PT_NULL as *mut SHELL_VAR; - let mut ttattrs : libc::termios; - let mut ttset : libc::termios; + let mut ttattrs: libc::termios; + let mut ttset: libc::termios; unsafe { ttattrs = std::mem::zeroed(); ttset = std::mem::zeroed(); } - let mut alist : *mut WordList; - - let mut vflags : c_int; - let mut rlbuf : *mut c_char = null_mut(); - let mut itext : *mut c_char = null_mut(); - - let mut rlind : c_int = 0; + let alist: *mut WordList; + let vflags: c_int; + let mut rlbuf: *mut c_char = null_mut(); + let mut itext: *mut c_char = null_mut(); - let mut save_instream : *mut libc::FILE; + let mut rlind: c_int = 0; - let mut mb_cur_max : c_int = 1; + let mut save_instream: *mut libc::FILE; -unsafe { + let mut mb_cur_max: c_int = 1; - // if termsave.is_none() { - // let tmp: tty_save = std::mem::zeroed(); - // termsave = Some(tmp); - // } - // ptermsave = std::mem::transmute(&termsave.unwrap()); - - reset_internal_getopt(); - let opt_str = CString::new("ersa:d:i:n:p:t:u:N:").unwrap(); - opt = internal_getopt (list, opt_str.as_ptr() as * mut c_char); - while opt != -1 { - let opt_char:char=char::from(opt as u8); - match opt_char { - 'r' => raw = 1, - 'p' => prompt = list_optarg, - 's' => silent = 1, - 'e' => edit = 1, - 'i' => itext = list_optarg, - 'a' => arrayname = list_optarg, - 't' => { - code = uconvert(list_optarg, &mut ival, &mut uval, PT_NULL as *mut *mut c_char); - if code == 0 || ival < 0 || uval < 0 { - let c_err = CString::new("%s: invalid timeout specification").unwrap(); - builtin_error( c_err.as_ptr(), list_optarg); - return EXECUTION_FAILURE; - } else { - have_timeout = 1; - tmsec = ival as c_uint; - tmusec = uval as c_uint; - } - } - 'N' | 'n' => { - if opt_char == 'N' { - ignore_delim = 1; - delim = 255 as u8 as libc::c_char; - } - nflag = 1; - code = legal_number(list_optarg, &mut intval); - if code == 0 || intval < 0 || intval != (intval as c_int) as c_long { - sh_invalidnum(list_optarg); - return EXECUTION_FAILURE; - } else { - nchars = intval as c_int; + unsafe { + reset_internal_getopt(); + let opt_str = CString::new("ersa:d:i:n:p:t:u:N:").unwrap(); + opt = internal_getopt(list, opt_str.as_ptr() as *mut c_char); + while opt != -1 { + let opt_char: char = char::from(opt as u8); + match opt_char { + 'r' => raw = 1, + 'p' => prompt = list_optarg, + 's' => silent = 1, + 'e' => edit = 1, + 'i' => itext = list_optarg, + 'a' => arrayname = list_optarg, + 't' => { + code = uconvert( + list_optarg, + &mut ival, + &mut uval, + PT_NULL as *mut *mut c_char, + ); + if code == 0 || ival < 0 || uval < 0 { + let c_err = CString::new("%s: invalid timeout specification").unwrap(); + builtin_error(c_err.as_ptr(), list_optarg); + return EXECUTION_FAILURE; + } else { + have_timeout = 1; + tmsec = ival as c_uint; + tmusec = uval as c_uint; + } } - } - 'u' => { - code = legal_number(list_optarg, &mut intval); - if code == 0 || intval < 0 || intval != (intval as c_int) as c_long { - let c_err = CString::new("%s: invalid file descriptor specification").unwrap(); - builtin_error(c_err.as_ptr(), list_optarg); - return EXECUTION_FAILURE; - } else { - fd = intval as c_int; + 'N' | 'n' => { + if opt_char == 'N' { + ignore_delim = 1; + delim = 255 as u8 as libc::c_char; + } + nflag = 1; + code = legal_number(list_optarg, &mut intval); + if code == 0 || intval < 0 || intval != (intval as c_int) as c_long { + sh_invalidnum(list_optarg); + return EXECUTION_FAILURE; + } else { + nchars = intval as c_int; + } } - if sh_validfd(fd) == 0 { - let c_err = CString::new("%d: invalid file descriptor: %s").unwrap(); - builtin_error(c_err.as_ptr(), fd, libc::strerror(nix::errno::errno())); - return EXECUTION_FAILURE; + 'u' => { + code = legal_number(list_optarg, &mut intval); + if code == 0 || intval < 0 || intval != (intval as c_int) as c_long { + let c_err = + CString::new("%s: invalid file descriptor specification").unwrap(); + builtin_error(c_err.as_ptr(), list_optarg); + return EXECUTION_FAILURE; + } else { + fd = intval as c_int; + } + if sh_validfd(fd) == 0 { + let c_err = CString::new("%d: invalid file descriptor: %s").unwrap(); + builtin_error(c_err.as_ptr(), fd, libc::strerror(nix::errno::errno())); + return EXECUTION_FAILURE; + } } - } - 'd' => { + 'd' => { delim = *list_optarg; } - - _ => { - if opt == -99 { - r_builtin_help(); + + _ => { + if opt == -99 { + r_builtin_help(); + return EX_USAGE; + } + r_builtin_usage(); return EX_USAGE; } - r_builtin_usage (); - return EX_USAGE; } + opt = internal_getopt(list, opt_str.as_ptr() as *mut c_char); } - opt = internal_getopt (list, opt_str.as_ptr() as * mut c_char); - } - list = loptend; + list = loptend; - //-t - if have_timeout != 0 && tmsec == 0 && tmusec == 0 { - return if input_avail(fd) != 0 {EXECUTION_SUCCESS} else {EXECUTION_FAILURE}; - } + //-t + if have_timeout != 0 && tmsec == 0 && tmusec == 0 { + return if input_avail(fd) != 0 { + EXECUTION_SUCCESS + } else { + EXECUTION_FAILURE + }; + } - vflags = if assoc_expand_once != 0 {(VA_NOEXPAND | VA_ONEWORD) as c_int} else {0}; - if !list.is_null() && - legal_identifier((*(*list).word).word) == 0 && - valid_array_reference((*(*list).word).word, vflags) == 0 { + vflags = if assoc_expand_once != 0 { + (VA_NOEXPAND | VA_ONEWORD) as c_int + } else { + 0 + }; + if !list.is_null() + && legal_identifier((*(*list).word).word) == 0 + && valid_array_reference((*(*list).word).word, vflags) == 0 + { // sh_invalidid((*(*list).word).word); r_sh_invalidid((*(*list).word).word); return EXECUTION_FAILURE; - } - - //忽略界定符 - if ignore_delim != 0{ //-N ignore_delim = 1 - delim = 255 as u8 as libc::c_char; - } - - ifs_chars = getifs(); //ifs_chars is "\n" - if ifs_chars.is_null() { - ifs_chars = ifs_chars_null.as_ptr() as *mut c_char; - } - - if ignore_delim != 0 { - ifs_chars = ifs_chars_null.as_ptr() as *mut c_char; - } - - skip_ctlesc = 0; - skip_ctlnul = 0; - e = ifs_chars; - - loop { - if *e == 0 { - break; } - skip_ctlesc |= (*e == 1) as c_int; - skip_ctlnul |= (*e == 117) as c_int; - e = ((e as usize) + 1) as *mut c_char; - } - - input_string = xmalloc(112) as *mut c_char; - *input_string = b'\0' as c_char; -'out_assig_vars: loop { - if nflag == 1 && nchars == 0 { - let mut gc : c_int = 0; - retval = libc::read(fd, &mut gc as *mut i32 as *mut c_void, 0) as c_int; - retval = if retval >= 0 {EXECUTION_SUCCESS} else {EXECUTION_FAILURE}; - - break 'out_assig_vars; - } + //忽略界定符 + if ignore_delim != 0 { + //-N ignore_delim = 1 + delim = 255 as u8 as libc::c_char; + } - //设置TMOUT后,TMOUT是默认读取时间 - let str_val = CString::new("TMOUT").unwrap(); - e = get_string_value(str_val.as_ptr()); - if have_timeout == 0 && !e.is_null() { - code = uconvert(e, &mut ival, &mut uval, 0 as *mut *mut c_char); - if code == 0 || ival < 0 || uval < 0 { - tmsec = 0; - tmusec = 0; - } else { - tmsec = ival as c_uint; - tmusec = uval as c_uint; + ifs_chars = getifs(); //ifs_chars is "\n" + if ifs_chars.is_null() { + ifs_chars = ifs_chars_null.as_ptr() as *mut c_char; } - } - let frame_name = CString::new("r_read_builtin").unwrap(); //有没有可能是r_read_builtin? - begin_unwind_frame(frame_name.as_ptr() as *mut c_char); + if ignore_delim != 0 { + ifs_chars = ifs_chars_null.as_ptr() as *mut c_char; + } - - if interactive == 0 && default_buffered_input >= 0 && fd_is_bash_input(fd) != 0 { - sync_buffered_stream(default_buffered_input); - } + skip_ctlesc = 0; + skip_ctlnul = 0; + e = ifs_chars; - input_is_tty = libc::isatty(fd); - if input_is_tty == 0 { - input_is_pipe = (libc::lseek(fd, 0, libc::SEEK_CUR) < 0 && (errno() == libc::ESPIPE)) as c_int; - } - - //如果设置 -p,-e,-s但输入不是终端,忽略 - if (!prompt.is_null() || edit != 0 || silent != 0) && input_is_tty == 0 { - itext = PT_NULL as *mut c_char; - edit = 0; - silent = 0; - } + loop { + if *e == 0 { + break; + } + skip_ctlesc |= (*e == 1) as c_int; + skip_ctlnul |= (*e == 117) as c_int; + e = ((e as usize) + 1) as *mut c_char; + } - if edit != 0 { - add_unwind_protect(xfree as *mut c_void, rlbuf); - } + input_string = xmalloc(112) as *mut c_char; + *input_string = b'\0' as c_char; - tsb = std::mem::zeroed(); - if tmsec > 0 || tmusec > 0 { - if (libc::fstat(fd, &mut tsb as *mut libc::stat) < 0) || - ((tsb.st_mode & __S_IFMT) == __S_IFREG) { - tmsec = 0; - tmusec = 0; - } - } + 'out_assig_vars: loop { + if nflag == 1 && nchars == 0 { + let mut gc: c_int = 0; + retval = libc::read(fd, &mut gc as *mut i32 as *mut c_void, 0) as c_int; + retval = if retval >= 0 { + EXECUTION_SUCCESS + } else { + EXECUTION_FAILURE + }; - if tmsec > 0 || tmusec > 0 { - code = __sigsetjmp(&mut alrmbuf as *mut __jmp_buf_tag, 0); - if code != 0 { - sigalrm_seen = 0; - orig_input_string = PT_NULL as *mut c_char; - *input_string.offset(i as isize) = b'\0' as c_char; - if i == 0 { - t = libc::malloc(1) as *mut c_char; - *t = b'\0' as c_char; - } else { - t = libc::strcpy( xmalloc( - (libc::strlen(input_string) + 1) as size_t) as *mut c_char, input_string); + break 'out_assig_vars; } - run_unwind_frame(frame_name.as_ptr() as *mut c_char); - input_string = t; - retval = 128 + libc::SIGALRM; - break 'out_assig_vars; - } - - if interactive_shell == 0 { - initialize_terminating_signals(); - } - old_alrm = set_signal_handler(libc::SIGALRM, sigalrm as *mut SigHandler); - add_unwind_protect(reset_alarm as *mut c_void, PT_NULL as *mut c_char); + //设置TMOUT后,TMOUT是默认读取时间 + let str_val = CString::new("TMOUT").unwrap(); + e = get_string_value(str_val.as_ptr()); + if have_timeout == 0 && !e.is_null() { + code = uconvert(e, &mut ival, &mut uval, 0 as *mut *mut c_char); + if code == 0 || ival < 0 || uval < 0 { + tmsec = 0; + tmusec = 0; + } else { + tmsec = ival as c_uint; + tmusec = uval as c_uint; + } + } - if edit != 0 { - add_unwind_protect(reset_attempted_completion_function as *mut c_void, - PT_NULL as *mut c_char); - add_unwind_protect(bashline_reset_event_hook as *mut c_void, - PT_NULL as *mut c_char); - } - falarm(tmsec, tmusec); - } + let frame_name = CString::new("r_read_builtin").unwrap(); //有没有可能是r_read_builtin? + begin_unwind_frame(frame_name.as_ptr() as *mut c_char); - if nchars > 0 || delim != b'\n' as c_char { //-d -n - if edit != 0 { - if nchars > 0 { - unwind_protect_mem(&mut rl_num_chars_to_read as *mut c_int, std::mem::size_of_val(&rl_num_chars_to_read) as c_int); - rl_num_chars_to_read = nchars; + if interactive == 0 && default_buffered_input >= 0 && fd_is_bash_input(fd) != 0 { + sync_buffered_stream(default_buffered_input); } - if delim != b'\n' as c_char { - set_eol_delim(delim as c_int); - add_unwind_protect(reset_eol_delim as *mut c_void, PT_NULL as *mut c_char); + input_is_tty = libc::isatty(fd); + if input_is_tty == 0 { + input_is_pipe = + (libc::lseek(fd, 0, libc::SEEK_CUR) < 0 && (errno() == libc::ESPIPE)) as c_int; } - } else if input_is_tty != 0 { //-d -n - // termsave.unwrap().fd = fd; - termsave.fd = fd; - ttgetattr(fd, &mut ttattrs as *mut libc::termios); - // termsave.unwrap().attrs = ttattrs; - termsave.attrs = ttattrs; - - ttset = ttattrs; - if silent != 0 { - i = ttfd_cbreak(fd, std::mem::transmute(&ttset)); - } else { - i = ttfd_onechar(fd, std::mem::transmute(&ttset)); + + //如果设置 -p,-e,-s但输入不是终端,忽略 + if (!prompt.is_null() || edit != 0 || silent != 0) && input_is_tty == 0 { + itext = PT_NULL as *mut c_char; + edit = 0; + silent = 0; } - if i < 0 { - sh_ttyerror(1); + if edit != 0 { + add_unwind_protect(xfree as *mut c_void, rlbuf); } - tty_modified = 1; - // add_unwind_protect(ttyrestore as *mut c_void, ptermsave); - add_unwind_protect(ttyrestore as *mut c_void, &mut termsave); - if interactive_shell == 0 { - initialize_terminating_signals(); + + tsb = std::mem::zeroed(); + if tmsec > 0 || tmusec > 0 { + if (libc::fstat(fd, &mut tsb as *mut libc::stat) < 0) + || ((tsb.st_mode & __S_IFMT) == __S_IFREG) + { + tmsec = 0; + tmusec = 0; + } } - } - } else if silent != 0 { //-s - // termsave.unwrap().fd = fd; - termsave.fd = fd; - ttgetattr(fd, &mut ttattrs as *mut libc::termios); - // termsave.unwrap().attrs = ttattrs; - termsave.attrs = ttattrs; - - ttset = ttattrs; - i = ttfd_noecho(fd, std::mem::transmute(&ttset)); - if i < 0 { - sh_ttyerror(1); - } + if tmsec > 0 || tmusec > 0 { + code = __sigsetjmp(&mut alrmbuf as *mut __jmp_buf_tag, 0); + if code != 0 { + sigalrm_seen = 0; + orig_input_string = PT_NULL as *mut c_char; + *input_string.offset(i as isize) = b'\0' as c_char; + if i == 0 { + t = libc::malloc(1) as *mut c_char; + *t = b'\0' as c_char; + } else { + t = libc::strcpy( + xmalloc((libc::strlen(input_string) + 1) as size_t) as *mut c_char, + input_string, + ); + } + run_unwind_frame(frame_name.as_ptr() as *mut c_char); + input_string = t; + retval = 128 + libc::SIGALRM; + break 'out_assig_vars; + } - tty_modified = 1; - // add_unwind_protect(ttyrestore as *mut c_void, ptermsave); - add_unwind_protect(ttyrestore as *mut c_void, &mut termsave ); - if interactive_shell == 0 { - initialize_terminating_signals(); - } - } + if interactive_shell == 0 { + initialize_terminating_signals(); + } - save_instream = std::mem::zeroed(); - if edit != 0 && fd != 0 { + old_alrm = set_signal_handler(libc::SIGALRM, sigalrm as *mut SigHandler); + add_unwind_protect(reset_alarm as *mut c_void, PT_NULL as *mut c_char); + + if edit != 0 { + add_unwind_protect( + reset_attempted_completion_function as *mut c_void, + PT_NULL as *mut c_char, + ); + add_unwind_protect( + bashline_reset_event_hook as *mut c_void, + PT_NULL as *mut c_char, + ); + } + falarm(tmsec, tmusec); + } - if bash_readline_initialized == 0 { - initialize_readline(); - } + if nchars > 0 || delim != b'\n' as c_char { + //-d -n + if edit != 0 { + if nchars > 0 { + unwind_protect_mem( + &mut rl_num_chars_to_read as *mut c_int, + std::mem::size_of_val(&rl_num_chars_to_read) as c_int, + ); + rl_num_chars_to_read = nchars; + } - unwind_protect_mem(std::mem::transmute(rl_instream), std::mem::size_of_val(&rl_instream) as c_int); - save_instream = rl_instream; - rl_instream = libc::fdopen(fd, "r".as_ptr() as *const c_char); + if delim != b'\n' as c_char { + set_eol_delim(delim as c_int); + add_unwind_protect(reset_eol_delim as *mut c_void, PT_NULL as *mut c_char); + } + } else if input_is_tty != 0 { + //-d -n + termsave.fd = fd; + ttgetattr(fd, &mut ttattrs as *mut libc::termios); + termsave.attrs = ttattrs; + + ttset = ttattrs; + if silent != 0 { + i = ttfd_cbreak(fd, std::mem::transmute(&ttset)); + } else { + i = ttfd_onechar(fd, std::mem::transmute(&ttset)); + } - } + if i < 0 { + sh_ttyerror(1); + } + tty_modified = 1; + // add_unwind_protect(ttyrestore as *mut c_void, ptermsave); + add_unwind_protect(ttyrestore as *mut c_void, &mut termsave); + if interactive_shell == 0 { + initialize_terminating_signals(); + } + } + } else if silent != 0 { + //-s + // termsave.unwrap().fd = fd; + termsave.fd = fd; + ttgetattr(fd, &mut ttattrs as *mut libc::termios); + // termsave.unwrap().attrs = ttattrs; + termsave.attrs = ttattrs; + + ttset = ttattrs; + i = ttfd_noecho(fd, std::mem::transmute(&ttset)); + if i < 0 { + sh_ttyerror(1); + } - add_unwind_protect(xfree as *mut c_void, input_string); - check_alrm(); - if nchars > 0 && input_is_tty == 0 && ignore_delim != 0 { - unbuffered_read = 2; - } else if nchars > 0 || delim != b'\n' as c_char || input_is_pipe != 0 { - unbuffered_read = 1; - } + tty_modified = 1; + add_unwind_protect(ttyrestore as *mut c_void, &mut termsave); + if interactive_shell == 0 { + initialize_terminating_signals(); + } + } - if !prompt.is_null() && edit == 0 { //-p no -e - // eprintln!("{}", CStr::from_ptr(prompt).to_str().unwrap()); - eprint!("{}", CStr::from_ptr(prompt).to_str().unwrap()); + save_instream = std::mem::zeroed(); + if edit != 0 && fd != 0 { + if bash_readline_initialized == 0 { + initialize_readline(); + } - } + unwind_protect_mem( + std::mem::transmute(rl_instream), + std::mem::size_of_val(&rl_instream) as c_int, + ); + save_instream = rl_instream; + rl_instream = libc::fdopen(fd, "r".as_ptr() as *const c_char); + } - ps2 = PT_NULL as *mut c_char; - print_ps2 = 0; - eof = 0; - retval = 0; - 'get_input_string: loop { - if sigalrm_seen != 0 { - siglongjmp (std::mem::transmute(&alrmbuf), 1); - } + add_unwind_protect(xfree as *mut c_void, input_string); + check_alrm(); + if nchars > 0 && input_is_tty == 0 && ignore_delim != 0 { + unbuffered_read = 2; + } else if nchars > 0 || delim != b'\n' as c_char || input_is_pipe != 0 { + unbuffered_read = 1; + } - if edit != 0 { //没有设置-e edit等于0 - if !rlbuf.is_null() && - *((rlbuf as usize + rlind as usize) as *mut c_char) == 0 && - delim != 0 { - libc::free(rlbuf as *mut c_void); - rlbuf = PT_NULL as *mut c_char; + if !prompt.is_null() && edit == 0 { + //-p no -e + // eprintln!("{}", CStr::from_ptr(prompt).to_str().unwrap()); + eprint!("{}", CStr::from_ptr(prompt).to_str().unwrap()); } - if rlbuf.is_null() { - reading = 1; - rlbuf = if prompt.is_null() { - // edit_line("".as_ptr() as *mut c_char, itext)} + + ps2 = PT_NULL as *mut c_char; + print_ps2 = 0; + eof = 0; + retval = 0; + 'get_input_string: loop { + if sigalrm_seen != 0 { + siglongjmp(std::mem::transmute(&alrmbuf), 1); + } + + if edit != 0 { + //没有设置-e edit等于0 + if !rlbuf.is_null() + && *((rlbuf as usize + rlind as usize) as *mut c_char) == 0 + && delim != 0 + { + libc::free(rlbuf as *mut c_void); + rlbuf = PT_NULL as *mut c_char; + } + if rlbuf.is_null() { + reading = 1; + rlbuf = if prompt.is_null() { + // edit_line("".as_ptr() as *mut c_char, itext)} // let c_str = b'\0'; // b'\0'代表的是空字符串,和String::from("")不是同一个东西。 - edit_line(b'\0' as *mut c_char,itext) // b'\0'代表的是空字符串,和String::from("")不是同一个东西。 - } - else { + edit_line(b'\0' as *mut c_char, itext) // b'\0'代表的是空字符串,和String::from("")不是同一个东西。 + } else { edit_line(prompt, itext) }; - reading = 0; - rlind = 0; - } - if rlbuf.is_null() { - eof = 1; - break 'get_input_string; - } - c = *((rlbuf as usize + rlind as usize) as *mut c_char); - rlind += 1; - } else { - if print_ps2 != 0 { - if ps2.is_null() { - ps2 = get_string_value("PS2".as_ptr() as *const c_char); - } - eprintln!("{}", CStr::from_ptr(prompt).to_str().unwrap()); - print_ps2 = 0; - } + reading = 0; + rlind = 0; + } + if rlbuf.is_null() { + eof = 1; + break 'get_input_string; + } + c = *((rlbuf as usize + rlind as usize) as *mut c_char); + rlind += 1; + } else { + if print_ps2 != 0 { + if ps2.is_null() { + ps2 = get_string_value("PS2".as_ptr() as *const c_char); + } + eprintln!("{}", CStr::from_ptr(prompt).to_str().unwrap()); + print_ps2 = 0; + } - reading = 1; - check_alrm(); - *(libc::__errno_location()) = 0; - if unbuffered_read == 2 { - retval = if posixly_correct != 0 { + reading = 1; + check_alrm(); + *(libc::__errno_location()) = 0; + if unbuffered_read == 2 { + retval = if posixly_correct != 0 { zreadintr(fd, &mut c as *mut c_char, 1) as c_int - } - else { + } else { zreadn(fd, &mut c as *mut c_char, (nchars - nr) as usize) as c_int }; - } else if unbuffered_read != 0 { - retval = if posixly_correct != 0 { - zreadintr(fd, &mut c as *mut c_char, 1) as c_int} - else { - zread(fd, &mut c as *mut c_char, 1) as c_int}; - } - else { - retval = if posixly_correct != 0 { + } else if unbuffered_read != 0 { + retval = if posixly_correct != 0 { + zreadintr(fd, &mut c as *mut c_char, 1) as c_int + } else { + zread(fd, &mut c as *mut c_char, 1) as c_int + }; + } else { + retval = if posixly_correct != 0 { zreadcintr(fd, &mut c as *mut c_char) as c_int - } - else { //-a -t + } else { + //-a -t zreadc(fd, &mut c as *mut c_char) as c_int }; - } - reading = 0; - - if retval <= 0 { - let t = *libc::__errno_location(); - if retval < 0 && *libc::__errno_location() == libc::EINTR { - check_signals(); - //lastsig = LASTSIG(); - if terminating_signal != 0 { - lastsig = terminating_signal; - } else { - lastsig = if interrupt_state != 0 {libc::SIGINT} else { 0 }; } - - if lastsig == 0 { - lastsig = trapped_signal_received; + reading = 0; + + if retval <= 0 { + let t = *libc::__errno_location(); + if retval < 0 && *libc::__errno_location() == libc::EINTR { + check_signals(); + //lastsig = LASTSIG(); + if terminating_signal != 0 { + lastsig = terminating_signal; + } else { + lastsig = if interrupt_state != 0 { + libc::SIGINT + } else { + 0 + }; + } + + if lastsig == 0 { + lastsig = trapped_signal_received; + } + } else { + lastsig = 0; + } + if terminating_signal != 0 && tty_modified != 0 { + // ttyrestore(); + ttyrestore(&mut termsave); + } + check_alrm(); + eof = 1; + *libc::__errno_location() = t; + break 'get_input_string; } - } else { - lastsig = 0; - } - if terminating_signal != 0 && tty_modified != 0 { - // ttyrestore(); - ttyrestore(&mut termsave); - } - check_alrm(); - eof = 1; - *libc::__errno_location() = t; - break 'get_input_string; - } - quit(); - } + quit(); + } - if retval <= 0 { - check_alrm(); - } + if retval <= 0 { + check_alrm(); + } - if mb_cur_max <= 4 { - mb_cur_max = 4; - } - if i + mb_cur_max >= size { - size += 128; - let t: *mut c_char= xrealloc(input_string as *mut c_void, size as usize) as *mut c_char; - if t != input_string { - input_string = t; - remove_unwind_protect(); - add_unwind_protect(xfree as *mut c_void, input_string); - } - } -'out_add_char: loop { - if pass_next != 0 { - pass_next = 0; - if c == b'\n' as c_char { - if skip_ctlesc == 0 && i > 0 {i -= 1;} - if interactive != 0 && input_is_tty != 0 && raw == 0 {print_ps2 = 1;} - } else { - break 'out_add_char; - } - continue 'get_input_string; - } + if mb_cur_max <= 4 { + mb_cur_max = 4; + } + if i + mb_cur_max >= size { + size += 128; + let t: *mut c_char = + xrealloc(input_string as *mut c_void, size as usize) as *mut c_char; + if t != input_string { + input_string = t; + remove_unwind_protect(); + add_unwind_protect(xfree as *mut c_void, input_string); + } + } + 'out_add_char: loop { + if pass_next != 0 { + pass_next = 0; + if c == b'\n' as c_char { + if skip_ctlesc == 0 && i > 0 { + i -= 1; + } + if interactive != 0 && input_is_tty != 0 && raw == 0 { + print_ps2 = 1; + } + } else { + break 'out_add_char; + } + continue 'get_input_string; + } - if c == b'\\' as c_char && raw == 0 { - pass_next += 1; - if skip_ctlesc == 0 { - saw_escape += 1; - *((input_string as usize + i as usize) as *mut c_char) = CTLESC; - i += 1; - } + if c == b'\\' as c_char && raw == 0 { + pass_next += 1; + if skip_ctlesc == 0 { + saw_escape += 1; + *((input_string as usize + i as usize) as *mut c_char) = CTLESC; + i += 1; + } - continue 'get_input_string; - } + continue 'get_input_string; + } - if ignore_delim == 0 && c == delim { //-a - break 'get_input_string; - } + if ignore_delim == 0 && c == delim { + //-a + break 'get_input_string; + } - if c == b'\0' as c_char && delim != b'\0' as c_char { - continue 'get_input_string; - } + if c == b'\0' as c_char && delim != b'\0' as c_char { + continue 'get_input_string; + } - if (skip_ctlesc == 0 && c == CTLESC) || (skip_ctlnul == 0 && c == CTLNUL) { - saw_escape += 1; - *((input_string as usize + i as usize) as *mut c_char) = CTLESC; - i += 1; - } - break 'out_add_char; - }//out_add_char + if (skip_ctlesc == 0 && c == CTLESC) || (skip_ctlnul == 0 && c == CTLNUL) { + saw_escape += 1; + *((input_string as usize + i as usize) as *mut c_char) = CTLESC; + i += 1; + } + break 'out_add_char; + } //out_add_char - *((input_string as usize + i as usize) as *mut c_char) = c; - i += 1; - check_alrm(); + *((input_string as usize + i as usize) as *mut c_char) = c; + i += 1; + check_alrm(); - if mb_cur_max > 1 && is_basic(c) == 0 { + if mb_cur_max > 1 && is_basic(c) == 0 { + *((input_string as usize + i as usize) as *mut c_char) = b'\0' as c_char; + + if edit != 0 { + let clen = mbrlen( + (rlbuf as usize + rlind as usize - 1) as *const c_char, + mb_cur_max as usize, + std::mem::transmute(&PT_NULL), + ); + if clen > 1 { + libc::memcpy( + (input_string as usize + i as usize) as *mut c_void, + (rlbuf as usize + rlind as usize) as *mut c_void, + (clen - 1) as size_t, + ); + i += clen - 1; + rlind += clen - 1; + } + } else if locale_utf8locale == 0 || ((c as u8 & 0x80) != 0) { + i += read_mbchar(fd, input_string, i, c as c_int, unbuffered_read); + } + } + nr += 1; + if nchars > 0 && nr >= nchars { + break 'get_input_string; + } + } //get_input_string *((input_string as usize + i as usize) as *mut c_char) = b'\0' as c_char; + check_alrm(); if edit != 0 { - let clen = mbrlen((rlbuf as usize + rlind as usize - 1) as *const c_char, - mb_cur_max as usize, - std::mem::transmute(&PT_NULL)); - if clen > 1 { - libc::memcpy( (input_string as usize + i as usize) as *mut c_void, - (rlbuf as usize + rlind as usize) as *mut c_void, (clen - 1) as size_t); - i += clen - 1; - rlind += clen - 1; - } - } else if locale_utf8locale == 0 || ((c as u8 & 0x80) != 0) { - i += read_mbchar(fd, input_string, i, c as c_int, unbuffered_read); + libc::free(rlbuf as *mut c_void); } - } - nr += 1; - if nchars > 0 && nr >= nchars { - break 'get_input_string; - } - - } //get_input_string - - *((input_string as usize + i as usize) as *mut c_char) = b'\0' as c_char; - check_alrm(); - if edit != 0 { - libc::free(rlbuf as *mut c_void); - } + if retval < 0 { + t_errno = *libc::__errno_location(); + if *libc::__errno_location() != EINTR { + let c_err = CString::new("read error: %d: %s").unwrap(); + builtin_error( + c_err.as_ptr(), + fd, + libc::strerror(*libc::__errno_location()), + ); + } - if retval < 0 { - t_errno = *libc::__errno_location(); - if *libc::__errno_location() != EINTR { - let c_err = CString::new("read error: %d: %s").unwrap(); - builtin_error( c_err.as_ptr(), fd, libc::strerror(*libc::__errno_location())); - } + run_unwind_frame(frame_name.as_ptr() as *mut c_char); + return if t_errno != EINTR { + EXECUTION_FAILURE + } else { + 128 + lastsig + }; + } - run_unwind_frame(frame_name.as_ptr() as *mut c_char); - return if t_errno != EINTR {EXECUTION_FAILURE} else { 128 + lastsig}; - } + if tmsec > 0 || tmusec > 0 { + reset_alarm(); + } - if tmsec > 0 || tmusec > 0 { - reset_alarm(); - } + if nchars > 0 || delim != b'\n' as c_char { + if edit != 0 { + if nchars > 0 { + rl_num_chars_to_read = 0; + } + if delim != b'\n' as c_char { + reset_eol_delim(0 as *mut c_char); + } + } else if input_is_tty != 0 { + // ttyrestore(); + ttyrestore(&mut termsave); + } + } else if silent != 0 { + // ttyrestore(); + ttyrestore(&mut termsave); + } - if nchars > 0 || delim != b'\n' as c_char { - if edit != 0 { - if nchars > 0{ - rl_num_chars_to_read = 0; + // if unbuffered_read != 0 { + if unbuffered_read == 0 { + zsyncfd(fd); } - if delim != b'\n' as c_char{ - reset_eol_delim(0 as *mut c_char); + + if !save_instream.is_null() { + rl_instream = save_instream; } - } - else if input_is_tty != 0 { - // ttyrestore(); - ttyrestore(&mut termsave); - } - } - else if silent != 0 { - // ttyrestore(); - ttyrestore(&mut termsave); - } - // if unbuffered_read != 0 { - if unbuffered_read == 0 { - zsyncfd(fd); - } + discard_unwind_frame(frame_name.as_ptr() as *mut c_char); - if !save_instream.is_null() { - rl_instream = save_instream; - } + retval = if eof != 0 { + EXECUTION_FAILURE + } else { + EXECUTION_SUCCESS + }; - discard_unwind_frame(frame_name.as_ptr() as *mut c_char); + break 'out_assig_vars; + } //out_assig_vars + + if !arrayname.is_null() { + //和-a有关 + if legal_identifier(arrayname) == 0 { + //标签不符合规范 + // sh_invalidid(arrayname); + r_sh_invalidid(arrayname); + libc::free(input_string as *mut c_void); + return EXECUTION_FAILURE; + } - retval = if eof != 0 {EXECUTION_FAILURE} else {EXECUTION_SUCCESS}; + var = find_or_make_array_variable(arrayname, 1); + if var.is_null() { + libc::free(input_string as *mut c_void); + return EXECUTION_FAILURE; /* readonly or noassign */ + } + if ((*var).attributes & 0x0000040) != 0 { + let c_err = + CString::new("%s: cannot convert associative to indexed array").unwrap(); + builtin_error(c_err.as_ptr(), arrayname); + libc::free(input_string as *mut c_void); + return EXECUTION_FAILURE; /* existing associative array */ + } else if ((*var).attributes & 0x0001000) != 0 { + (*var).attributes &= ((*var).attributes as u32 ^ 0xffffffff as u32) as i32; + } - break 'out_assig_vars; -} //out_assig_vars + array_flush(std::mem::transmute((*var).value)); - if !arrayname.is_null() { //和-a有关 - if legal_identifier(arrayname) == 0 { //标签不符合规范 - // sh_invalidid(arrayname); - r_sh_invalidid(arrayname); - libc::free(input_string as *mut c_void); - return EXECUTION_FAILURE; - } + alist = list_string(input_string, ifs_chars, 0); + if !alist.is_null() { + if saw_escape != 0 { + dequote_list(alist); + } else { + word_list_remove_quoted_nulls(alist); + } + assign_array_var_from_word_list(var, alist, 0); + dispose_words(alist); + } - var = find_or_make_array_variable(arrayname, 1); - if var.is_null() { - libc::free(input_string as *mut c_void); - return EXECUTION_FAILURE; /* readonly or noassign */ - } - if ((*var).attributes & 0x0000040) != 0 { - let c_err = CString::new("%s: cannot convert associative to indexed array").unwrap(); - builtin_error(c_err.as_ptr(), arrayname); libc::free(input_string as *mut c_void); - return EXECUTION_FAILURE; /* existing associative array */ - } else if ((*var).attributes & 0x0001000) != 0 { - (*var).attributes &= ((*var).attributes as u32 ^ 0xffffffff as u32) as i32; - } - array_flush(std::mem::transmute((*var).value)); + return retval; + } - alist = list_string(input_string, ifs_chars, 0); - if !alist.is_null() { - if saw_escape != 0 { - dequote_list(alist); - } else { - word_list_remove_quoted_nulls(alist); + if list.is_null() { + //和-d相关 -n 0可以退出,有显示 + if saw_escape != 0 { + let t = dequote_string(input_string); + var = bind_variable("REPLY".as_ptr() as *const c_char, t, 0); + libc::free(t as *mut c_void); + } else { + var = bind_variable("REPLY".as_ptr() as *const c_char, input_string, 0); + } + let cond = var.is_null() + || ((*var).attributes & 0x0000002) != 0 + || ((*var).attributes & 0x0004000) != 0; + if cond { + retval = EXECUTION_FAILURE; + } else { + (*var).attributes &= ((*var).attributes as u32 ^ 0xffffffff as u32) as i32; } - assign_array_var_from_word_list(var, alist, 0); - dispose_words(alist); - } - libc::free(input_string as *mut c_void); + libc::free(input_string as *mut c_void); + return retval; + } - return retval; - } + orig_input_string = input_string; - if list.is_null() { //和-d相关 -n 0可以退出,有显示 - if saw_escape != 0 { - let t = dequote_string(input_string); - var = bind_variable("REPLY".as_ptr() as *const c_char, t, 0); - libc::free(t as *mut c_void); - } else { - var = bind_variable("REPLY".as_ptr() as *const c_char, input_string, 0); - } - let cond = var.is_null() || ((*var).attributes & 0x0000002) != 0 || ((*var).attributes & 0x0004000) != 0; - if cond { - retval = EXECUTION_FAILURE; - } else { - (*var).attributes &= ((*var).attributes as u32 ^ 0xffffffff as u32) as i32; + let mut t = input_string; + while !ifs_chars.is_null() + && *ifs_chars != 0 + && (*t == b' ' as c_char || *t == b'\t' as c_char || *t == b'\n' as c_char) + && (ifs_cmap[*t as usize] != 0) + { + t = (t as usize + 1) as *mut c_char; } + input_string = t; - libc::free(input_string as *mut c_void); - return retval; - } - - orig_input_string = input_string; + while !(*list).next.is_null() { + varname = (*((*list).word)).word; - let mut t = input_string; - while !ifs_chars.is_null() && *ifs_chars != 0 && - (*t == b' ' as c_char|| *t == b'\t' as c_char || *t == b'\n' as c_char) && - (ifs_cmap[*t as usize] != 0) { - t = (t as usize + 1) as *mut c_char; - } - input_string = t; + if legal_identifier(varname) == 0 && valid_array_reference(varname, vflags) == 0 { + // sh_invalidid(varname); + r_sh_invalidid(varname); + libc::free(orig_input_string as *mut c_void); + return EXECUTION_FAILURE; + } - while !(*list).next.is_null() { - varname = (*((*list).word)).word; + if *input_string != 0 { + t = get_word_from_string( + std::mem::transmute(&input_string), + ifs_chars, + std::mem::transmute(&e), + ); + if !t.is_null() { + *e = b'\0' as c_char; + } - if legal_identifier(varname) == 0 && - valid_array_reference(varname, vflags) == 0 { - // sh_invalidid(varname); - r_sh_invalidid(varname); - libc::free(orig_input_string as *mut c_void); - return EXECUTION_FAILURE; - } + if !t.is_null() && saw_escape != 0 { + let t1 = dequote_string(t); + var = bind_read_variable(varname, t1); + libc::free(t1 as *mut c_void); + } else { + var = bind_read_variable( + varname, + if !t.is_null() { + t + } else { + "".as_ptr() as *mut c_char + }, + ); + } + } else { + t = PT_NULL as *mut c_char; + var = bind_read_variable(varname, "".as_ptr() as *mut c_char); + } - if *input_string != 0 { - t = get_word_from_string(std::mem::transmute(&input_string), ifs_chars, std::mem::transmute(&e)); - if !t.is_null() { *e = b'\0' as c_char;} + if !t.is_null() { + libc::free(t as *mut c_void); + } - if !t.is_null() && saw_escape != 0 { - let t1 = dequote_string(t); - var = bind_read_variable(varname, t1); - libc::free(t1 as *mut c_void); - } else { - var = bind_read_variable(varname, if !t.is_null() {t} else {"".as_ptr() as *mut c_char}); + if var.is_null() { + libc::free(orig_input_string as *mut c_void); + return EXECUTION_FAILURE; } - } else { - t = PT_NULL as *mut c_char; - var = bind_read_variable(varname, "".as_ptr() as *mut c_char); - } - if !t.is_null() { - libc::free(t as *mut c_void); + stupidly_hack_special_variables(varname); + (*var).attributes &= ((*var).attributes as u32 ^ 0xffffffff as u32) as i32; + + list = (*list).next; } - if var.is_null() { + if legal_identifier((*((*list).word)).word) == 0 + && valid_array_reference((*((*list).word)).word, vflags) == 0 + { + // sh_invalidid((*((*list).word)).word); + r_sh_invalidid((*((*list).word)).word); libc::free(orig_input_string as *mut c_void); return EXECUTION_FAILURE; } - stupidly_hack_special_variables(varname); - (*var).attributes &= ((*var).attributes as u32 ^ 0xffffffff as u32) as i32; - - list = (*list).next; - } - - if legal_identifier((*((*list).word)).word) == 0 && - valid_array_reference((*((*list).word)).word, vflags) == 0 { - // sh_invalidid((*((*list).word)).word); - r_sh_invalidid((*((*list).word)).word); - libc::free(orig_input_string as *mut c_void); - return EXECUTION_FAILURE; - } + tofree = PT_NULL as *mut c_char; + if *input_string != 0 { + t1 = input_string; + t = get_word_from_string( + std::mem::transmute(&input_string), + ifs_chars, + std::mem::transmute(&e), + ); + if *input_string == 0 { + input_string = t; + tofree = input_string; + } else { + input_string = strip_trailing_ifs_whitespace(t1, ifs_chars, saw_escape); + tofree = t; + } + } - tofree = PT_NULL as *mut c_char; - if *input_string != 0 { - t1 = input_string; - t = get_word_from_string(std::mem::transmute(&input_string), ifs_chars, std::mem::transmute(&e)); - if *input_string == 0 { - input_string = t; - tofree = input_string; + if saw_escape != 0 && !input_string.is_null() && *input_string != 0 { + t = dequote_string(input_string); + var = bind_read_variable((*((*list).word)).word, t); + libc::free(t as *mut c_void); } else { - input_string = strip_trailing_ifs_whitespace(t1, ifs_chars, saw_escape); - tofree = t; + var = bind_read_variable( + (*((*list).word)).word, + if !input_string.is_null() { + input_string + } else { + "".as_ptr() as *mut c_char + }, + ); } - } - - if saw_escape != 0 && !input_string.is_null() && *input_string != 0 { - t = dequote_string(input_string); - var = bind_read_variable((*((*list).word)).word, t); - libc::free(t as *mut c_void); - } else { - var = bind_read_variable((*((*list).word)).word, if !input_string.is_null() {input_string} else {"".as_ptr() as *mut c_char}); - } - if !var.is_null() { - stupidly_hack_special_variables((*((*list).word)).word); - (*var).attributes &= ((*var).attributes as u32 ^ 0xffffffff as u32) as i32; - } else { - retval = EXECUTION_FAILURE; - } + if !var.is_null() { + stupidly_hack_special_variables((*((*list).word)).word); + (*var).attributes &= ((*var).attributes as u32 ^ 0xffffffff as u32) as i32; + } else { + retval = EXECUTION_FAILURE; + } - if !tofree.is_null() { - libc::free(tofree as *mut c_void); - } - libc::free(orig_input_string as *mut c_void); - return retval; -} //unsafe + if !tofree.is_null() { + libc::free(tofree as *mut c_void); + } + libc::free(orig_input_string as *mut c_void); + return retval; + } //unsafe } /* ---------------------------------------------------------------------------------- */ @@ -833,183 +908,151 @@ unsafe { // } #[inline] -unsafe extern "C" fn is_basic(mut c:libc::c_char)->libc::c_int{ +unsafe extern "C" fn is_basic(c: libc::c_char) -> libc::c_int { return (*is_basic_table .as_ptr() - .offset((c as libc::c_uchar as libc::c_int>>5 as libc::c_int)as isize) - >>(c as libc::c_uchar as libc::c_int & 31 as libc::c_int) + .offset((c as libc::c_uchar as libc::c_int >> 5 as libc::c_int) as isize) + >> (c as libc::c_uchar as libc::c_int & 31 as libc::c_int) & 1 as libc::c_int as libc::c_uint) as libc::c_int; } -pub fn bind_read_variable(name: *mut c_char, value: *mut c_char) -> * mut SHELL_VAR { +pub fn bind_read_variable(name: *mut c_char, value: *mut c_char) -> *mut SHELL_VAR { let v: *mut SHELL_VAR; -unsafe { - // v = builtin_bind_variable(name, value, 0); - v = r_builtin_bind_variable(name, value, 0); - - if v.is_null() { - return v; - } else { - if ((*v).attributes & 0x0000002) != 0 || ((*v).attributes & 0x0004000) != 0 { - return PT_NULL as *mut SHELL_VAR; - } else { + unsafe { + v = r_builtin_bind_variable(name, value, 0); + + if v.is_null() { return v; + } else { + if ((*v).attributes & 0x0000002) != 0 || ((*v).attributes & 0x0004000) != 0 { + return PT_NULL as *mut SHELL_VAR; + } else { + return v; + } } } } -} fn read_mbchar(fd: c_int, string: *mut c_char, ind: c_int, ch: c_int, unbuffered: c_int) -> c_int { let mut i: size_t = 1; let mut r: ssize_t; - let mut c: c_char = 0; - let mut ret: ssize_t; - -unsafe { - let mut mbchar: [c_char; MB_LEN_MAX as usize + 1] = std::mem::zeroed(); - let mut ps: mbstate_t = std::mem::zeroed(); - let mut ps_back: mbstate_t = std::mem::zeroed(); - let mut wc: libc::wchar_t = std::mem::zeroed(); - -'out: loop { - mbchar[0] = ch as c_char; - for n in 0..= MB_LEN_MAX { - ps_back = ps; - ret = mbrtowc(std::mem::transmute(&wc), std::mem::transmute(&mbchar), i, std::mem::transmute(&ps)) as ssize_t; - if ret == -2 { - ps = ps_back; - - /* We don't want to be interrupted during a multibyte char read */ - if unbuffered == 2 { - r = zreadn(fd, std::mem::transmute(&c), 1); - } else if unbuffered != 0 { - r = zread(fd, std::mem::transmute(&c), 1); - } else { - r = zreadc(fd, std::mem::transmute(&c)); - } - if r <= 0 { - break 'out; + let c: c_char = 0; + let mut ret: ssize_t; + + unsafe { + let mut mbchar: [c_char; MB_LEN_MAX as usize + 1] = std::mem::zeroed(); + let mut ps: mbstate_t = std::mem::zeroed(); + let mut ps_back: mbstate_t = std::mem::zeroed(); + let wc: libc::wchar_t = std::mem::zeroed(); + + 'out: loop { + mbchar[0] = ch as c_char; + for _n in 0..=MB_LEN_MAX { + ps_back = ps; + ret = mbrtowc( + std::mem::transmute(&wc), + std::mem::transmute(&mbchar), + i, + std::mem::transmute(&ps), + ) as ssize_t; + if ret == -2 { + ps = ps_back; + + /* We don't want to be interrupted during a multibyte char read */ + if unbuffered == 2 { + r = zreadn(fd, std::mem::transmute(&c), 1); + } else if unbuffered != 0 { + r = zread(fd, std::mem::transmute(&c), 1); + } else { + r = zreadc(fd, std::mem::transmute(&c)); + } + if r <= 0 { + break 'out; + } + mbchar[i] = c; + i += 1; + continue; + } else if ret == -1 || ret == 0 || ret > 0 { + break; + } } - mbchar[i] = c; - i += 1; - continue; - } else if ret == -1 || ret == 0 || ret > 0 { - break; + break 'out; } - } - break 'out; -} - if i > 1 { - r = 1; - while r < i as isize { - *((string as usize + ind as usize + r as usize -1) as *mut c_char) = mbchar[r as size_t]; + if i > 1 { + r = 1; + while r < i as isize { + *((string as usize + ind as usize + r as usize - 1) as *mut c_char) = + mbchar[r as size_t]; - r += 1; + r += 1; + } } + return (i - 1) as c_int; } - return (i - 1) as c_int; -} } fn quit() { -unsafe { - if terminating_signal != 0 { - termsig_handler(terminating_signal); - } + unsafe { + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } - if interrupt_state != 0 { - throw_to_top_level(); + if interrupt_state != 0 { + throw_to_top_level(); + } } } -} fn check_alrm() { unsafe { if sigalrm_seen != 0 { - siglongjmp (std::mem::transmute(&alrmbuf), 1); - // siglongjmp (&mut alrmbuf as *mut __jmp_buf_tag, 1); + siglongjmp(std::mem::transmute(&alrmbuf), 1); } } } static mut old_attempted_completion_function: usize = 0; -pub fn reset_attempted_completion_function(cp: *mut c_char) -{ -unsafe { - if rl_attempted_completion_function as usize == 0 && - old_attempted_completion_function as usize != 0 { - rl_attempted_completion_function = std::mem::transmute(old_attempted_completion_function); +pub fn reset_attempted_completion_function(_cp: *mut c_char) { + unsafe { + if rl_attempted_completion_function as usize == 0 + && old_attempted_completion_function as usize != 0 + { + rl_attempted_completion_function = + std::mem::transmute(old_attempted_completion_function); + } } } -} static mut old_startup_hook: usize = 0; static mut deftext: *mut c_char = PT_NULL as *mut c_char; -fn set_itext() -> c_int -{ +fn set_itext() -> c_int { let mut r1 = 0; let mut r2 = 0; -unsafe { - if old_startup_hook != 0 { - let fp: rl_hook_func_t = std::mem::transmute(old_startup_hook); - r1 = fp(); + unsafe { + if old_startup_hook != 0 { + let fp: rl_hook_func_t = std::mem::transmute(old_startup_hook); + r1 = fp(); + } + if !deftext.is_null() { + r2 = rl_insert_text(deftext as *const c_char); + deftext = PT_NULL as *mut c_char; + rl_startup_hook = std::mem::transmute(old_startup_hook); + old_startup_hook = std::mem::transmute(0 as usize); + } } - if !deftext.is_null() { - r2 = rl_insert_text(deftext as *const c_char); - deftext = PT_NULL as *mut c_char; - rl_startup_hook = std::mem::transmute(old_startup_hook); - old_startup_hook = std::mem::transmute(0 as usize); - } -} - return (r1 != 0 || r2 != 0) as c_int; + return (r1 != 0 || r2 != 0) as c_int; } -// fn edit_line(p : *mut c_char, itext : *mut c_char) -> *mut c_char { -// unsafe { -// if bash_readline_initialized == 0 { -// initialize_readline(); -// } - -// old_attempted_completion_function = std::mem::transmute(rl_attempted_completion_function); -// rl_attempted_completion_function = std::mem::transmute(0 as usize); -// bashline_set_event_hook(); -// if !itext.is_null() { -// old_startup_hook = std::mem::transmute(rl_startup_hook); -// rl_startup_hook = std::mem::transmute(set_itext as usize); -// deftext = itext; -// } - -// let mut ret = readline(p); - -// rl_attempted_completion_function = std::mem::transmute(old_attempted_completion_function); -// old_attempted_completion_function = std::mem::transmute(0 as usize); -// bashline_reset_event_hook(); - -// if ret.is_null() { -// return ret; -// } - -// let len:i32 = libc::strlen(ret) as i32; -// ret = xrealloc(ret as *mut c_void, (len + 2) as usize) as *mut c_char; -// // *ret = delim; -// *ret.offset(len as isize) = delim; -// *((ret as usize + 1) as *mut c_char) = b'\0' as c_char; - -// return ret; -// } -// } - - -fn edit_line(p : *mut c_char, itext : *mut c_char) -> *mut c_char { - let mut len:i32; +fn edit_line(p: *mut c_char, itext: *mut c_char) -> *mut c_char { + let mut len: i32; unsafe { if bash_readline_initialized == 0 { initialize_readline(); } - + old_attempted_completion_function = std::mem::transmute(rl_attempted_completion_function); rl_attempted_completion_function = std::mem::transmute(0 as usize); bashline_set_event_hook(); @@ -1018,76 +1061,57 @@ fn edit_line(p : *mut c_char, itext : *mut c_char) -> *mut c_char { rl_startup_hook = std::mem::transmute(set_itext as usize); deftext = itext; } - + let mut ret = readline(p); - + rl_attempted_completion_function = std::mem::transmute(old_attempted_completion_function); old_attempted_completion_function = std::mem::transmute(0 as usize); bashline_reset_event_hook(); - + if ret.is_null() { return ret; } - + len = libc::strlen(ret) as i32; ret = xrealloc(ret as *mut c_void, (len + 2) as usize) as *mut c_char; *ret.offset(len as isize) = delim; len += 1; - *ret.offset(len as isize) = b'\0' as c_char; + *ret.offset(len as isize) = b'\0' as c_char; return ret; } } - - -fn sigalrm(s : c_int) { -unsafe { - sigalrm_seen = 1; -} +fn sigalrm(_s: c_int) { + unsafe { + sigalrm_seen = 1; + } } -fn reset_alarm() -{ -unsafe { - falarm(0, 0); - set_signal_handler(libc::SIGALRM, old_alrm); -} +fn reset_alarm() { + unsafe { + falarm(0, 0); + set_signal_handler(libc::SIGALRM, old_alrm); + } } -// fn ttyrestore() -// { -// unsafe { -// if termsave.is_none() { -// let tmp: tty_save = std::mem::zeroed(); -// termsave = Some(tmp); -// } - -// let ter = termsave.unwrap(); -// ttsetattr(ter.fd, std::mem::transmute(&(ter.attrs))); -// tty_modified = 0; -// } -// } - -unsafe extern "C" fn ttyrestore(mut ttp:*mut tty_save){ - ttsetattr((*ttp).fd,&mut (*ttp).attrs); +unsafe extern "C" fn ttyrestore(ttp: *mut tty_save) { + ttsetattr((*ttp).fd, &mut (*ttp).attrs); tty_modified = 0 as libc::c_int; } #[no_mangle] -pub extern "C" fn read_tty_cleanup() -{ -unsafe { - if tty_modified != 0 { - ttyrestore(&mut termsave); +pub extern "C" fn read_tty_cleanup() { + unsafe { + if tty_modified != 0 { + ttyrestore(&mut termsave); + } } } -} #[no_mangle] -pub extern "C" fn read_tty_modified() -> c_int -{ -unsafe { - return tty_modified; +pub extern "C" fn read_tty_modified() -> c_int { + unsafe { + return tty_modified; } } @@ -1097,76 +1121,45 @@ static mut old_newline_ctype: c_int = 0; static mut old_newline_func: usize = 0; static mut delim_char: u8 = 0; -// fn set_eol_delim(c: c_int) -// { -// unsafe { -// if bash_readline_initialized == 0 { -// initialize_readline(); -// } - -// let cmap = rl_get_keymap(); -// let n = std::mem::size_of_val(&*cmap); -// let ret_pos = (b'M' & 0x1f) as usize * n; -// let c_pos = (c & 0x1f) as usize * n; - -// /* Save the old delimiter char binding */ -// old_newline_ctype = (*((cmap as usize + ret_pos) as Keymap)).tp as c_int; -// old_newline_func = (*((cmap as usize + ret_pos) as Keymap)).function as usize; -// old_delim_ctype = (*((cmap as usize + c_pos) as Keymap)).tp as c_int; -// old_delim_func = (*((cmap as usize + c_pos) as Keymap)).function as usize; - -// /* Change newline to self-insert */ -// (*((cmap as usize + ret_pos) as Keymap)).tp = ISFUNC as c_char; -// (*((cmap as usize + ret_pos) as Keymap)).function = rl_insert; - -// /* Bind the delimiter character to accept-line. */ -// (*((cmap as usize + c_pos) as Keymap)).tp = ISFUNC as c_char; -// (*((cmap as usize + c_pos) as Keymap)).function = rl_newline; - -// delim_char = c as u8; -// } -// } -fn set_eol_delim(c: c_int) -{ - let mut cmap:Keymap; -unsafe { - if bash_readline_initialized == 0 { - initialize_readline(); - } +fn set_eol_delim(c: c_int) { + let cmap: Keymap; + unsafe { + if bash_readline_initialized == 0 { + initialize_readline(); + } - // let cmap = rl_get_keymap(); - cmap = rl_get_keymap(); + // let cmap = rl_get_keymap(); + cmap = rl_get_keymap(); - old_newline_ctype = (*cmap.offset((b'M' as i32 & 0x1f) as isize)).tp as c_int; - old_newline_func = (*cmap.offset((b'M' as i32 & 0x1f) as isize)).function as usize; - old_delim_ctype = (*cmap.offset(c as isize)).tp as c_int; - old_delim_func = (*cmap.offset(c as isize)).function as usize; + old_newline_ctype = (*cmap.offset((b'M' as i32 & 0x1f) as isize)).tp as c_int; + old_newline_func = (*cmap.offset((b'M' as i32 & 0x1f) as isize)).function as usize; + old_delim_ctype = (*cmap.offset(c as isize)).tp as c_int; + old_delim_func = (*cmap.offset(c as isize)).function as usize; - /* Change newline to self-insert */ - (*cmap.offset((b'M' as i32 & 0x1f) as isize)).tp = ISFUNC as c_char; - (*cmap.offset((b'M' as i32 & 0x1f) as isize)).function = rl_insert; + /* Change newline to self-insert */ + (*cmap.offset((b'M' as i32 & 0x1f) as isize)).tp = ISFUNC as c_char; + (*cmap.offset((b'M' as i32 & 0x1f) as isize)).function = rl_insert; - /* Bind the delimiter character to accept-line. */ - (*cmap.offset(c as isize)).tp = ISFUNC as c_char; - (*cmap.offset(c as isize)).function = rl_newline; + /* Bind the delimiter character to accept-line. */ + (*cmap.offset(c as isize)).tp = ISFUNC as c_char; + (*cmap.offset(c as isize)).function = rl_newline; - delim_char = c as u8; -} + delim_char = c as u8; + } } -fn reset_eol_delim(cp: *mut c_char) -{ -unsafe { - let cmap = rl_get_keymap(); - let n = std::mem::size_of_val(&*cmap); - let ret_pos = (b'M' & 0x1f) as usize * n; - let delim_pos = (delim_char & 0x1f) as usize * n; +fn reset_eol_delim(_cp: *mut c_char) { + unsafe { + let cmap = rl_get_keymap(); + let n = std::mem::size_of_val(&*cmap); + let ret_pos = (b'M' & 0x1f) as usize * n; + let delim_pos = (delim_char & 0x1f) as usize * n; - (*((cmap as usize + ret_pos) as Keymap)).tp = old_newline_ctype as c_char; - (*((cmap as usize + ret_pos) as Keymap)).function = std::mem::transmute(old_newline_func); + (*((cmap as usize + ret_pos) as Keymap)).tp = old_newline_ctype as c_char; + (*((cmap as usize + ret_pos) as Keymap)).function = std::mem::transmute(old_newline_func); - (*((cmap as usize + delim_pos) as Keymap)).tp = old_delim_ctype as c_char; - (*((cmap as usize + delim_pos) as Keymap)).function = std::mem::transmute(old_delim_func); -} + (*((cmap as usize + delim_pos) as Keymap)).tp = old_delim_ctype as c_char; + (*((cmap as usize + delim_pos) as Keymap)).function = std::mem::transmute(old_delim_func); + } } diff --git a/bash-5.1/builtins_rust/rlet/src/lib.rs b/bash-5.1/builtins_rust/rlet/src/lib.rs index 20799dc1ad9ce09162e0825808e35ed893a25ae8..187122117b90da3f7d554e9adac8f35075b0871a 100644 --- a/bash-5.1/builtins_rust/rlet/src/lib.rs +++ b/bash-5.1/builtins_rust/rlet/src/lib.rs @@ -1,69 +1,80 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later +use libc::{c_char, c_int, c_long, c_void}; use std::ffi::CStr; -use libc::{c_int, c_char, c_long, c_void}; - include!(concat!("intercdep.rs")); #[no_mangle] pub extern "C" fn r_let_builtin(mut list: *mut WordList) -> i32 { -unsafe { - let mut ret: c_long = 0; - let mut expok: c_int = 0; + unsafe { + let mut ret: c_long = 0; + let expok: c_int = 0; - if !list.is_null() && !(*list).word.is_null() && - libc::strcmp((*((*list).word)).word, "--help\0".as_ptr() as *const c_char) == 0 { - r_builtin_help (); - return EX_USAGE; - } + if !list.is_null() + && !(*list).word.is_null() + && libc::strcmp((*((*list).word)).word, "--help\0".as_ptr() as *const c_char) == 0 + { + r_builtin_help(); + return EX_USAGE; + } - if !list.is_null() && !(*list).word.is_null() && is_option((*((*list).word)).word, b'-') { - list = (*list).next; - } + if !list.is_null() && !(*list).word.is_null() && is_option((*((*list).word)).word, b'-') { + list = (*list).next; + } - if list.is_null() { - let names = String::from("letwarn"); - err_translate_fn(&names,std::ptr::null_mut()); - println!(); - return EXECUTION_FAILURE; - } + if list.is_null() { + let names = String::from("letwarn"); + err_translate_fn(&names, std::ptr::null_mut()); + println!(); + return EXECUTION_FAILURE; + } - while !list.is_null() { - ret = evalexp((*((*list).word)).word, EXP_EXPANDED, std::mem::transmute(&expok)); - if expok == 0 { - return EXECUTION_FAILURE; + while !list.is_null() { + ret = evalexp( + (*((*list).word)).word, + EXP_EXPANDED, + std::mem::transmute(&expok), + ); + if expok == 0 { + return EXECUTION_FAILURE; + } + list = (*list).next; } - list = (*list).next; - } - return if ret == 0 {EXECUTION_FAILURE} else {EXECUTION_SUCCESS}; -} + return if ret == 0 { + EXECUTION_FAILURE + } else { + EXECUTION_SUCCESS + }; + } } #[no_mangle] -pub extern "C" fn r_exp_builtin(mut list: *mut WordList) -> i32 { - -unsafe { - let mut expok: c_int = 0; +pub extern "C" fn r_exp_builtin(list: *mut WordList) -> i32 { + unsafe { + let expok: c_int = 0; - if list.is_null() { - let names = String::from("letwarn"); - err_translate_fn(&names,std::ptr::null_mut()); - println!(); - return EXECUTION_FAILURE; - } + if list.is_null() { + let names = String::from("letwarn"); + err_translate_fn(&names, std::ptr::null_mut()); + println!(); + return EXECUTION_FAILURE; + } - let exp = string_list(list); - let ret = evalexp(exp, EXP_EXPANDED, std::mem::transmute(&expok)); - libc::free(exp as *mut c_void); - return if ret == 0 || expok == 0 {EXECUTION_FAILURE} else {EXECUTION_SUCCESS}; -} + let exp = string_list(list); + let ret = evalexp(exp, EXP_EXPANDED, std::mem::transmute(&expok)); + libc::free(exp as *mut c_void); + return if ret == 0 || expok == 0 { + EXECUTION_FAILURE + } else { + EXECUTION_SUCCESS + }; + } } -unsafe fn is_option(s: *mut c_char, c: u8) -> bool -{ +unsafe fn is_option(s: *mut c_char, c: u8) -> bool { let str = CStr::from_ptr(s).to_bytes_with_nul(); - return str[0] == b'-' && str[1] == c && str[2] != 0 + return str[0] == b'-' && str[1] == c && str[2] != 0; } diff --git a/bash-5.1/builtins_rust/rreturn/src/lib.rs b/bash-5.1/builtins_rust/rreturn/src/lib.rs index 09ab272d20ea70916b7049989043526dbf3aad0d..4b15e1eae022f15afde5c83582262eafef693159 100644 --- a/bash-5.1/builtins_rust/rreturn/src/lib.rs +++ b/bash-5.1/builtins_rust/rreturn/src/lib.rs @@ -1,28 +1,31 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use libc::{c_int, c_char, c_long, c_ulong}; -use rcommon::{r_get_exitstat,WordList}; +use libc::{c_char, c_int, c_long, c_ulong}; +use rcommon::{r_get_exitstat, WordList}; include!(concat!("intercdep.rs")); use rhelp::r_builtin_help; #[no_mangle] pub extern "C" fn r_return_builtin(list: *mut WordList) -> i32 { + unsafe { + if !list.is_null() + && !(*list).word.is_null() + && libc::strcmp((*((*list).word)).word, "--help\0".as_ptr() as *const c_char) == 0 + { + r_builtin_help(); + return EX_USAGE; + } -unsafe { - if !list.is_null() && !(*list).word.is_null() && - libc::strcmp((*((*list).word)).word, "--help\0".as_ptr() as *const c_char) == 0 { - r_builtin_help (); - return EX_USAGE; + return_catch_value = r_get_exitstat(list); + if return_catch_flag != 0 { + siglongjmp(std::mem::transmute(&return_catch), 1); + } else { + builtin_error( + "can only `return' from a function or sourced script\0".as_ptr() as *const c_char, + ); + return EX_USAGE; + } } - - return_catch_value = r_get_exitstat(list); - if return_catch_flag != 0 { - siglongjmp(std::mem::transmute(&return_catch), 1); - } else { - builtin_error("can only `return' from a function or sourced script\0".as_ptr() as *const c_char); - return EX_USAGE; - } -} return EXECUTION_SUCCESS; } diff --git a/bash-5.1/builtins_rust/set/src/lib.rs b/bash-5.1/builtins_rust/set/src/lib.rs index ee9ee4299c30e2e2660fbc5f6392331e5817a3a8..3fac789d6b5153594f896734ea7f89c65dd8952d 100644 --- a/bash-5.1/builtins_rust/set/src/lib.rs +++ b/bash-5.1/builtins_rust/set/src/lib.rs @@ -1,218 +1,214 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later extern crate libc; extern crate nix; -use std::ffi::CStr; -use std::ffi::CString; -use std::ptr; -use std::mem; -use std::io; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN,r_builtin_usage, r_savestring}; +use std::ffi::{CStr, CString}; +use std::{ptr, mem, io}; +use rcommon::{ + r_builtin_usage, r_savestring, WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, + EX_NOEXEC, EX_NOTFOUND, EX_USAGE, SUBSHELL_PAREN, +}; use rhelp::r_builtin_help; #[macro_export] macro_rules! FLAG_UNKNOWN { - () => {0 as *mut i32} + () => { + 0 as *mut i32 + }; } #[macro_export] -macro_rules! MINUS_O_FORMAT{ - () => {CString::new("%-15s\t%s\n")} +macro_rules! MINUS_O_FORMAT { + () => { + CString::new("%-15s\t%s\n") + }; } #[macro_export] - macro_rules! GET_BINARY_O_OPTION_VALUE { - ($a:expr,$b:expr) =>{ +macro_rules! GET_BINARY_O_OPTION_VALUE { + ($a:expr,$b:expr) => { if (o_options[$a as usize].get_func).is_some() { - (Some( - (o_options[$a as usize].get_func) - .expect("non-null function pointer"), - )) - .expect("non-null function pointer")($b) - } else { - *o_options[$a as usize].variable - } - } + (Some((o_options[$a as usize].get_func).expect("non-null function pointer"))) + .expect("non-null function pointer")($b) + } else { + *o_options[$a as usize].variable + } + }; } #[macro_export] macro_rules! SET_BINARY_O_OPTION_VALUE { - ($a:expr,$onoff:expr,$c:expr) =>{ - unsafe { - if (o_options[ $a as usize].set_func).is_some() { - (Some( - (o_options[$a as usize].set_func) - .expect("non-null function pointer"), - )) - .expect("non-null function pointer")($onoff, $c) - } - else { - $onoff == FLAG_ON!(); - let b = $onoff; - *o_options[$a as usize].variable = b; - *o_options[$a as usize].variable - } - } - } + ($a:expr,$onoff:expr,$c:expr) => { + unsafe { + if (o_options[$a as usize].set_func).is_some() { + (Some((o_options[$a as usize].set_func).expect("non-null function pointer"))) + .expect("non-null function pointer")($onoff, $c) + } else { + $onoff == FLAG_ON!(); + let b = $onoff; + *o_options[$a as usize].variable = b; + *o_options[$a as usize].variable + } + } + }; } #[macro_export] macro_rules! N_O_OPTIONS { - () => { - (std::mem::size_of::<[opp;28]>() as usize - / std::mem::size_of::() as usize) - } + () => { + (std::mem::size_of::<[opp; 28]>() as usize / std::mem::size_of::() as usize) + }; } #[macro_export] -macro_rules! FLAG_ON{ - () =>{ - b'-' as i32 - } +macro_rules! FLAG_ON { + () => { + b'-' as i32 + }; } #[macro_export] -macro_rules! FLAG_OFF{ - () =>{ - b'+' as i32 - } +macro_rules! FLAG_OFF { + () => { + b'+' as i32 + }; } #[macro_export] -macro_rules! VUNSETATTR{ - ($var:expr,$attr:expr) => { - (*$var).attributes = (*$var).attributes & !(&$attr); - (*$var).attributes - } +macro_rules! VUNSETATTR { + ($var:expr,$attr:expr) => { + (*$var).attributes = (*$var).attributes & !(&$attr); + (*$var).attributes + }; } #[macro_export] macro_rules! att_exported { - () => { - 0x0000001 - } + () => { + 0x0000001 + }; } #[macro_export] -macro_rules! exported_p { - ($var:expr) => { - (*$var).attributes & att_exported!() - } +macro_rules! exported_p { + ($var:expr) => { + (*$var).attributes & att_exported!() + }; } #[macro_export] macro_rules! VSETATTR { - ($var:expr,$attr:expr) => { - (*$var).attributes = (*$var).attributes | (&$attr); - (*$var).attributes - } + ($var:expr,$attr:expr) => { + (*$var).attributes = (*$var).attributes | (&$attr); + (*$var).attributes + }; } #[macro_export] -macro_rules! imported_p { - ($var:expr) => { - (*$var).attributes & att_imported!() - } +macro_rules! imported_p { + ($var:expr) => { + (*$var).attributes & att_imported!() + }; } #[macro_export] macro_rules! att_imported { - () => { - 0x0008000 - } + () => { + 0x0008000 + }; } #[macro_export] -macro_rules! att_assoc{ - () => { - 0x0000040 - } +macro_rules! att_assoc { + () => { + 0x0000040 + }; } #[macro_export] macro_rules! assoc_p { - ($var:expr) => { - (*$var).attributes & att_assoc!() - } + ($var:expr) => { + (*$var).attributes & att_assoc!() + }; } #[macro_export] macro_rules! array_p { - ($var:expr) => { - (*$var).attributes & att_array!() - } + ($var:expr) => { + (*$var).attributes & att_array!() + }; } #[macro_export] -macro_rules! non_unsettable_p { - ($var:expr) => { - (*$var).attributes & att_nounset!() - } +macro_rules! non_unsettable_p { + ($var:expr) => { + (*$var).attributes & att_nounset!() + }; } #[macro_export] macro_rules! readonly_p { - ($var:expr) => { - (*$var).attributes & att_readonly!() - } + ($var:expr) => { + (*$var).attributes & att_readonly!() + }; } #[macro_export] macro_rules! nameref_p { - ($var:expr) => { - (*$var).attributes & att_nameref!() - } + ($var:expr) => { + (*$var).attributes & att_nameref!() + }; } #[macro_export] macro_rules! nameref_cell { - ($var:expr) => { - (*$var).value - } + ($var:expr) => { + (*$var).value + }; } #[macro_export] -macro_rules! att_nameref{ - () => { - 0x0000800 - } +macro_rules! att_nameref { + () => { + 0x0000800 + }; } #[macro_export] -macro_rules! att_readonly{ - () => { - 0x0000002 - } +macro_rules! att_readonly { + () => { + 0x0000002 + }; } #[macro_export] macro_rules! att_nounset { - () => { - 0x0002000 - } + () => { + 0x0002000 + }; } #[macro_export] macro_rules! name_cell { - ($var:expr) => { - (*$var).name - } + ($var:expr) => { + (*$var).name + }; } #[macro_export] -macro_rules! att_array{ - () => { - 0x0000004 - } +macro_rules! att_array { + () => { + 0x0000004 + }; } #[macro_export] macro_rules! value_cell { - ($var:expr) => { - (*$var).value - } + ($var:expr) => { + (*$var).value + }; } #[derive(Copy, Clone)] @@ -229,23 +225,14 @@ pub struct variable { #[derive(Copy, Clone)] #[repr(C)] - pub struct opp{ - name : *mut libc::c_char, - letter : i32, - variable : *mut i32, - set_func : Option::, - get_func : Option::, +pub struct opp { + name: *mut libc::c_char, + letter: i32, + variable: *mut i32, + set_func: Option, + get_func: Option, } -// #[deny(missing_fragment_specifier)] -// #[macro_export] -// macro_rules! STREQ{ -// ($a:expr,$b:expr) =>{ -// (*$a==*$b) && (libc::strcmp($a,$b)==0) -// } -// } - - #[macro_export] macro_rules! FLAG_ERROR{ () => {-1} @@ -262,632 +249,466 @@ macro_rules! VA_ONEWORD { } #[no_mangle] -pub static mut o_options : [opp ; 28] = unsafe {[ - { - opp{ - name : b"allexport\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'a' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - > - (0 as *const libc::c_void as *mut libc::c_void), - get_func : - std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), - } - }, - - { - opp{ - name : b"braceexpand\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'B' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func: - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::,> - (0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"emacs\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'\0' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : Some(set_edit_mode), - get_func : Some(get_edit_mode) - } - }, - - { - opp{ - name : b"errexit\0" as *const u8 as *const libc::c_char as *mut libc::c_char , - letter : b'e' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp { - name : b"errtrace\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'E' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp { - name : b"functrace\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'T' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp { - name : b"hashall\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'h' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"histexpand\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'H' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"history\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'\0' as i32, - // variable : 0 as *const libc::c_void - // as *mut libc::c_void - // as *mut i32, - variable : &enable_history_list as *const i32 as *mut i32, - set_func : Some (bash_set_history), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"ignoreeof\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'\0' as i32, - /*variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, */ - variable : &ignoreeof as *const i32 as *mut i32, - set_func : Some (set_ignoreeof), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"interactive-comments\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'\0' as i32, - /*variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, */ - variable : &interactive_comments as *const i32 as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"keyword\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'k' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"monitor\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'm' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"noclobber\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'C' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"noexec\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'n' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"noglob\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'f' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"nolog\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'\0' as i32, - /*variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, */ - variable : &dont_save_function_defs as *const i32 as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"notify\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'b' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"nounset\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'u' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"onecmd\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b't' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"physical\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'P' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"pipefail\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'\0' as i32, - /*variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, */ - variable : &pipefail_opt as *const i32 as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"posix\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'\0' as i32, - /*variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, */ - variable : &posixly_correct as *const libc::c_int as *mut libc::c_int, - set_func : Some(set_posix_mode), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"privileged\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'p' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"verbose\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'v' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : b"vi\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'\0' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : Some(set_edit_mode), //set_edit_mode as *mut setopt_set_func_t ,// unsafe {&mut set_edit_mode}, - get_func : Some(get_edit_mode) - } - }, - - { - opp{ - name : b"xtrace\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - letter : b'x' as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - }, - - { - opp{ - name : std::ptr::null_mut() , - letter : 0 as i32, - variable : 0 as *const libc::c_void - as *mut libc::c_void - as *mut i32, - set_func : - ::std::mem::transmute::< *mut libc::c_void, - Option::, - > (0 as *const libc::c_void as *mut libc::c_void), - get_func : - ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void) - } - } - -]}; +pub static mut o_options: [opp; 28] = unsafe { + [ + { + opp { + name: b"allexport\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'a' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"braceexpand\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'B' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"emacs\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'\0' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: Some(set_edit_mode), + get_func: Some(get_edit_mode), + } + }, + { + opp { + name: b"errexit\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'e' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"errtrace\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'E' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"functrace\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'T' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"hashall\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'h' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"histexpand\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'H' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"history\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'\0' as i32, + // variable : 0 as *const libc::c_void + // as *mut libc::c_void + // as *mut i32, + variable: &enable_history_list as *const i32 as *mut i32, + set_func: Some(bash_set_history), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"ignoreeof\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'\0' as i32, + /*variable : 0 as *const libc::c_void + as *mut libc::c_void + as *mut i32, */ + variable: &ignoreeof as *const i32 as *mut i32, + set_func: Some(set_ignoreeof), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"interactive-comments\0" as *const u8 as *const libc::c_char + as *mut libc::c_char, + letter: b'\0' as i32, + /*variable : 0 as *const libc::c_void + as *mut libc::c_void + as *mut i32, */ + variable: &interactive_comments as *const i32 as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"keyword\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'k' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"monitor\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'm' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"noclobber\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'C' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"noexec\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'n' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"noglob\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'f' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"nolog\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'\0' as i32, + /*variable : 0 as *const libc::c_void + as *mut libc::c_void + as *mut i32, */ + variable: &dont_save_function_defs as *const i32 as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"notify\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'b' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"nounset\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'u' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"onecmd\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b't' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"physical\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'P' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"pipefail\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'\0' as i32, + /*variable : 0 as *const libc::c_void + as *mut libc::c_void + as *mut i32, */ + variable: &pipefail_opt as *const i32 as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"posix\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'\0' as i32, + /*variable : 0 as *const libc::c_void + as *mut libc::c_void + as *mut i32, */ + variable: &posixly_correct as *const libc::c_int as *mut libc::c_int, + set_func: Some(set_posix_mode), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"privileged\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'p' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"verbose\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'v' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: b"vi\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'\0' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: Some(set_edit_mode), //set_edit_mode as *mut setopt_set_func_t ,// unsafe {&mut set_edit_mode}, + get_func: Some(get_edit_mode), + } + }, + { + opp { + name: b"xtrace\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + letter: b'x' as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + { + opp { + name: std::ptr::null_mut(), + letter: 0 as i32, + variable: 0 as *const libc::c_void as *mut libc::c_void as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + get_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), + } + }, + ] +}; extern "C" { - fn setopt_set_func_t (i :i32 , name : *mut libc::c_char) -> i32; - fn setopt_get_func_t (name : *mut libc::c_char)-> i32; - fn xmalloc(_: u64) -> *mut libc::c_void; - fn unbind_variable_noref(_: *const libc::c_char) -> i32; - fn unbind_nameref(_: *const libc::c_char) -> i32; - fn unbind_func(_: *const libc::c_char) -> i32; - fn strvec_create(_: i32) -> *mut *mut libc::c_char; - fn all_shell_variables() -> *mut *mut SHELL_VAR; - fn print_var_list(_: *mut *mut SHELL_VAR); - fn print_func_list(_: *mut *mut SHELL_VAR); - fn change_flag(_: i32, _: i32) -> i32; - fn strlen(_: *const libc::c_char) -> u64; - fn builtin_usage(); - fn find_function (name:* const libc::c_char)->* mut SHELL_VAR; - fn bind_variable( - _: *const libc::c_char, - _: *mut libc::c_char, - _: i32, - ) -> *mut SHELL_VAR; + fn setopt_set_func_t(i: i32, name: *mut libc::c_char) -> i32; + fn setopt_get_func_t(name: *mut libc::c_char) -> i32; + fn xmalloc(_: u64) -> *mut libc::c_void; + fn unbind_variable_noref(_: *const libc::c_char) -> i32; + fn unbind_nameref(_: *const libc::c_char) -> i32; + fn unbind_func(_: *const libc::c_char) -> i32; + fn strvec_create(_: i32) -> *mut *mut libc::c_char; + fn all_shell_variables() -> *mut *mut SHELL_VAR; + fn print_var_list(_: *mut *mut SHELL_VAR); + fn print_func_list(_: *mut *mut SHELL_VAR); + fn change_flag(_: i32, _: i32) -> i32; + fn strlen(_: *const libc::c_char) -> u64; + fn builtin_usage(); + fn find_function(name: *const libc::c_char) -> *mut SHELL_VAR; + fn bind_variable(_: *const libc::c_char, _: *mut libc::c_char, _: i32) -> *mut SHELL_VAR; fn find_variable(_: *const libc::c_char) -> *mut SHELL_VAR; - fn rl_variable_bind (_: *const libc::c_char, _: *const libc::c_char) -> i32; - fn find_variable_last_nameref( - _: *const libc::c_char, - _: i32, - ) -> *mut SHELL_VAR; + fn rl_variable_bind(_: *const libc::c_char, _: *const libc::c_char) -> i32; + fn find_variable_last_nameref(_: *const libc::c_char, _: i32) -> *mut SHELL_VAR; + + fn extract_colon_unit(_: *mut libc::c_char, _: *mut i32) -> *mut libc::c_char; - fn extract_colon_unit( - _: *mut libc::c_char, - _: *mut i32, - ) -> *mut libc::c_char; - - fn valid_array_reference ( - _ : *const libc::c_char , - _ : i32 - )-> i32; - - fn array_variable_part ( - _: *const libc::c_char, - _: i32, - _:*mut *mut libc::c_char, - _:*mut i32 + fn valid_array_reference(_: *const libc::c_char, _: i32) -> i32; + + fn array_variable_part( + _: *const libc::c_char, + _: i32, + _: *mut *mut libc::c_char, + _: *mut i32, ) -> *mut SHELL_VAR; - fn all_shell_functions () -> *mut *mut SHELL_VAR; - fn num_posix_options() -> i32; - fn find_flag(_: i32) -> *mut i32; - fn internal_getopt (list:*mut WordList , opts:*mut libc::c_char)->i32; - fn get_posix_options(_: *mut libc::c_char) -> *mut libc::c_char; - fn sh_chkwrite (_:i32)->i32; - fn reset_internal_getopt(); - fn sh_invalidopt (value:* mut libc::c_char); - fn sv_ignoreeof (_ : *mut libc::c_char); - fn sv_strict_posix (_: *mut libc::c_char); - fn with_input_from_stdin(); - fn sh_invalidoptname (value:* mut libc::c_char); - fn bash_history_enable(); - fn load_history(); - fn bash_history_disable(); - fn remember_args (list:* mut WordList, argc:i32); - fn sh_invalidid (value:* mut libc::c_char); - fn legal_identifier (_:*const libc::c_char) -> i32; - fn unbind_array_element(_: *mut SHELL_VAR, _:*mut libc::c_char,_: i32) -> i32; - fn unbind_variable (_: *const libc::c_char) -> i32; - fn with_input_from_stream (_:libc::FILE , _: *const libc::c_char); - fn stupidly_hack_special_variables (_ : *mut libc::c_char); - fn builtin_error(_: *const libc::c_char, _: ...); - static mut posixly_correct : i32; - static mut enable_history_list : i32; - static mut ignoreeof : i32 ; - static mut interactive_comments : i32; - static mut dont_save_function_defs : i32; - static mut pipefail_opt : i32; - static mut mark_modified_vars: i32; - static mut remember_on_history: i32; - static mut optflags: [libc::c_char; 0]; - static mut list_opttype:i32; - static mut no_line_editing :i32; - static mut interactive : i32; - static mut interactive_shell : i32; - static mut history_lines_this_session : i32; - static mut rl_editing_mode : i32; - static mut list_optopt :i8; - static mut loptend:*mut WordList; - static assoc_expand_once:i32; - static mut stdin : libc::FILE; + fn all_shell_functions() -> *mut *mut SHELL_VAR; + fn num_posix_options() -> i32; + fn find_flag(_: i32) -> *mut i32; + fn internal_getopt(list: *mut WordList, opts: *mut libc::c_char) -> i32; + fn get_posix_options(_: *mut libc::c_char) -> *mut libc::c_char; + fn sh_chkwrite(_: i32) -> i32; + fn reset_internal_getopt(); + fn sh_invalidopt(value: *mut libc::c_char); + fn sv_ignoreeof(_: *mut libc::c_char); + fn sv_strict_posix(_: *mut libc::c_char); + fn with_input_from_stdin(); + fn sh_invalidoptname(value: *mut libc::c_char); + fn bash_history_enable(); + fn load_history(); + fn bash_history_disable(); + fn remember_args(list: *mut WordList, argc: i32); + fn sh_invalidid(value: *mut libc::c_char); + fn legal_identifier(_: *const libc::c_char) -> i32; + fn unbind_array_element(_: *mut SHELL_VAR, _: *mut libc::c_char, _: i32) -> i32; + fn unbind_variable(_: *const libc::c_char) -> i32; + fn with_input_from_stream(_: libc::FILE, _: *const libc::c_char); + fn stupidly_hack_special_variables(_: *mut libc::c_char); + fn builtin_error(_: *const libc::c_char, _: ...); + static mut posixly_correct: i32; + static mut enable_history_list: i32; + static mut ignoreeof: i32; + static mut interactive_comments: i32; + static mut dont_save_function_defs: i32; + static mut pipefail_opt: i32; + static mut mark_modified_vars: i32; + static mut remember_on_history: i32; + static mut optflags: [libc::c_char; 0]; + static mut list_opttype: i32; + static mut no_line_editing: i32; + static mut interactive: i32; + static mut interactive_shell: i32; + static mut history_lines_this_session: i32; + static mut rl_editing_mode: i32; + static mut list_optopt: i8; + static mut loptend: *mut WordList; + static assoc_expand_once: i32; + static mut stdin: libc::FILE; } -type setopt_set_func_t = unsafe extern "C" fn ( - i :i32 , - name : *mut libc::c_char -) -> i32; +type setopt_set_func_t = unsafe extern "C" fn(i: i32, name: *mut libc::c_char) -> i32; -type setopt_get_func_t = unsafe extern "C" fn ( - name : *mut libc::c_char -) -> i32; +type setopt_get_func_t = unsafe extern "C" fn(name: *mut libc::c_char) -> i32; -type sh_var_value_func_t = unsafe extern "C" fn ( - _ : *mut SHELL_VAR -) -> *mut SHELL_VAR; +type sh_var_value_func_t = unsafe extern "C" fn(_: *mut SHELL_VAR) -> *mut SHELL_VAR; -type sh_var_assign_func_t = unsafe extern "C" fn ( - _ : *mut SHELL_VAR , - _ : *mut libc::c_char, - _ : arrayind_t, - _ : *mut libc::c_char +type sh_var_assign_func_t = unsafe extern "C" fn( + _: *mut SHELL_VAR, + _: *mut libc::c_char, + _: arrayind_t, + _: *mut libc::c_char, ) -> *mut SHELL_VAR; //type check = String::from_utf8(cc::Build::new().file("../builtins/set.def").expand()).unwrap(); @@ -897,48 +718,47 @@ static mut previous_option_value: i32 = 0; pub type SHELL_VAR = variable; pub type arrayind_t = i64; -unsafe fn STREQ( a:* const libc::c_char, b:* const libc::c_char)->bool { - //println!("hahhahahhahahah"); - //println!("a is {:?}, b is {:?}",CStr::from_ptr(a),CStr::from_ptr(b)); - return (*a ==*b) && (libc::strcmp(a, b) == 0); +unsafe fn STREQ(a: *const libc::c_char, b: *const libc::c_char) -> bool { + //println!("hahhahahhahahah"); + //println!("a is {:?}, b is {:?}",CStr::from_ptr(a),CStr::from_ptr(b)); + return (*a == *b) && (libc::strcmp(a, b) == 0); } -unsafe fn find_minus_o_option (mut name : *mut libc::c_char) -> i32 { - //println! ("enter find_minus_o_option"); - let mut i : i32 = 0; - for j in 0..N_O_OPTIONS!()-1 { - i = j as i32; - //println! ("i is {}, j is {}",i,j); - let ooo = o_options[j]; - //println! ("i is {}, j is {}",i,j); - if STREQ(name, o_options[j as usize].name) { - return i; +unsafe fn find_minus_o_option(mut name: *mut libc::c_char) -> i32 { + //println! ("enter find_minus_o_option"); + let mut i: i32 = 0; + for j in 0..N_O_OPTIONS!() - 1 { + i = j as i32; + //println! ("i is {}, j is {}",i,j); + let ooo = o_options[j]; + //println! ("i is {}, j is {}",i,j); + if STREQ(name, o_options[j as usize].name) { + return i; + } } - } - -1 + -1 } -unsafe fn minus_o_option_value (name : *mut libc::c_char) -> i32{ - let mut i : i32 = 0; - let mut on_or_off : *mut i32 = 0 as *mut i32; +unsafe fn minus_o_option_value(name: *mut libc::c_char) -> i32 { + let mut i: i32 = 0; + let mut on_or_off: *mut i32 = 0 as *mut i32; - i = find_minus_o_option (name); - if i < 0 { - return -1; - } - let options = o_options [i as usize ]; - if unsafe {options.letter != 0}{ - if on_or_off == FLAG_UNKNOWN!() { + i = find_minus_o_option(name); + if i < 0 { return -1; } - return unsafe {*on_or_off}; + let options = o_options[i as usize]; + if unsafe { options.letter != 0 } { + if on_or_off == FLAG_UNKNOWN!() { + return -1; + } + return unsafe { *on_or_off }; + } else { + unsafe { GET_BINARY_O_OPTION_VALUE!(i, name) } } - else{ - unsafe {GET_BINARY_O_OPTION_VALUE!(i, name)} - } } -unsafe fn print_minus_o_option (name : *mut libc::c_char, value : i32, pflag : i32){ +unsafe fn print_minus_o_option(name: *mut libc::c_char, value: i32, pflag: i32) { if pflag == 0 { if value > 0 { println!("{:?} {:?}", CStr::from_ptr(name), CStr::from_ptr(on)); @@ -1109,24 +929,26 @@ unsafe extern "C" fn set_ignoreeof (on_or_off : i32 , option_name : *mut libc::c return 0; } -unsafe extern "C" fn set_posix_mode (on_or_off : i32 , option_name : *mut libc::c_char) -> i32 { - if (on_or_off == FLAG_ON!() && posixly_correct != 0 ) || - (on_or_off == FLAG_OFF!() && posixly_correct == 0){ +unsafe extern "C" fn set_posix_mode(on_or_off: i32, option_name: *mut libc::c_char) -> i32 { + if (on_or_off == FLAG_ON!() && posixly_correct != 0) + || (on_or_off == FLAG_OFF!() && posixly_correct == 0) + { + return 0; + } + on_or_off == FLAG_ON!(); + posixly_correct = on_or_off; + + if posixly_correct != 0 { + unbind_variable_noref(b"POSIXLY_CORRECT\0" as *const u8 as *const libc::c_char); + } else { + bind_variable( + b"POSIXLY_CORRECT\0" as *const u8 as *const libc::c_char, + b"y\0" as *const u8 as *mut libc::c_char, + 0, + ); + } + sv_strict_posix(b"POSIXLY_CORRECT\0" as *const u8 as *mut libc::c_char); return 0; - } - on_or_off == FLAG_ON!(); - posixly_correct = on_or_off ; - - if posixly_correct != 0 { - unbind_variable_noref(b"POSIXLY_CORRECT\0" as *const u8 as *const libc::c_char); - } - - else { - bind_variable (b"POSIXLY_CORRECT\0" as *const u8 as *const libc::c_char, - b"y\0" as *const u8 as *mut libc::c_char, 0); - } - sv_strict_posix (b"POSIXLY_CORRECT\0" as *const u8 as *mut libc::c_char); - return 0; } unsafe extern "C" fn set_edit_mode (on_or_off : i32 , option_name : *mut libc::c_char) -> i32{ @@ -1230,102 +1052,100 @@ unsafe fn set_minus_o_option (on_or_off : i32, option_name : *mut libc::c_char) } } -unsafe fn print_all_shell_variables (){ - - let mut vars = 0 as *mut *mut SHELL_VAR; +unsafe fn print_all_shell_variables() { + let mut vars = 0 as *mut *mut SHELL_VAR; - vars = all_shell_variables (); - if vars != std::ptr::null_mut() { - print_var_list (vars); - libc::free (*vars as *mut libc::c_void ); + vars = all_shell_variables(); + if vars != std::ptr::null_mut() { + print_var_list(vars); + libc::free(*vars as *mut libc::c_void); } - /* POSIX.2 does not allow function names and definitions to be output when - `set' is invoked without options (PASC Interp #202). */ - if posixly_correct == 0 { - vars = all_shell_functions (); - if vars != std::ptr::null_mut() { - print_func_list (vars); - libc::free (*vars as *mut libc::c_void ); - } + /* POSIX.2 does not allow function names and definitions to be output when + `set' is invoked without options (PASC Interp #202). */ + if posixly_correct == 0 { + vars = all_shell_functions(); + if vars != std::ptr::null_mut() { + print_func_list(vars); + libc::free(*vars as *mut libc::c_void); + } } } -pub unsafe fn r_set_shellopts () { - //println!("set shellopts by huanhuan"); - let mut value : *mut libc::c_char; - let mut tflag : [libc::c_char;N_O_OPTIONS!()] = [0 as libc::c_char ;N_O_OPTIONS!()]; - let mut vsize : i32 = 0; - let mut i: i32 = 0; - let mut vptr : i32 ; - let mut ip :*mut i32 ; - let mut exported : i32; - - let mut v : *mut SHELL_VAR; - for j in 0..N_O_OPTIONS!() { - i = j as i32; - if o_options[i as usize].name != std::ptr::null_mut(){ - tflag[i as usize] = 0; - if o_options[i as usize].letter != 0 { - ip = find_flag (o_options[i as usize].letter); - if ip != std::ptr::null_mut() && unsafe {*ip} != 0{ - vsize = vsize + unsafe {strlen (o_options[i as usize].name) as u64 as u32 as i32 } + 1; - tflag[i as usize] = 1; - } - } - else if unsafe {GET_BINARY_O_OPTION_VALUE!(i,o_options[i as usize].name)} != 0{ - vsize = vsize + unsafe {strlen (o_options[i as usize].name) as i32} + 1; - tflag[i as usize] = 1; - } +pub unsafe fn r_set_shellopts() { + //println!("set shellopts by huanhuan"); + let mut value: *mut libc::c_char; + let mut tflag: [libc::c_char; N_O_OPTIONS!()] = [0 as libc::c_char; N_O_OPTIONS!()]; + let mut vsize: i32 = 0; + let mut i: i32 = 0; + let mut vptr: i32; + let mut ip: *mut i32; + let mut exported: i32; + + let mut v: *mut SHELL_VAR; + for j in 0..N_O_OPTIONS!() { + i = j as i32; + if o_options[i as usize].name != std::ptr::null_mut() { + tflag[i as usize] = 0; + if o_options[i as usize].letter != 0 { + ip = find_flag(o_options[i as usize].letter); + if ip != std::ptr::null_mut() && unsafe { *ip } != 0 { + vsize = vsize + + unsafe { strlen(o_options[i as usize].name) as u64 as u32 as i32 } + + 1; + tflag[i as usize] = 1; + } + } else if unsafe { GET_BINARY_O_OPTION_VALUE!(i, o_options[i as usize].name) } != 0 { + vsize = vsize + unsafe { strlen(o_options[i as usize].name) as i32 } + 1; + tflag[i as usize] = 1; + } + } } - } - value = unsafe {xmalloc((vsize + 1) as u32 as u64) as *mut libc::c_char}; - vptr = 0; + value = unsafe { xmalloc((vsize + 1) as u32 as u64) as *mut libc::c_char }; + vptr = 0; - for j in 0..N_O_OPTIONS!(){ - i = j as i32; - if o_options[i as usize].name != std::ptr::null_mut(){ - if tflag[i as usize] != 0 as libc::c_char { - unsafe { - libc::strcpy (value.offset(vptr as isize), o_options[i as usize].name); - vptr = vptr + strlen (o_options[i as usize].name) as u64 as i64 as i32; + for j in 0..N_O_OPTIONS!() { + i = j as i32; + if o_options[i as usize].name != std::ptr::null_mut() { + if tflag[i as usize] != 0 as libc::c_char { + unsafe { + libc::strcpy(value.offset(vptr as isize), o_options[i as usize].name); + vptr = vptr + strlen(o_options[i as usize].name) as u64 as i64 as i32; + } + *value.offset(vptr as isize) = b':' as libc::c_char; + vptr = vptr + 1; + } } - *value.offset(vptr as isize) = b':' as libc::c_char; - vptr = vptr+1; - } } - } - if vptr > 0 { - vptr = vptr-1; - } - *value.offset(vptr as isize) = b'\0' as libc::c_char; + if vptr > 0 { + vptr = vptr - 1; + } + *value.offset(vptr as isize) = b'\0' as libc::c_char; - v = find_variable (b"SHELLOPTS\0" as *const u8 as *mut libc::c_char); + v = find_variable(b"SHELLOPTS\0" as *const u8 as *mut libc::c_char); - /* Turn off the read-only attribute so we can bind the new value, and - note whether or not the variable was exported. */ - if v != std::ptr::null_mut(){ - VUNSETATTR!(v, att_readonly!()); - exported = exported_p!(v); + /* Turn off the read-only attribute so we can bind the new value, and + note whether or not the variable was exported. */ + if v != std::ptr::null_mut() { + VUNSETATTR!(v, att_readonly!()); + exported = exported_p!(v); + } else { + exported = 0; } - else { - exported = 0; - } - v = bind_variable (b"SHELLOPTS\0" as *const u8 as *mut libc::c_char, value, 0); - /* Turn the read-only attribute back on, and turn off the export attribute - if it was set implicitly by mark_modified_vars and SHELLOPTS was not - exported before we bound the new value. */ - - VSETATTR!(v, att_readonly!()); - - if mark_modified_vars!= 0 && exported != 0 && exported_p!(v) != 0 { - - VUNSETATTR!(v, att_exported!()); - } - libc::free (value as *mut libc::c_void ); + v = bind_variable(b"SHELLOPTS\0" as *const u8 as *mut libc::c_char, value, 0); + /* Turn the read-only attribute back on, and turn off the export attribute + if it was set implicitly by mark_modified_vars and SHELLOPTS was not + exported before we bound the new value. */ + VSETATTR!(v, att_readonly!()); + + if mark_modified_vars != 0 && exported != 0 && exported_p!(v) != 0 { + VUNSETATTR!(v, att_exported!()); + } + libc::free(value as *mut libc::c_void); } + unsafe fn parse_shellopts (value : *mut libc::c_char) { let mut vname : *mut libc::c_char; let mut vptr : i32 = 0; @@ -1339,39 +1159,38 @@ unsafe fn parse_shellopts (value : *mut libc::c_char) { }; } -unsafe fn initialize_shell_options (no_shellopts : i32) { - let mut temp: *mut libc::c_char; - let mut var : *mut SHELL_VAR = 0 as *mut SHELL_VAR; - - if no_shellopts == 0 { - var = find_variable (b"SHELLOPTS\0" as *const u8 as *const libc::c_char); - /* set up any shell options we may have inherited. */ - if !var.is_null() && imported_p!(var) != 0 { - if assoc_p! (var) != 0 || array_p !(var) != 0{ - temp = std::ptr::null_mut(); - } - else { - temp = r_savestring(value_cell!(var)); - } +unsafe fn initialize_shell_options(no_shellopts: i32) { + let mut temp: *mut libc::c_char; + let mut var: *mut SHELL_VAR = 0 as *mut SHELL_VAR; + + if no_shellopts == 0 { + var = find_variable(b"SHELLOPTS\0" as *const u8 as *const libc::c_char); + /* set up any shell options we may have inherited. */ + if !var.is_null() && imported_p!(var) != 0 { + if assoc_p!(var) != 0 || array_p!(var) != 0 { + temp = std::ptr::null_mut(); + } else { + temp = r_savestring(value_cell!(var)); + } - if temp != std::ptr::null_mut() { - parse_shellopts (temp); - libc::free (temp as *mut libc::c_void ); - } - } + if temp != std::ptr::null_mut() { + parse_shellopts(temp); + libc::free(temp as *mut libc::c_void); + } + } } - /* Set up the $SHELLOPTS variable. */ - r_set_shellopts (); + /* Set up the $SHELLOPTS variable. */ + r_set_shellopts(); } -unsafe fn reset_shell_options () { - pipefail_opt = 0; - ignoreeof = 0 ; - posixly_correct = 0 ; - dont_save_function_defs = 0; - enable_history_list = 1 ; - remember_on_history = enable_history_list ; +unsafe fn reset_shell_options() { + pipefail_opt = 0; + ignoreeof = 0; + posixly_correct = 0; + dont_save_function_defs = 0; + enable_history_list = 1; + remember_on_history = enable_history_list; } #[no_mangle] @@ -1433,10 +1252,7 @@ unsafe fn reset_shell_options () { r_builtin_help(); return EX_USAGE; } - // unsafe { - // builtin_usage (); - // } - // return EX_USAGE; + } } // opt = unsafe {internal_getopt(list, optflags.as_ptr() as *mut libc::c_char)}; @@ -1553,6 +1369,7 @@ unsafe fn reset_shell_options () { continue; } + unsafe { list = (*list).next; /* Skip over option name. */ } @@ -1616,202 +1433,212 @@ unsafe fn reset_shell_options () { } #[no_mangle] -pub extern "C" fn r_unset_builtin(mut list: *mut WordList) -> i32 { - let mut unset_function: i32 = 0; - let mut unset_variable: i32 = 0; - let mut unset_array: i32 = 0; - let mut opt: i32 = 0; - let mut nameref: i32 = 0; - let mut any_failed: i32 = 0; - let mut global_unset_func: i32 = 0; - let mut global_unset_var: i32 = 0; - let mut vflags: i32 = 0; - let mut valid_id: i32 = 0; - let mut name: *mut libc::c_char = 0 as *mut libc::c_char; - let mut tname: *mut libc::c_char = 0 as *mut libc::c_char; - - //println!("enter r_unset by huanhuan"); - let mut c_str_fnv = CString::new("fnv").unwrap(); - unsafe { - reset_internal_getopt(); - opt= internal_getopt (list, c_str_fnv.as_ptr() as * mut libc::c_char); - - while opt != -1 { - let optu8:u8= opt as u8; - let optChar:char=char::from(optu8); - match optChar { - 'f'=>{global_unset_func = 1;} - 'v'=>{global_unset_var = 0;} - 'n'=>{nameref = 1;} - _=>{ - if opt == -99 { - r_builtin_help(); - return EX_USAGE; +pub extern "C" fn r_unset_builtin(mut list: *mut WordList) -> i32 { + let mut unset_function: i32 = 0; + let mut unset_variable: i32 = 0; + let mut unset_array: i32 = 0; + let mut opt: i32 = 0; + let mut nameref: i32 = 0; + let mut any_failed: i32 = 0; + let mut global_unset_func: i32 = 0; + let mut global_unset_var: i32 = 0; + let mut vflags: i32 = 0; + let mut valid_id: i32 = 0; + let mut name: *mut libc::c_char = 0 as *mut libc::c_char; + let mut tname: *mut libc::c_char = 0 as *mut libc::c_char; + + //println!("enter r_unset by huanhuan"); + let mut c_str_fnv = CString::new("fnv").unwrap(); + unsafe { + reset_internal_getopt(); + opt = internal_getopt(list, c_str_fnv.as_ptr() as *mut libc::c_char); + + while opt != -1 { + let optu8: u8 = opt as u8; + let optChar: char = char::from(optu8); + match optChar { + 'f' => { + global_unset_func = 1; + } + 'v' => { + global_unset_var = 0; + } + 'n' => { + nameref = 1; + } + _ => { + if opt == -99 { + r_builtin_help(); + return EX_USAGE; + } + builtin_usage(); + return EX_USAGE; + } + } + opt = internal_getopt(list, c_str_fnv.as_ptr() as *mut libc::c_char); } - builtin_usage (); - return EX_USAGE; + //println!("unset func={}, unset val=%{}", global_unset_func, global_unset_var); + + list = loptend; + + if global_unset_func != 0 && global_unset_var != 0 { + builtin_error( + b"cannot simultaneously unset a function and a variable \0" as *const u8 + as *const libc::c_char, + ); + return EXECUTION_FAILURE!(); + } else if unset_function != 0 && nameref != 0 { + nameref = 0; } - } - opt =internal_getopt (list, c_str_fnv.as_ptr() as * mut libc::c_char); - } - //println!("unset func={}, unset val=%{}", global_unset_func, global_unset_var); - list = loptend; + if assoc_expand_once != 0 { + vflags = VA_NOEXPAND!() | VA_ONEWORD!(); + } else { + vflags = 0; + } + while !list.is_null() { + let mut var: *mut SHELL_VAR; + let mut tem: i32 = 0; - if global_unset_func != 0 && global_unset_var != 0 { - builtin_error (b"cannot simultaneously unset a function and a variable \0" as *const u8 - as *const libc::c_char); - return EXECUTION_FAILURE!(); - } - else if unset_function != 0 && nameref != 0 { - nameref = 0; - } + let mut t: *mut libc::c_char = 0 as *mut libc::c_char; - if assoc_expand_once != 0 { - vflags = VA_NOEXPAND!()|VA_ONEWORD!(); - } - else { - vflags = 0; - } - while !list.is_null() { - let mut var : *mut SHELL_VAR; - let mut tem : i32 = 0; + name = (*(*list).word).word; + unset_function = global_unset_func; + unset_variable = global_unset_var; + unset_array = 0; - let mut t : *mut libc::c_char = 0 as *mut libc::c_char; + if !unset_function == 0 && nameref == 0 && valid_array_reference(name, vflags) != 0 { + t = libc::strchr(name, '[' as i32); + *t.offset(1 as isize) = b'\0' as i32 as libc::c_char; + unset_array = unset_array + 1; + } - name = (*(*list).word).word; - unset_function = global_unset_func; - unset_variable = global_unset_var; - unset_array = 0 ; + valid_id = legal_identifier(name); - if !unset_function == 0 && nameref == 0 && valid_array_reference (name, vflags) != 0 { - t = libc::strchr (name, '[' as i32); - *t.offset(1 as isize) = b'\0' as i32 as libc::c_char; - unset_array = unset_array + 1; - } + if global_unset_func == 0 && global_unset_var == 0 && valid_id == 0 { + unset_array = 0; + unset_variable = unset_array; + unset_function = 1; + } - valid_id = legal_identifier (name); + if (unset_function == 0 && valid_id == 0) { + sh_invalidid(name); + any_failed = any_failed + 1; + list = (*list).next; + } - if global_unset_func == 0 && global_unset_var == 0 && valid_id == 0 { - unset_array = 0; - unset_variable = unset_array ; - unset_function = 1; - } + if unset_function != 0 { + var = find_function(name); + } else { + if nameref != 0 { + var = find_variable_last_nameref(name, 0); + } else { + var = find_variable(name); + } + } - if (unset_function == 0 && valid_id == 0) - { - sh_invalidid (name); - any_failed = any_failed + 1; - list = (*list).next; - } - - if unset_function != 0 { - var = find_function (name); - } - else { - if nameref != 0 { - var = find_variable_last_nameref (name, 0) ; - } - else { - var = find_variable (name); - } - } + if var != std::ptr::null_mut() && unset_function == 0 && non_unsettable_p!(var) != 0 { + builtin_error( + b"%s: cannot unset \0" as *const u8 as *const libc::c_char, + name, + ); + any_failed = any_failed + 1; + list = (*list).next; + } - if var != std::ptr::null_mut() && unset_function == 0 && non_unsettable_p!(var) != 0 { - builtin_error (b"%s: cannot unset \0" as *const u8 - as *const libc::c_char, name); - any_failed = any_failed + 1; - list = (*list).next; - } + if var != std::ptr::null_mut() + && unset_function == 0 + && nameref == 0 + && STREQ(name, name_cell!(var)) + { + name = name_cell!(var); + } - if var != std::ptr::null_mut() && unset_function == 0 && nameref == 0 && STREQ (name, name_cell!(var)) { - name = name_cell!(var); - } - - if var == std::ptr::null_mut() && nameref == 0 && unset_variable == 0 && unset_function == 0{ - var = find_function (name); - if var != std::ptr::null_mut() { - unset_function = 1; - } - } + if var == std::ptr::null_mut() + && nameref == 0 + && unset_variable == 0 + && unset_function == 0 + { + var = find_function(name); + if var != std::ptr::null_mut() { + unset_function = 1; + } + } - if var!= std::ptr::null_mut() && readonly_p! (var)!= 0 { - if unset_function != 0 { - builtin_error (b"%s: cannot unset: readonly %s \0 " as *const u8 as *mut libc::c_char, - (*var).name, b"function\0" as *const u8 as *mut libc::c_char); - } - else { - builtin_error (b"%s: cannot unset: readonly %s \0" as *const u8 as *mut libc::c_char, - (*var).name, b"variable\0" as *const u8 as *mut libc::c_char); - } - any_failed = any_failed + 1; - list = (*list).next; - } - // #if defined (ARRAY_VARS) - if var != std::ptr::null_mut() && unset_array != 0 { - /* Let unbind_array_element decide what to do with non-array vars */ - tem = unbind_array_element (var, t, vflags); /* XXX new third arg */ - if tem == -2 && array_p!(var) == 0 && assoc_p! (var) == 0 { - builtin_error (b"%s: not an array variable\0" as *const u8 - as *const libc::c_char, (*var).name); - any_failed = any_failed + 1; - list = (*list).next; - } - else if tem < 0 { - any_failed = any_failed + 1; - } - } - - else { - if var == std::ptr::null_mut() && nameref == 0 && unset_function == 0 { - var = find_variable_last_nameref (name, 0); - if var != std::ptr::null_mut() && nameref_p!(var) != 0 { - if valid_array_reference (nameref_cell!(var), 0) != 0 { - tname = r_savestring(nameref_cell!(var)); - var = array_variable_part (tname, 0, &mut t, &mut 0); - if var != std::ptr::null_mut() { - tem = unbind_array_element (var, t, vflags); /* XXX new third arg */ + if var != std::ptr::null_mut() && readonly_p!(var) != 0 { + if unset_function != 0 { + builtin_error( + b"%s: cannot unset: readonly %s \0 " as *const u8 as *mut libc::c_char, + (*var).name, + b"function\0" as *const u8 as *mut libc::c_char, + ); + } else { + builtin_error( + b"%s: cannot unset: readonly %s \0" as *const u8 as *mut libc::c_char, + (*var).name, + b"variable\0" as *const u8 as *mut libc::c_char, + ); + } + any_failed = any_failed + 1; + list = (*list).next; } - libc::free (tname as *mut libc::c_void ); - } - - else { - tem = unbind_variable(nameref_cell! (var)); - } - } - else { - tem = unbind_variable (name); - } - } - else { - if unset_function != 0 { - tem = unbind_func (name); - } - else if nameref != 0 { - tem = unbind_nameref (name); - } - else { - tem = unbind_variable (name); + // #if defined (ARRAY_VARS) + if var != std::ptr::null_mut() && unset_array != 0 { + /* Let unbind_array_element decide what to do with non-array vars */ + tem = unbind_array_element(var, t, vflags); /* XXX new third arg */ + if tem == -2 && array_p!(var) == 0 && assoc_p!(var) == 0 { + builtin_error( + b"%s: not an array variable\0" as *const u8 as *const libc::c_char, + (*var).name, + ); + any_failed = any_failed + 1; + list = (*list).next; + } else if tem < 0 { + any_failed = any_failed + 1; + } + } else { + if var == std::ptr::null_mut() && nameref == 0 && unset_function == 0 { + var = find_variable_last_nameref(name, 0); + if var != std::ptr::null_mut() && nameref_p!(var) != 0 { + if valid_array_reference(nameref_cell!(var), 0) != 0 { + tname = r_savestring(nameref_cell!(var)); + var = array_variable_part(tname, 0, &mut t, &mut 0); + if var != std::ptr::null_mut() { + tem = unbind_array_element(var, t, vflags); /* XXX new third arg */ + } + libc::free(tname as *mut libc::c_void); + } else { + tem = unbind_variable(nameref_cell!(var)); + } + } else { + tem = unbind_variable(name); + } + } else { + if unset_function != 0 { + tem = unbind_func(name); + } else if nameref != 0 { + tem = unbind_nameref(name); + } else { + tem = unbind_variable(name); + } + } + } + + if tem == -1 && nameref == 0 && unset_function == 0 && unset_variable == 0 { + tem = unbind_func(name); + } + name = (*(*list).word).word; + + if unset_function == 0 { + stupidly_hack_special_variables(name); + } + list = (*list).next; } - } - } - - if tem == -1 && nameref == 0 && unset_function == 0 && unset_variable == 0 { - tem = unbind_func (name); - } - name = (*(*list).word).word; - if unset_function == 0 { - stupidly_hack_special_variables (name); + if any_failed != 0 { + return EXECUTION_FAILURE!(); + } else { + return EXECUTION_SUCCESS!(); + } } - list = (*list).next; - } - - if any_failed != 0 { - return EXECUTION_FAILURE!(); - } - else { - return EXECUTION_SUCCESS!(); - } -} } diff --git a/bash-5.1/builtins_rust/setattr/src/lib.rs b/bash-5.1/builtins_rust/setattr/src/lib.rs index 9f85d129e2a3a11fb10aa46cc53d5aa9c54bceff..07d1727c35804b4ec569ccba77b5800d8e934a33 100644 --- a/bash-5.1/builtins_rust/setattr/src/lib.rs +++ b/bash-5.1/builtins_rust/setattr/src/lib.rs @@ -1,9 +1,8 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use std::mem::size_of_val; -use libc::{c_int, c_uint, c_char, c_long, PT_NULL, c_void}; +use libc::{c_char, c_int, c_long, c_uint, c_void, PT_NULL}; use rhelp::r_builtin_help; include!(concat!("intercdep.rs")); use std::ffi::CStr; @@ -19,7 +18,11 @@ pub extern "C" fn r_readonly_builtin(list: *mut WordList) -> c_int { } #[no_mangle] -pub extern "C" fn set_or_show_attributes(mut list: *mut WordList, mut attribute: c_int, nodefs: c_int) -> c_int { +pub extern "C" fn set_or_show_attributes( + mut list: *mut WordList, + mut attribute: c_int, + nodefs: c_int, +) -> c_int { let mut assign_error: c_int = 0; let mut any_failed: c_int = 0; let mut undo: c_int = 0; @@ -33,205 +36,214 @@ pub extern "C" fn set_or_show_attributes(mut list: *mut WordList, mut attribute: let mut tlist: *mut WordList; let mut nlist: *mut WordList; let mut w: *mut WordDesc; -unsafe { - reset_internal_getopt(); - let opt_str = std::ffi::CString::new("aAfnp").unwrap(); - let mut opt = internal_getopt (list, opt_str.as_ptr() as * mut c_char); - while opt != -1 { - let opt_char:char=char::from(opt as u8); - match opt_char { - 'n' => undo = 1, - 'f' => functions_only = true, - 'a' => arrays_only = 1, - 'A' => assoc_only = 1, - 'p' => break, - _ => { - if opt == -99 { - r_builtin_help(); + unsafe { + reset_internal_getopt(); + let opt_str = std::ffi::CString::new("aAfnp").unwrap(); + let mut opt = internal_getopt(list, opt_str.as_ptr() as *mut c_char); + while opt != -1 { + let opt_char: char = char::from(opt as u8); + match opt_char { + 'n' => undo = 1, + 'f' => functions_only = true, + 'a' => arrays_only = 1, + 'A' => assoc_only = 1, + 'p' => break, + _ => { + if opt == -99 { + r_builtin_help(); + return EX_USAGE; + } + builtin_usage(); return EX_USAGE; } - builtin_usage (); - return EX_USAGE; } + opt = internal_getopt(list, opt_str.as_ptr() as *mut c_char); } - opt = internal_getopt (list, opt_str.as_ptr() as * mut c_char); - } - list = loptend; - - if !list.is_null() { - if attribute & att_exported != 0 { - array_needs_making = 1; - } - if undo != 0 && (attribute & att_readonly) != 0 { - attribute &= !att_readonly; - } - while !list.is_null() { - name = (*(*list).word).word; + list = loptend; - if functions_only { - var = find_function(name); - if var.is_null() { - builtin_error("%s: not a function\0".as_ptr() as *const c_char, name); - any_failed += 1; - } else if (attribute & att_exported) != 0 && undo == 0 && - exportable_function_name(name) == 0 { - builtin_error("%s: cannot export\0".as_ptr() as *const c_char, name); - any_failed += 1; - } else { - if undo == 0 { - (*var).attributes |= attribute; - } else { - (*var).attributes &= !attribute; + if !list.is_null() { + if attribute & att_exported != 0 { + array_needs_making = 1; + } + if undo != 0 && (attribute & att_readonly) != 0 { + attribute &= !att_readonly; + } + while !list.is_null() { + name = (*(*list).word).word; + + if functions_only { + var = find_function(name); + if var.is_null() { + builtin_error("%s: not a function\0".as_ptr() as *const c_char, name); + any_failed += 1; + } else if (attribute & att_exported) != 0 + && undo == 0 + && exportable_function_name(name) == 0 + { + builtin_error("%s: cannot export\0".as_ptr() as *const c_char, name); + any_failed += 1; + } else { + if undo == 0 { + (*var).attributes |= attribute; + } else { + (*var).attributes &= !attribute; + } } + list = (*list).next; + continue; } - list = (*list).next; - continue; - } - assign = assignment(name, 0); - aflags = 0; - if assign != 0 { - *(name.offset(assign as isize ) ) = b'\0' as c_char; - if *((name.offset((assign-1) as isize))) == b'+' as c_char { - aflags |= ASS_APPEND; - *(name.offset((assign-1) as isize)) = b'\0' as c_char; - } - } - - if legal_identifier(name) == 0 { - sh_invalidid(name); + assign = assignment(name, 0); + aflags = 0; if assign != 0 { - assign_error += 1; - } else { - any_failed += 1; - } - list = (*list).next; - continue; - } - - if assign != 0 { - *(name.offset(assign as isize)) = b'=' as c_char; - if (aflags & ASS_APPEND) != 0 { - *(name.offset((assign-1) as isize)) = b'+' as c_char; + *(name.offset(assign as isize)) = b'\0' as c_char; + if *(name.offset((assign - 1) as isize)) == b'+' as c_char { + aflags |= ASS_APPEND; + *(name.offset((assign - 1) as isize)) = b'\0' as c_char; + } } - if arrays_only != 0 || assoc_only != 0 { - tlist = (*list).next; - (*list).next = PT_NULL as *mut WordList; - - let mut optw: [u8;8] = [0;8]; - optw[0] = b'-'; - optw[1] = b'g'; - let mut opti = 2; - if (attribute & att_readonly) != 0 { - optw[opti] = b'r'; - opti += 1; - } - if (attribute & att_exported) != 0 { - optw[opti] = b'x'; - opti += 1; - } - if (attribute & arrays_only) != 0 { - optw[opti] = b'a'; - opti += 1; + if legal_identifier(name) == 0 { + sh_invalidid(name); + if assign != 0 { + assign_error += 1; } else { - optw[opti] = b'A'; - opti += 1; + any_failed += 1; } + list = (*list).next; + continue; + } - w = make_word(optw.as_ptr() as *const c_char); - nlist = make_word_list(w, list); + if assign != 0 { + *(name.offset(assign as isize)) = b'=' as c_char; + if (aflags & ASS_APPEND) != 0 { + *(name.offset((assign - 1) as isize)) = b'+' as c_char; + } - opt = declare_builtin(nlist); - if opt != EXECUTION_SUCCESS { + if arrays_only != 0 || assoc_only != 0 { + tlist = (*list).next; + (*list).next = PT_NULL as *mut WordList; + + let mut optw: [u8; 8] = [0; 8]; + optw[0] = b'-'; + optw[1] = b'g'; + let mut opti = 2; + if (attribute & att_readonly) != 0 { + optw[opti] = b'r'; + opti += 1; + } + if (attribute & att_exported) != 0 { + optw[opti] = b'x'; + opti += 1; + } + if (attribute & arrays_only) != 0 { + optw[opti] = b'a'; + opti += 1; + } else { + optw[opti] = b'A'; + opti += 1; + } + + w = make_word(optw.as_ptr() as *const c_char); + nlist = make_word_list(w, list); + + opt = declare_builtin(nlist); + if opt != EXECUTION_SUCCESS { + assign_error += 1; + } + (*list).next = tlist; + dispose_word(w); + libc::free(nlist as *mut c_void); + } else if do_assignment_no_expand(name) == 0 { assign_error += 1; } - (*list).next = tlist; - dispose_word(w); - libc::free(nlist as *mut c_void); - } else if do_assignment_no_expand(name) == 0 { - assign_error += 1; - } - *(name.offset(assign as isize)) = b'\0' as c_char; - if (aflags & ASS_APPEND) != 0 { - *(name.offset((assign-1) as isize)) = b'\0' as c_char; + *(name.offset(assign as isize)) = b'\0' as c_char; + if (aflags & ASS_APPEND) != 0 { + *(name.offset((assign - 1) as isize)) = b'\0' as c_char; + } } - } - set_var_attribute(name, attribute, undo); - if assign != 0 { - *(name.offset(assign as isize)) = b'=' as c_char; - // *((name as usize + assign as usize) as *mut c_char) = b'=' as c_char; - if (aflags & ASS_APPEND) != 0 { - *(name.offset((assign-1) as isize)) = b'+' as c_char; + set_var_attribute(name, attribute, undo); + if assign != 0 { + *(name.offset(assign as isize)) = b'=' as c_char; + // *((name as usize + assign as usize) as *mut c_char) = b'=' as c_char; + if (aflags & ASS_APPEND) != 0 { + *(name.offset((assign - 1) as isize)) = b'+' as c_char; + } } - } - list = (*list).next; - } - } else { - let mut variable_list: *mut *mut SHELL_VAR; - if (attribute & att_function) != 0 || functions_only { - variable_list = all_shell_functions(); - if attribute != att_function { - attribute &= !att_function; + list = (*list).next; } } else { - variable_list = all_shell_variables(); - } - - if (attribute & att_array) != 0 { - arrays_only += 1; - if attribute != att_array { - attribute &= !att_array; - } - } else if (attribute & att_assoc) != 0 { - assoc_only += 1; - if attribute != att_assoc { - attribute &= !att_assoc; + let variable_list: *mut *mut SHELL_VAR; + if (attribute & att_function) != 0 || functions_only { + variable_list = all_shell_functions(); + if attribute != att_function { + attribute &= !att_function; + } + } else { + variable_list = all_shell_variables(); } - } - if !variable_list.is_null() { - let mut i = 0; - loop { - var = *(variable_list.offset(i)) as *mut SHELL_VAR; - if var.is_null() { - break; + if (attribute & att_array) != 0 { + arrays_only += 1; + if attribute != att_array { + attribute &= !att_array; } - - if arrays_only != 0 && (((*var).attributes & att_array) == 0) { - i += 1; - continue; - } else if assoc_only != 0 && (((*var).attributes & att_assoc) == 0) { - i += 1; - continue; + } else if (attribute & att_assoc) != 0 { + assoc_only += 1; + if attribute != att_assoc { + attribute &= !att_assoc; } + } - if ((*var).attributes & (att_invisible | att_exported)) == (att_invisible | att_exported) { - i += 1; - continue; - } + if !variable_list.is_null() { + let mut i = 0; + loop { + var = *(variable_list.offset(i)) as *mut SHELL_VAR; + if var.is_null() { + break; + } - if ((*var).attributes & attribute) != 0 { - let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) || - (this_shell_builtin as usize == r_export_builtin as usize); - if pattr { - show_var_attributes(var, 1, nodefs); + if arrays_only != 0 && (((*var).attributes & att_array) == 0) { + i += 1; + continue; + } else if assoc_only != 0 && (((*var).attributes & att_assoc) == 0) { + i += 1; + continue; } - else { - show_var_attributes(var, 0, nodefs); + + if ((*var).attributes & (att_invisible | att_exported)) + == (att_invisible | att_exported) + { + i += 1; + continue; } - any_failed = sh_chkwrite(any_failed); - if any_failed != 0 { - break; + + if ((*var).attributes & attribute) != 0 { + let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) + || (this_shell_builtin as usize == r_export_builtin as usize); + if pattr { + show_var_attributes(var, 1, nodefs); + } else { + show_var_attributes(var, 0, nodefs); + } + any_failed = sh_chkwrite(any_failed); + if any_failed != 0 { + break; + } } + i += 1; } - i += 1; + libc::free(variable_list as *mut c_void); } - libc::free(variable_list as *mut c_void); } } -} - return if assign_error != 0 {EX_BADASSIGN} else if any_failed == 0 {EXECUTION_SUCCESS} else {EXECUTION_FAILURE}; + return if assign_error != 0 { + EX_BADASSIGN + } else if any_failed == 0 { + EXECUTION_SUCCESS + } else { + EXECUTION_FAILURE + }; } #[no_mangle] @@ -239,83 +251,109 @@ pub extern "C" fn show_all_var_attributes(v: c_int, nodefs: c_int) -> c_int { let mut i = 0; let mut any_failed = 0; let mut var: *mut SHELL_VAR; - let mut variable_list: *mut *mut SHELL_VAR; -unsafe { - variable_list = if v != 0 {all_shell_variables() } else {all_shell_functions()}; - if variable_list.is_null() { - return EXECUTION_SUCCESS; - } - - loop { - var = *(variable_list.offset(i)); - if var.is_null() { - break; - } - let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) || - (this_shell_builtin as usize == r_export_builtin as usize); - if pattr { - show_var_attributes(var, 1, nodefs); - } - else { - show_var_attributes(var, 0, nodefs); + let variable_list: *mut *mut SHELL_VAR; + unsafe { + variable_list = if v != 0 { + all_shell_variables() + } else { + all_shell_functions() + }; + if variable_list.is_null() { + return EXECUTION_SUCCESS; } - any_failed = sh_chkwrite(any_failed); - if any_failed != 0 { - break; + + loop { + var = *(variable_list.offset(i)); + if var.is_null() { + break; + } + let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) + || (this_shell_builtin as usize == r_export_builtin as usize); + if pattr { + show_var_attributes(var, 1, nodefs); + } else { + show_var_attributes(var, 0, nodefs); + } + any_failed = sh_chkwrite(any_failed); + if any_failed != 0 { + break; + } + i += 1; } - i += 1; - } - libc::free(variable_list as *mut c_void); -} - return if any_failed == 0 {EXECUTION_SUCCESS} else {EXECUTION_FAILURE}; + libc::free(variable_list as *mut c_void); + } + return if any_failed == 0 { + EXECUTION_SUCCESS + } else { + EXECUTION_FAILURE + }; } #[no_mangle] -pub extern "C" fn show_local_var_attributes(v: c_int, nodefs: c_int) -> c_int { +pub extern "C" fn show_local_var_attributes(_v: c_int, nodefs: c_int) -> c_int { let mut i = 0; let mut any_failed = 0; let mut var: *mut SHELL_VAR; - let mut variable_list: *mut *mut SHELL_VAR; -unsafe { - variable_list = all_local_variables(0); - if variable_list.is_null() { - return EXECUTION_SUCCESS; - } - - loop { - var = variable_list.offset(i) as *mut SHELL_VAR; - if var.is_null() { - break; + let variable_list: *mut *mut SHELL_VAR; + unsafe { + variable_list = all_local_variables(0); + if variable_list.is_null() { + return EXECUTION_SUCCESS; } - let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) || - (this_shell_builtin as usize == r_export_builtin as usize); - if pattr { - show_var_attributes(var, 1, nodefs); - } - else { - show_var_attributes(var, 0, nodefs); - } - any_failed = sh_chkwrite(any_failed); - if any_failed != 0 { - break; + loop { + var = variable_list.offset(i) as *mut SHELL_VAR; + if var.is_null() { + break; + } + + let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) + || (this_shell_builtin as usize == r_export_builtin as usize); + if pattr { + show_var_attributes(var, 1, nodefs); + } else { + show_var_attributes(var, 0, nodefs); + } + any_failed = sh_chkwrite(any_failed); + if any_failed != 0 { + break; + } + + i += 1; } - i += 1; + libc::free(variable_list as *mut c_void); } - - libc::free(variable_list as *mut c_void); -} - return if any_failed == 0 {EXECUTION_SUCCESS} else {EXECUTION_FAILURE}; + return if any_failed == 0 { + EXECUTION_SUCCESS + } else { + EXECUTION_FAILURE + }; } #[no_mangle] -pub unsafe extern "C" fn show_var_attributes(var: *mut SHELL_VAR, pattr: c_int, mut nodefs: c_int) -> c_int { - let mut flags = [0;16]; +pub unsafe extern "C" fn show_var_attributes( + var: *mut SHELL_VAR, + pattr: c_int, + mut nodefs: c_int, +) -> c_int { + let mut flags = [0; 16]; let i = var_attribute_string(var, pattr, flags.as_mut_ptr()); - if ((*var).attributes & att_function) != 0 && nodefs == 0 && (pattr == 0 || posixly_correct == 0) { - println!("{}",CStr::from_ptr(named_function_string((*var).name, (*var).value as *mut COMMAND, FUNC_MULTILINE | FUNC_EXTERNAL)).to_str().unwrap()); + if ((*var).attributes & att_function) != 0 + && nodefs == 0 + && (pattr == 0 || posixly_correct == 0) + { + println!( + "{}", + CStr::from_ptr(named_function_string( + (*var).name, + (*var).value as *mut COMMAND, + FUNC_MULTILINE | FUNC_EXTERNAL + )) + .to_str() + .unwrap() + ); nodefs += 1; if pattr == 0 && i == 1 && flags[0] == b'f' as c_char { return 0; @@ -323,115 +361,124 @@ pub unsafe extern "C" fn show_var_attributes(var: *mut SHELL_VAR, pattr: c_int } if pattr == 0 || posixly_correct == 0 { if i != 0 { - print!("declare -{} ",CStr::from_ptr(flags.as_ptr()).to_str().unwrap()); - } - else { + print!( + "declare -{} ", + CStr::from_ptr(flags.as_ptr()).to_str().unwrap() + ); + } else { print!("declare -- "); } - } - else if i != 0 { - print!("{} -{} ",CStr::from_ptr(this_command_name).to_str().unwrap(),CStr::from_ptr(flags.as_ptr()).to_str().unwrap()); - } - else { - print!("{} ",CStr::from_ptr(this_command_name).to_str().unwrap()); + } else if i != 0 { + print!( + "{} -{} ", + CStr::from_ptr(this_command_name).to_str().unwrap(), + CStr::from_ptr(flags.as_ptr()).to_str().unwrap() + ); + } else { + print!("{} ", CStr::from_ptr(this_command_name).to_str().unwrap()); } - if ((*var).attributes & att_invisible) != 0 && - (((*var).attributes & att_array) != 0 || - ((*var).attributes & att_assoc) != 0 ){ - println!("{}",CStr::from_ptr((*var).name).to_str().unwrap()); - } - else if ((*var).attributes & att_array) != 0 { + if ((*var).attributes & att_invisible) != 0 + && (((*var).attributes & att_array) != 0 || ((*var).attributes & att_assoc) != 0) + { + println!("{}", CStr::from_ptr((*var).name).to_str().unwrap()); + } else if ((*var).attributes & att_array) != 0 { r_print_array_assignment(var, 0); - } - else if ((*var).attributes & att_assoc) != 0 { + } else if ((*var).attributes & att_assoc) != 0 { r_print_assoc_assignment(var, 0); - } - else if nodefs != 0 || ((((*var).attributes & att_function) != 0 && pattr != 0 && posixly_correct != 0)) { - println!("{}",CStr::from_ptr((*var).name).to_str().unwrap()); - } - else if ((*var).attributes & att_function) != 0 { - println!("{}",CStr::from_ptr(named_function_string((*var).name, (*var).value as *mut COMMAND, FUNC_MULTILINE | FUNC_EXTERNAL)).to_str().unwrap()); - } - else if ((*var).attributes & att_invisible) != 0 || (*var).value == std::ptr::null_mut() { - println!("{}",CStr::from_ptr((*var).name).to_str().unwrap()); - } - else { - let x = sh_double_quote (value_cell(var)); - println!("{}={}",CStr::from_ptr((*var).name).to_str().unwrap(),CStr::from_ptr(x).to_str().unwrap()); - libc::free(x as *mut c_void); + } else if nodefs != 0 + || (((*var).attributes & att_function) != 0 && pattr != 0 && posixly_correct != 0) + { + println!("{}", CStr::from_ptr((*var).name).to_str().unwrap()); + } else if ((*var).attributes & att_function) != 0 { + println!( + "{}", + CStr::from_ptr(named_function_string( + (*var).name, + (*var).value as *mut COMMAND, + FUNC_MULTILINE | FUNC_EXTERNAL + )) + .to_str() + .unwrap() + ); + } else if ((*var).attributes & att_invisible) != 0 || (*var).value == std::ptr::null_mut() { + println!("{}", CStr::from_ptr((*var).name).to_str().unwrap()); + } else { + let x = sh_double_quote(value_cell(var)); + println!( + "{}={}", + CStr::from_ptr((*var).name).to_str().unwrap(), + CStr::from_ptr(x).to_str().unwrap() + ); + libc::free(x as *mut c_void); } return 0; } -unsafe fn value_cell(var:*mut SHELL_VAR)->* mut c_char -{ - return (*var).value; +unsafe fn value_cell(var: *mut SHELL_VAR) -> *mut c_char { + return (*var).value; } -unsafe fn array_cell(var:*mut SHELL_VAR)->* mut ARRAY -{ - return (*var).value as *mut ARRAY; +unsafe fn array_cell(var: *mut SHELL_VAR) -> *mut ARRAY { + return (*var).value as *mut ARRAY; } -unsafe fn assoc_cell(var:*mut SHELL_VAR)->* mut HASH_TABLE -{ - return (*var).value as *mut HASH_TABLE; +unsafe fn assoc_cell(var: *mut SHELL_VAR) -> *mut HASH_TABLE { + return (*var).value as *mut HASH_TABLE; } #[no_mangle] pub extern "C" fn show_name_attributes(name: *mut c_char, nodefs: c_int) -> c_int { -unsafe { - let var = find_variable_noref(name); - if !var.is_null() { - let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) || - (this_shell_builtin as usize == r_export_builtin as usize); - if pattr { - show_var_attributes(var, 1, nodefs); - } - else { - show_var_attributes(var, 0, nodefs); + unsafe { + let var = find_variable_noref(name); + if !var.is_null() { + let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) + || (this_shell_builtin as usize == r_export_builtin as usize); + if pattr { + show_var_attributes(var, 1, nodefs); + } else { + show_var_attributes(var, 0, nodefs); + } + return 0; + } else { + return 1; } - return 0; - } else { - return 1; } } -} #[no_mangle] pub extern "C" fn show_localname_attributes(name: *mut c_char, nodefs: c_int) -> c_int { -unsafe { - let var = find_variable_noref(name); - let cond = var.is_null() && ((*var).attributes & att_local) != 0 && (*var).context == variable_context; - if cond { - let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) || - (this_shell_builtin as usize == r_export_builtin as usize); - if pattr { - show_var_attributes(var, 1, nodefs); - } - else { - show_var_attributes(var, 0, nodefs); + unsafe { + let var = find_variable_noref(name); + let cond = var.is_null() + && ((*var).attributes & att_local) != 0 + && (*var).context == variable_context; + if cond { + let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) + || (this_shell_builtin as usize == r_export_builtin as usize); + if pattr { + show_var_attributes(var, 1, nodefs); + } else { + show_var_attributes(var, 0, nodefs); + } + return 0; + } else { + return 1; } - return 0; - } else { - return 1; } } -} #[no_mangle] pub extern "C" fn show_func_attributes(name: *mut c_char, nodefs: c_int) -> c_int { unsafe { let var = find_function(name); if !var.is_null() { - let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) || - (this_shell_builtin as usize == r_export_builtin as usize); + let pattr = (this_shell_builtin as usize == r_readonly_builtin as usize) + || (this_shell_builtin as usize == r_export_builtin as usize); if pattr { show_var_attributes(var, 1, nodefs); - } - else { + } else { show_var_attributes(var, 0, nodefs); } return 0; @@ -444,145 +491,156 @@ pub extern "C" fn show_func_attributes(name: *mut c_char, nodefs: c_int) -> c_in #[no_mangle] pub extern "C" fn set_var_attribute(name: *mut c_char, attribute: c_int, undo: c_int) { let mut var: *mut SHELL_VAR; - let mut tvalue: *mut c_char; -unsafe { - if undo != 0 { - var = find_variable(name); - } else { - let tv = find_tempenv_variable(name); - if !tv.is_null() && ((*tv).attributes & att_tempvar) != 0 { - tvalue = if !(*tv).value.is_null() { - libc::strdup((*tv).value) - } else {"\0".as_ptr() as *mut c_char}; + let tvalue: *mut c_char; + unsafe { + if undo != 0 { + var = find_variable(name); + } else { + let tv = find_tempenv_variable(name); + if !tv.is_null() && ((*tv).attributes & att_tempvar) != 0 { + tvalue = if !(*tv).value.is_null() { + libc::strdup((*tv).value) + } else { + "\0".as_ptr() as *mut c_char + }; - var = bind_variable((*tv).name, tvalue, 0); - if var.is_null() { - libc::free(tvalue as *mut c_void); - return; - } - (*var).attributes |= (*tv).attributes & (!att_tempvar); - if posixly_correct != 0 || shell_compatibility_level <= 44 { - if (*var).context == 0 && (attribute & att_readonly) != 0 { - let v = find_global_variable((*tv).name); - if v as usize != var as usize { + var = bind_variable((*tv).name, tvalue, 0); + if var.is_null() { + libc::free(tvalue as *mut c_void); + return; + } + (*var).attributes |= (*tv).attributes & (!att_tempvar); + if posixly_correct != 0 || shell_compatibility_level <= 44 { + if (*var).context == 0 && (attribute & att_readonly) != 0 { + let v = find_global_variable((*tv).name); + if v as usize != var as usize { + (*tv).attributes |= att_propagate; + } + } else { (*tv).attributes |= att_propagate; } + + if (*var).context != 0 { + (*var).attributes |= att_propagate; + } + } + if undo == 0 { + (*tv).attributes |= attribute; } else { - (*tv).attributes |= att_propagate; + (*tv).attributes &= !attribute; } - if (*var).context != 0 { + stupidly_hack_special_variables((*tv).name); + libc::free(tvalue as *mut c_void); + } else { + var = find_variable_notempenv(name); + if var.is_null() { + let refvar = find_variable_nameref_for_create(name, 0); + if cmp_two( + std::mem::transmute(refvar), + std::mem::transmute(&nameref_invalid_value), + ) { + return; + } + } + if var.is_null() { + var = bind_variable(name, PT_NULL as *mut c_char, 0); + if !var.is_null() { + (*var).attributes |= att_invisible; + } + } else if (*var).context != 0 { (*var).attributes |= att_propagate; } } + } + + if !var.is_null() { if undo == 0 { - (*tv).attributes |= attribute; + (*var).attributes |= attribute; } else { - (*tv).attributes &= !attribute; - } - - stupidly_hack_special_variables((*tv).name); - libc::free(tvalue as *mut c_void); - } else { - var = find_variable_notempenv(name); - if var.is_null() { - let refvar = find_variable_nameref_for_create(name, 0); - if cmp_two(std::mem::transmute(refvar),std::mem::transmute(&nameref_invalid_value)) { - return; - } - } - if var.is_null() { - var = bind_variable(name, PT_NULL as *mut c_char, 0); - if !var.is_null() { - (*var).attributes |= att_invisible; - } - } else if (*var).context != 0 { - (*var).attributes |= att_propagate; + (*var).attributes &= !attribute; } } - } - if !var.is_null() { - if undo == 0 { - (*var).attributes |= attribute; - } else { - (*var).attributes &= !attribute; + if !var.is_null() + && (((*var).attributes & att_exported) != 0 || (attribute & att_exported) != 0) + { + array_needs_making += 1; } } - - if !var.is_null() && (((*var).attributes & att_exported) != 0 || (attribute & att_exported) != 0) { - array_needs_making += 1; - } -} } #[no_mangle] -pub extern "C" fn var_attribute_string(var: *mut SHELL_VAR, pattr: c_int, flags: *mut c_char) -> c_int { +pub extern "C" fn var_attribute_string( + var: *mut SHELL_VAR, + pattr: c_int, + flags: *mut c_char, +) -> c_int { let mut i = 0; -unsafe { - if pattr == 0 || posixly_correct == 0 { - if ((*var).attributes & att_array) != 0 { - *(flags.offset(i as isize)) = b'a' as c_char; - i += 1; - } - if ((*var).attributes & att_assoc) != 0 { - *(flags.offset(i as isize)) = b'A' as c_char; - i += 1; - } - if ((*var).attributes & att_function) != 0 { - *(flags.offset(i as isize)) = b'f' as c_char; - i += 1; - } - if ((*var).attributes & att_integer) != 0 { - *(flags.offset(i as isize)) = b'i' as c_char; - i += 1; - } - if ((*var).attributes & att_nameref) != 0 { - *(flags.offset(i as isize)) = b'n' as c_char; - i += 1; - } - if ((*var).attributes & att_readonly) != 0 { - *(flags.offset(i as isize)) = b'r' as c_char; - i += 1; - } - if ((*var).attributes & att_trace) != 0 { - *(flags.offset(i as isize)) = b't' as c_char; - i += 1; - } - if ((*var).attributes & att_exported) != 0 { - *(flags.offset(i as isize)) = b'x' as c_char; - i += 1; - } - if ((*var).attributes & att_capcase) != 0 { - *(flags.offset(i as isize)) = b'c' as c_char; - i += 1; - } - if ((*var).attributes & att_lowercase) != 0 { - *(flags.offset(i as isize)) = b'l' as c_char; - i += 1; - } - if ((*var).attributes & att_uppercase) != 0 { - *(flags.offset(i as isize)) = b'u' as c_char; - i += 1; - } - } else { - if ((*var).attributes & att_array) != 0 { - *(flags.offset(i as isize)) = b'a' as c_char; - i += 1; - } - if ((*var).attributes & att_assoc) != 0 { - *(flags.offset(i as isize)) = b'A' as c_char; - i += 1; - } - if ((*var).attributes & att_function) != 0 { - *(flags.offset(i as isize)) = b'f' as c_char; - i += 1; + unsafe { + if pattr == 0 || posixly_correct == 0 { + if ((*var).attributes & att_array) != 0 { + *(flags.offset(i as isize)) = b'a' as c_char; + i += 1; + } + if ((*var).attributes & att_assoc) != 0 { + *(flags.offset(i as isize)) = b'A' as c_char; + i += 1; + } + if ((*var).attributes & att_function) != 0 { + *(flags.offset(i as isize)) = b'f' as c_char; + i += 1; + } + if ((*var).attributes & att_integer) != 0 { + *(flags.offset(i as isize)) = b'i' as c_char; + i += 1; + } + if ((*var).attributes & att_nameref) != 0 { + *(flags.offset(i as isize)) = b'n' as c_char; + i += 1; + } + if ((*var).attributes & att_readonly) != 0 { + *(flags.offset(i as isize)) = b'r' as c_char; + i += 1; + } + if ((*var).attributes & att_trace) != 0 { + *(flags.offset(i as isize)) = b't' as c_char; + i += 1; + } + if ((*var).attributes & att_exported) != 0 { + *(flags.offset(i as isize)) = b'x' as c_char; + i += 1; + } + if ((*var).attributes & att_capcase) != 0 { + *(flags.offset(i as isize)) = b'c' as c_char; + i += 1; + } + if ((*var).attributes & att_lowercase) != 0 { + *(flags.offset(i as isize)) = b'l' as c_char; + i += 1; + } + if ((*var).attributes & att_uppercase) != 0 { + *(flags.offset(i as isize)) = b'u' as c_char; + i += 1; + } + } else { + if ((*var).attributes & att_array) != 0 { + *(flags.offset(i as isize)) = b'a' as c_char; + i += 1; + } + if ((*var).attributes & att_assoc) != 0 { + *(flags.offset(i as isize)) = b'A' as c_char; + i += 1; + } + if ((*var).attributes & att_function) != 0 { + *(flags.offset(i as isize)) = b'f' as c_char; + i += 1; + } } - } - *(flags.offset(i as isize)) = b'\0' as c_char; -} - return i ; + *(flags.offset(i as isize)) = b'\0' as c_char; + } + return i; } unsafe fn cmp_two(a: usize, b: usize) -> bool { @@ -591,36 +649,40 @@ unsafe fn cmp_two(a: usize, b: usize) -> bool { #[no_mangle] pub unsafe extern "C" fn r_print_array_assignment(var: *mut SHELL_VAR, quote: c_int) { - let mut vstr = array_to_assign(array_cell(var) as *mut ARRAY ,quote); + let vstr = array_to_assign(array_cell(var) as *mut ARRAY, quote); - if vstr == std::ptr::null_mut() { + if vstr == std::ptr::null_mut() { if quote != 0 { - println!("{}=\'()\'",CStr::from_ptr((*var).name).to_str().unwrap()); - } - else { - println!("{}=()",CStr::from_ptr((*var).name).to_str().unwrap()); + println!("{}=\'()\'", CStr::from_ptr((*var).name).to_str().unwrap()); + } else { + println!("{}=()", CStr::from_ptr((*var).name).to_str().unwrap()); } - } - else { - println!("{}={}",CStr::from_ptr((*var).name).to_str().unwrap(),CStr::from_ptr(vstr).to_str().unwrap()); + } else { + println!( + "{}={}", + CStr::from_ptr((*var).name).to_str().unwrap(), + CStr::from_ptr(vstr).to_str().unwrap() + ); libc::free(vstr as *mut c_void); } } #[no_mangle] pub unsafe extern "C" fn r_print_assoc_assignment(var: *mut SHELL_VAR, quote: c_int) { - let mut vstr = assoc_to_assign(assoc_cell(var) as *mut HASH_TABLE ,quote); + let vstr = assoc_to_assign(assoc_cell(var) as *mut HASH_TABLE, quote); - if vstr == std::ptr::null_mut() { + if vstr == std::ptr::null_mut() { if quote != 0 { - println!("{}=\'()\'",CStr::from_ptr((*var).name).to_str().unwrap()); - } - else { - println!("{}=()",CStr::from_ptr((*var).name).to_str().unwrap()); + println!("{}=\'()\'", CStr::from_ptr((*var).name).to_str().unwrap()); + } else { + println!("{}=()", CStr::from_ptr((*var).name).to_str().unwrap()); } - } - else { - println!("{}={}",CStr::from_ptr((*var).name).to_str().unwrap(),CStr::from_ptr(vstr).to_str().unwrap()); + } else { + println!( + "{}={}", + CStr::from_ptr((*var).name).to_str().unwrap(), + CStr::from_ptr(vstr).to_str().unwrap() + ); libc::free(vstr as *mut c_void); } } diff --git a/bash-5.1/builtins_rust/shift/src/lib.rs b/bash-5.1/builtins_rust/shift/src/lib.rs index 8622e4ee0381263a973cc06e9053f60b4eb717e1..1004ff9f149c22b0803eb04386f46af94dec8272 100644 --- a/bash-5.1/builtins_rust/shift/src/lib.rs +++ b/bash-5.1/builtins_rust/shift/src/lib.rs @@ -1,8 +1,8 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use libc::{c_int, c_char, c_long, PT_NULL}; -use rcommon::{r_sh_erange,}; +use libc::{c_char, c_int, c_long, PT_NULL}; +use rcommon::r_sh_erange; use rhelp::r_builtin_help; include!(concat!("intercdep.rs")); @@ -11,41 +11,50 @@ pub static print_shift_error: c_int = 0; #[no_mangle] pub extern "C" fn r_shift_builtin(list: *mut WordList) -> i32 { + unsafe { + if !list.is_null() + && !(*list).word.is_null() + && libc::strcmp((*((*list).word)).word, "--help\0".as_ptr() as *const c_char) == 0 + { + r_builtin_help(); + return EX_USAGE; + } -unsafe { - if !list.is_null() && !(*list).word.is_null() && - libc::strcmp((*((*list).word)).word, "--help\0".as_ptr() as *const c_char) == 0 { - r_builtin_help (); - return EX_USAGE; - } - - let mut times: c_int = 0; - if get_numeric_arg(list, 0, std::mem::transmute(×)) == 0 { - return EXECUTION_FAILURE; - } + let times: c_int = 0; + if get_numeric_arg(list, 0, std::mem::transmute(×)) == 0 { + return EXECUTION_FAILURE; + } - if times == 0 { - return EXECUTION_SUCCESS; - } else if times < 0 { - let s = if list.is_null() {PT_NULL as *mut c_char} else {(*(*list).word).word}; - r_sh_erange(s,"shift count\0".as_ptr() as *mut c_char); - return EXECUTION_FAILURE; - } + if times == 0 { + return EXECUTION_SUCCESS; + } else if times < 0 { + let s = if list.is_null() { + PT_NULL as *mut c_char + } else { + (*(*list).word).word + }; + r_sh_erange(s, "shift count\0".as_ptr() as *mut c_char); + return EXECUTION_FAILURE; + } - let nargs = number_of_args(); - if times > nargs { - if print_shift_error != 0 { - let s = if list.is_null() {PT_NULL as *mut c_char} else {(*(*list).word).word}; - r_sh_erange(s,"shift count\0".as_ptr() as *mut c_char); + let nargs = number_of_args(); + if times > nargs { + if print_shift_error != 0 { + let s = if list.is_null() { + PT_NULL as *mut c_char + } else { + (*(*list).word).word + }; + r_sh_erange(s, "shift count\0".as_ptr() as *mut c_char); + } + return EXECUTION_FAILURE; + } else if times == nargs { + clear_dollar_vars(); + } else { + shift_args(times); } - return EXECUTION_FAILURE; - } else if times == nargs { - clear_dollar_vars(); - } else { - shift_args(times); - } - invalidate_cached_quoted_dollar_at(); -} + invalidate_cached_quoted_dollar_at(); + } return EXECUTION_SUCCESS; } diff --git a/bash-5.1/builtins_rust/shopt/src/lib.rs b/bash-5.1/builtins_rust/shopt/src/lib.rs index 12734e366c01064dfb4f19b6a504bb6e43a76cd0..5358432d1e11b03fa4544e8a8982bf6957001339 100644 --- a/bash-5.1/builtins_rust/shopt/src/lib.rs +++ b/bash-5.1/builtins_rust/shopt/src/lib.rs @@ -2,11 +2,11 @@ //# SPDX-License-Identifier: GPL-3.0-or-later extern crate rcommon; -use std::ffi::*; -use rset::r_set_shellopts; use libc::*; +use rset::r_set_shellopts; +use std::ffi::*; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN,r_builtin_usage}; +use rcommon::{WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; /* /* First, the user-visible attributes */ @@ -45,39 +45,47 @@ use rhelp::r_builtin_help; #define attmask_scope 0x0f00000 */ -pub static att_exported:i32= 0x0000001; /* export to environment */ -pub static att_readonly:i32= 0x0000002; /* cannot change */ -pub static att_array:i32= 0x0000004; /* value is an array */ -pub static att_function:i32= 0x0000008; /* value is a function */ -pub static att_integer:i32= 0x0000010; /* internal representation is int */ -pub static att_local:i32= 0x0000020; /* variable is local to a function */ -pub static att_assoc:i32= 0x0000040; /* variable is an associative array */ -pub static att_trace:i32= 0x0000080; /* function is traced with DEBUG trap */ -pub static att_uppercase:i32= 0x0000100; /* word converted to uppercase on assignment */ -pub static att_lowercase:i32= 0x0000200; /* word converted to lowercase on assignment */ -pub static att_capcase:i32= 0x0000400; /* word capitalized on assignment */ -pub static att_nameref:i32= 0x0000800; /* word is a name reference */ +pub static att_exported: i32 = 0x0000001; /* export to environment */ +pub static att_readonly: i32 = 0x0000002; /* cannot change */ +pub static att_array: i32 = 0x0000004; /* value is an array */ +pub static att_function: i32 = 0x0000008; /* value is a function */ +pub static att_integer: i32 = 0x0000010; /* internal representation is int */ +pub static att_local: i32 = 0x0000020; /* variable is local to a function */ +pub static att_assoc: i32 = 0x0000040; /* variable is an associative array */ +pub static att_trace: i32 = 0x0000080; /* function is traced with DEBUG trap */ +pub static att_uppercase: i32 = 0x0000100; /* word converted to uppercase on assignment */ +pub static att_lowercase: i32 = 0x0000200; /* word converted to lowercase on assignment */ +pub static att_capcase: i32 = 0x0000400; /* word capitalized on assignment */ +pub static att_nameref: i32 = 0x0000800; /* word is a name reference */ -pub static user_attrs:i32=att_exported|att_readonly|att_integer|att_local|att_trace|att_uppercase|att_lowercase|att_capcase|att_nameref; +pub static user_attrs: i32 = att_exported + | att_readonly + | att_integer + | att_local + | att_trace + | att_uppercase + | att_lowercase + | att_capcase + | att_nameref; -pub static attmask_user:i32= 0x0000fff; +pub static attmask_user: i32 = 0x0000fff; /* Internal attributes used for bookkeeping */ -pub static att_invisible:i32= 0x0001000; /* cannot see */ -pub static att_nounset:i32= 0x0002000; /* cannot unset */ -pub static att_noassign:i32= 0x0004000; /* assignment not allowed */ -pub static att_imported:i32= 0x0008000; /* came from environment */ -pub static att_special:i32= 0x0010000; /* requires special handling */ -pub static att_nofree:i32= 0x0020000; /* do not free value on unset */ -pub static att_regenerate:i32= 0x0040000; /* regenerate when exported */ +pub static att_invisible: i32 = 0x0001000; /* cannot see */ +pub static att_nounset: i32 = 0x0002000; /* cannot unset */ +pub static att_noassign: i32 = 0x0004000; /* assignment not allowed */ +pub static att_imported: i32 = 0x0008000; /* came from environment */ +pub static att_special: i32 = 0x0010000; /* requires special handling */ +pub static att_nofree: i32 = 0x0020000; /* do not free value on unset */ +pub static att_regenerate: i32 = 0x0040000; /* regenerate when exported */ -pub static attmask_int:i32= 0x00ff000; +pub static attmask_int: i32 = 0x00ff000; /* Internal attributes used for variable scoping. */ -pub static att_tempvar:i32=0x0100000; /* variable came from the temp environment */ -pub static att_propagate:i32= 0x0200000; /* propagate to previous scope */ +pub static att_tempvar: i32 = 0x0100000; /* variable came from the temp environment */ +pub static att_propagate: i32 = 0x0200000; /* propagate to previous scope */ -pub static attmask_scope:i32= 0x0f00000; +pub static attmask_scope: i32 = 0x0f00000; extern "C" { fn printf(_: *const libc::c_char, _: ...) -> i32; fn dcgettext( @@ -90,17 +98,10 @@ extern "C" { fn strlen(_: *const libc::c_char) -> libc::c_ulong; fn free(__ptr: *mut libc::c_void); fn xmalloc(_: SizeT) -> *mut libc::c_void; - fn extract_colon_unit( - _: *mut libc::c_char, - _: *mut i32, - ) -> *mut libc::c_char; + fn extract_colon_unit(_: *mut libc::c_char, _: *mut i32) -> *mut libc::c_char; static mut localvar_inherit: i32; fn find_variable(_: *const libc::c_char) -> *mut ShellVar; - fn bind_variable( - _: *const libc::c_char, - _: *mut libc::c_char, - _: i32, - ) -> *mut ShellVar; + fn bind_variable(_: *const libc::c_char, _: *mut libc::c_char, _: i32) -> *mut ShellVar; fn init_bash_argv(); static mut assoc_expand_once: i32; fn dispose_words(_: *mut WordList); @@ -182,8 +183,8 @@ pub struct variable { pub name: *mut libc::c_char, pub value: *mut libc::c_char, pub exportstr: *mut libc::c_char, - pub dynamic_value: Option::, - pub assign_func: Option::, + pub dynamic_value: Option, + pub assign_func: Option, pub attributes: i32, pub context: i32, } @@ -200,12 +201,9 @@ pub type ShellVar = variable; pub struct RShoptVars { pub name: *mut libc::c_char, pub value: *mut i32, - pub set_func: Option::, + pub set_func: Option, } -pub type ShoptSetFuncT = unsafe extern "C" fn( - *mut libc::c_char, - i32, -) -> i32; +pub type ShoptSetFuncT = unsafe extern "C" fn(*mut libc::c_char, i32) -> i32; static mut SHOPT_LOGIN_SHELL: i32 = 0; static mut SHOPT_COMPAT31: i32 = 0; static mut SHOPT_COMPAT32: i32 = 0; @@ -218,13 +216,11 @@ static mut SHOPT_VARS: [RShoptVars; 54] = unsafe { [ { let init = RShoptVars { - name: b"autocd\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"autocd\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &autocd as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, @@ -233,187 +229,138 @@ static mut SHOPT_VARS: [RShoptVars; 54] = unsafe { name: b"assoc_expand_once\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &assoc_expand_once as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"cdable_vars\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"cdable_vars\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &cdable_vars as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"cdspell\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"cdspell\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &cdspelling as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"checkhash\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"checkhash\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &check_hashed_filenames as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"checkjobs\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"checkjobs\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &check_jobs_at_exit as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"checkwinsize\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"checkwinsize\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &check_window_size as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"cmdhist\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, - value: &command_oriented_history as *const i32 - as *mut i32, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + name: b"cmdhist\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + value: &command_oriented_history as *const i32 as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"compat31\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"compat31\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &SHOPT_COMPAT31 as *const i32 as *mut libc::c_int, set_func: Some( - set_compatibility_level - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + set_compatibility_level as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"compat32\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"compat32\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &SHOPT_COMPAT32 as *const i32 as *mut libc::c_int, set_func: Some( - set_compatibility_level - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + set_compatibility_level as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"compat40\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"compat40\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &SHOPT_COMPAT40 as *const i32 as *mut libc::c_int, set_func: Some( - set_compatibility_level - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + set_compatibility_level as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"compat41\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"compat41\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &SHOPT_COMPAT41 as *const i32 as *mut libc::c_int, set_func: Some( - set_compatibility_level - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + set_compatibility_level as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"compat42\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"compat42\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &SHOPT_COMPAT42 as *const i32 as *mut libc::c_int, set_func: Some( - set_compatibility_level - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + set_compatibility_level as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"compat43\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"compat43\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &SHOPT_COMPAT43 as *const i32 as *mut libc::c_int, set_func: Some( - set_compatibility_level - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + set_compatibility_level as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"compat44\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"compat44\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &SHOPT_COMPAT44 as *const i32 as *mut libc::c_int, set_func: Some( - set_compatibility_level - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + set_compatibility_level as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init @@ -423,73 +370,60 @@ static mut SHOPT_VARS: [RShoptVars; 54] = unsafe { name: b"complete_fullquote\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &complete_fullquote as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"direxpand\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"direxpand\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &dircomplete_expand as *const i32 as *mut libc::c_int, set_func: Some( shopt_set_complete_direxpand - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"dirspell\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"dirspell\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &dircomplete_spelling as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"dotglob\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"dotglob\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &glob_dot_filenames as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"execfail\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"execfail\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &no_exit_on_failed_exec as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"expand_aliases\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"expand_aliases\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &expand_aliases as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, @@ -582,89 +516,72 @@ static mut SHOPT_VARS: [RShoptVars; 54] = unsafe { }, { let init = RShoptVars { - name: b"gnu_errfmt\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"gnu_errfmt\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &gnu_error_format as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"histappend\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"histappend\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &force_append_history as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"histreedit\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"histreedit\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &history_reediting as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"histverify\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"histverify\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &hist_verify as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"hostcomplete\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, - value: &perform_hostname_completion as *const i32 - as *mut i32, + name: b"hostcomplete\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + value: &perform_hostname_completion as *const i32 as *mut i32, set_func: Some( shopt_enable_hostname_completion - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"huponexit\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"huponexit\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &hup_on_exit as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"inherit_errexit\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"inherit_errexit\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &inherit_errexit as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, @@ -675,35 +592,28 @@ static mut SHOPT_VARS: [RShoptVars; 54] = unsafe { value: &interactive_comments as *const i32 as *mut libc::c_int, set_func: Some( set_shellopts_after_change - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"lastpipe\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"lastpipe\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &lastpipe_opt as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"lithist\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"lithist\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &literal_history as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, @@ -712,49 +622,39 @@ static mut SHOPT_VARS: [RShoptVars; 54] = unsafe { name: b"localvar_inherit\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &localvar_inherit as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"localvar_unset\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"localvar_unset\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &localvar_unset as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"login_shell\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"login_shell\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &SHOPT_LOGIN_SHELL as *const i32 as *mut i32, set_func: Some( - r_set_login_shell - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + r_set_login_shell as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"mailwarn\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"mailwarn\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &mail_warning as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, @@ -762,86 +662,70 @@ static mut SHOPT_VARS: [RShoptVars; 54] = unsafe { let init = RShoptVars { name: b"no_empty_cmd_completion\0" as *const u8 as *const libc::c_char as *mut libc::c_char, - value: &no_empty_command_completion as *const i32 - as *mut i32, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + value: &no_empty_command_completion as *const i32 as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"nocaseglob\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"nocaseglob\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &glob_ignore_case as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"nocasematch\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"nocasematch\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &match_ignore_case as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"nullglob\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, - value: &allow_null_glob_expansion as *const i32 - as *mut i32, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + name: b"nullglob\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + value: &allow_null_glob_expansion as *const i32 as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"progcomp\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, - value: &prog_completion_enabled as *const i32 - as *mut i32, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + name: b"progcomp\0" as *const u8 as *const libc::c_char as *mut libc::c_char, + value: &prog_completion_enabled as *const i32 as *mut i32, + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"progcomp_alias\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"progcomp_alias\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &progcomp_alias as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"promptvars\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"promptvars\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &promptvars as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, @@ -851,48 +735,38 @@ static mut SHOPT_VARS: [RShoptVars; 54] = unsafe { as *mut libc::c_char, value: &restricted_shell as *const i32 as *mut libc::c_int, set_func: Some( - set_restricted_shell - as unsafe extern "C" fn( - *mut libc::c_char, - i32, - ) -> i32, + set_restricted_shell as unsafe extern "C" fn(*mut libc::c_char, i32) -> i32, ), }; init }, { let init = RShoptVars { - name: b"shift_verbose\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"shift_verbose\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &print_shift_error as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"sourcepath\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"sourcepath\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &source_uses_path as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, { let init = RShoptVars { - name: b"xpg_echo\0" as *const u8 as *const libc::c_char - as *mut libc::c_char, + name: b"xpg_echo\0" as *const u8 as *const libc::c_char as *mut libc::c_char, value: &xpg_echo as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, @@ -900,10 +774,9 @@ static mut SHOPT_VARS: [RShoptVars; 54] = unsafe { let init = RShoptVars { name: 0 as *const libc::c_char as *mut libc::c_char, value: 0 as *const i32 as *mut libc::c_int, - set_func: ::std::mem::transmute::< - *mut libc::c_void, - Option::, - >(0 as *const libc::c_void as *mut libc::c_void), + set_func: ::std::mem::transmute::<*mut libc::c_void, Option>( + 0 as *const libc::c_void as *mut libc::c_void, + ), }; init }, @@ -1260,7 +1133,7 @@ unsafe extern "C" fn list_some_o_options( unsafe extern "C" fn set_shopt_o_options( mode: i32, list: *mut WordList, - quiet: i32, + _quiet: i32, ) -> i32 { //let mut l: *mut WordList =0 as *mut WordList; let mut l: *mut WordList; @@ -1277,15 +1150,15 @@ unsafe extern "C" fn set_shopt_o_options( return rval; } unsafe extern "C" fn set_shellopts_after_change( - option_name: *mut libc::c_char, - mode: i32, + _option_name: *mut libc::c_char, + _mode: i32, ) -> i32 { r_set_shellopts(); return 0; } unsafe extern "C" fn shopt_set_debug_mode( - option_name: *mut libc::c_char, - mode: i32, + _option_name: *mut libc::c_char, + _mode: i32, ) -> i32 { function_trace_mode = debugging_mode; error_trace_mode = function_trace_mode; @@ -1296,7 +1169,7 @@ unsafe extern "C" fn shopt_set_debug_mode( return 0; } unsafe extern "C" fn shopt_enable_hostname_completion( - option_name: *mut libc::c_char, + _option_name: *mut libc::c_char, mode: i32, ) -> i32 { return enable_hostname_completion(mode); @@ -1379,15 +1252,15 @@ pub unsafe extern "C" fn r_set_compatibility_opts() { }; } unsafe extern "C" fn shopt_set_complete_direxpand( - option_name: *mut libc::c_char, - mode: i32, + _option_name: *mut libc::c_char, + _mode: i32, ) -> i32 { set_directory_hook(); return 0; } unsafe extern "C" fn set_restricted_shell( - option_name: *mut libc::c_char, - mode: i32, + _option_name: *mut libc::c_char, + _mode: i32, ) -> i32 { static mut SAVE_RESTRICTED:i32 = -1; if SAVE_RESTRICTED == -1 { @@ -1398,8 +1271,8 @@ unsafe extern "C" fn set_restricted_shell( } #[no_mangle] pub unsafe extern "C" fn r_set_login_shell( - option_name: *mut libc::c_char, - mode: i32, + _option_name: *mut libc::c_char, + _mode: i32, ) -> i32 { SHOPT_LOGIN_SHELL = if login_shell != 0 {1} else{0}; return 0; @@ -1540,7 +1413,7 @@ pub unsafe extern "C" fn r_set_bashopts() { libc::free(value as *mut libc::c_void); } #[no_mangle] -pub unsafe extern "C" fn r_parse_bashopts( value: *mut libc::c_char) { +pub unsafe extern "C" fn r_parse_bashopts(value: *mut libc::c_char) { let mut vname: *mut libc::c_char = 0 as *mut libc::c_char; let mut vptr: i32 = 0; let mut ind: i32 = 0; @@ -1558,31 +1431,27 @@ pub unsafe extern "C" fn r_parse_bashopts( value: *mut libc::c_char) { ((*SHOPT_VARS.as_mut_ptr().offset(ind as isize)).set_func) .expect("non-null function pointer"), )) - .expect( - "non-null function pointer", - )(SHOPT_VARS[ind as usize].name, 1 as i32); + .expect("non-null function pointer")( + SHOPT_VARS[ind as usize].name, 1 as i32 + ); } } free(vname as *mut libc::c_void); - }; + } } #[no_mangle] pub unsafe extern "C" fn r_initialize_bashopts(no_bashopts: i32) { - let temp: *mut libc::c_char; - let var: *mut ShellVar; + let temp: *mut libc::c_char; + let var: *mut ShellVar; if no_bashopts == 0 { var = find_variable(b"BASHOPTS\0" as *const u8 as *const libc::c_char); if !var.is_null() && (*var).attributes & att_imported != 0 { - temp = if (*var).attributes & att_array != 0 - || (*var).attributes & att_assoc != 0 - { + temp = if (*var).attributes & att_array != 0 || (*var).attributes & att_assoc != 0 { std::ptr::null_mut() } else { strcpy( - xmalloc( - (1 as libc::c_ulong) - .wrapping_add(strlen((*var).value)), - ) as *mut libc::c_char, + xmalloc((1 as libc::c_ulong).wrapping_add(strlen((*var).value))) + as *mut libc::c_char, (*var).value, ) }; @@ -1594,4 +1463,3 @@ pub unsafe extern "C" fn r_initialize_bashopts(no_bashopts: i32) { } r_set_bashopts(); } - diff --git a/bash-5.1/builtins_rust/source/src/lib.rs b/bash-5.1/builtins_rust/source/src/lib.rs index 4c726b650e3c4d8283520d00d872d7142cd0511c..a47c53c2d680b1168b2b05ef1912617c68b3e025 100644 --- a/bash-5.1/builtins_rust/source/src/lib.rs +++ b/bash-5.1/builtins_rust/source/src/lib.rs @@ -1,130 +1,155 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -extern crate libc; +extern crate libc; extern crate nix; -use libc::{c_char, c_long, c_void}; -use std::{ffi::CString}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN,r_builtin_usage, r_savestring}; -use rhelp::r_builtin_help; +use libc::{c_char, c_void}; +use rcommon::{r_savestring, WordDesc, WordList, EXECUTION_FAILURE, EX_USAGE}; +use std::ffi::CString; #[repr(u8)] -enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, - cm_connection, cm_function_def, cm_until, cm_group, - cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc +enum command_type { + cm_for, + cm_case, + cm_while, + cm_if, + cm_simple, + cm_select, + cm_connection, + cm_function_def, + cm_until, + cm_group, + cm_arith, + cm_cond, + cm_arith_for, + cm_subshell, + cm_coproc, } #[repr(u8)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] enum r_instruction { - r_output_direction, r_input_direction, r_inputa_direction, - r_appending_to, r_reading_until, r_reading_string, - r_duplicating_input, r_duplicating_output, r_deblank_reading_until, - r_close_this, r_err_and_out, r_input_output, r_output_force, - r_duplicating_input_word, r_duplicating_output_word, - r_move_input, r_move_output, r_move_input_word, r_move_output_word, - r_append_err_and_out + r_output_direction, + r_input_direction, + r_inputa_direction, + r_appending_to, + r_reading_until, + r_reading_string, + r_duplicating_input, + r_duplicating_output, + r_deblank_reading_until, + r_close_this, + r_err_and_out, + r_input_output, + r_output_force, + r_duplicating_input_word, + r_duplicating_output_word, + r_move_input, + r_move_output, + r_move_input_word, + r_move_output_word, + r_append_err_and_out, } #[repr(C)] pub union REDIRECT { - next:*mut REDIRECT, - redirector:libc::c_int, - rflags:libc::c_int, - flags:libc::c_int, - instruction:r_instruction, - redirectee:libc::c_int, - here_doc_eof:*mut c_char + next: *mut REDIRECT, + redirector: libc::c_int, + rflags: libc::c_int, + flags: libc::c_int, + instruction: r_instruction, + redirectee: libc::c_int, + here_doc_eof: *mut c_char, } /* FOR command. */ #[repr(C)] pub struct for_com { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct PATTERN_LIST { - next:* mut PATTERN_LIST, - patterns:* mut WordList, - action:*mut COMMAND, - flags:libc::c_int + next: *mut PATTERN_LIST, + patterns: *mut WordList, + action: *mut COMMAND, + flags: libc::c_int, } #[repr(C)] pub struct case_com { - flags:libc::c_int, - line:libc::c_int, - word:*mut WordDesc, - clauses:*mut PATTERN_LIST + flags: libc::c_int, + line: libc::c_int, + word: *mut WordDesc, + clauses: *mut PATTERN_LIST, } #[repr(C)] pub struct while_com { - flags:libc::c_int, - test:*mut COMMAND, - action:*mut COMMAND + flags: libc::c_int, + test: *mut COMMAND, + action: *mut COMMAND, } #[repr(C)] pub struct if_com { - flags:libc::c_int, - test:*mut COMMAND, - true_case:*mut COMMAND, - false_case:*mut COMMAND + flags: libc::c_int, + test: *mut COMMAND, + true_case: *mut COMMAND, + false_case: *mut COMMAND, } #[repr(C)] pub struct connection { - ignore:libc::c_int, - first:*mut COMMAND, - second:*mut COMMAND, - connector:libc::c_int + ignore: libc::c_int, + first: *mut COMMAND, + second: *mut COMMAND, + connector: libc::c_int, } #[repr(C)] pub struct simple_com { - flags:libc::c_int, - line:libc::c_int, - words:*mut WordList, - redirects:*mut REDIRECT + flags: libc::c_int, + line: libc::c_int, + words: *mut WordList, + redirects: *mut REDIRECT, } #[repr(C)] pub struct function_def { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - command:*mut COMMAND, - source_file:*mut c_char + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + command: *mut COMMAND, + source_file: *mut c_char, } #[repr(C)] pub struct group_com { - ignore:libc::c_int, - command:*mut COMMAND, - source_file:*mut c_char + ignore: libc::c_int, + command: *mut COMMAND, + source_file: *mut c_char, } #[repr(C)] pub struct select_com { - flags:libc::c_int, - line:libc::c_int, - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct arith_com { - flags:libc::c_int, - line:libc::c_int, - exp:*mut WordList + flags: libc::c_int, + line: libc::c_int, + exp: *mut WordList, } #[repr(C)] @@ -137,12 +162,12 @@ pub struct cond_com { #[repr(C)] pub struct arith_for_com { - flags:libc::c_int, - line:libc::c_int, - init:*mut WordList, - test:*mut WordList, - step:*mut WordList, - action:*mut COMMAND + flags: libc::c_int, + line: libc::c_int, + init: *mut WordList, + test: *mut WordList, + step: *mut WordList, + action: *mut COMMAND, } #[repr(C)] @@ -285,7 +310,7 @@ unsafe fn DEBUG_TRAP()->i32 pub extern "C" fn r_source_builtin (list:* mut WordList)->i32 { - let mut result:i32; + let result:i32; let mut filename:*mut c_char; let mut debug_trap:* mut c_char; let x:* mut c_char; @@ -294,7 +319,7 @@ pub extern "C" fn r_source_builtin (list:* mut WordList)->i32 return EX_USAGE; } - let mut llist:* mut WordList = loptend.clone(); + let llist:* mut WordList = loptend.clone(); if list == std::ptr::null_mut() { builtin_error (b"filename argument required\0" as *const u8 as *const libc::c_char as *mut libc::c_char ); @@ -369,11 +394,8 @@ pub extern "C" fn r_source_builtin (list:* mut WordList)->i32 restore_default_signal (DEBUG_TRAP()); } - result = source_file (filename, (list !=std::ptr::null_mut() && (*list).next !=std::ptr::null_mut()) as i32); - - run_unwind_frame (b"source\0" as *const u8 as *const libc::c_char as *mut libc::c_char); + run_unwind_frame(b"source\0" as *const u8 as *const libc::c_char as *mut libc::c_char); - return result; - } + return result; + } } - diff --git a/bash-5.1/builtins_rust/suspend/src/lib.rs b/bash-5.1/builtins_rust/suspend/src/lib.rs index 272065d7ec04ce35ef82d711ab6659862f4d246a..0ce925d7b5a114a0a18b7d19140eb56998298550 100644 --- a/bash-5.1/builtins_rust/suspend/src/lib.rs +++ b/bash-5.1/builtins_rust/suspend/src/lib.rs @@ -1,8 +1,8 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use libc::{c_int, c_char, c_long, PT_NULL}; -use rcommon::{r_no_args,WordList,r_builtin_usage}; +use libc::{c_char, c_int, c_long, PT_NULL}; +use rcommon::{r_builtin_usage, r_no_args, WordList}; use rhelp::r_builtin_help; include!(concat!("intercdep.rs")); @@ -10,50 +10,51 @@ pub static mut old_cont: *mut SigHandler = PT_NULL as *mut SigHandler; #[no_mangle] pub extern "C" fn r_suspend_builtin(mut list: *mut WordList) -> i32 { - let mut opt: c_int; let mut force: c_int = 0; -unsafe { - reset_internal_getopt(); - let opt_str = "f\0".as_ptr() as *mut c_char; - opt = internal_getopt (list, opt_str); - while opt != -1 { - let opt_char:char=char::from(opt as u8); - match opt_char { - 'f' => force += 1, - _ => { - if opt == -99 { - r_builtin_help(); + unsafe { + reset_internal_getopt(); + let opt_str = "f\0".as_ptr() as *mut c_char; + opt = internal_getopt(list, opt_str); + while opt != -1 { + let opt_char: char = char::from(opt as u8); + match opt_char { + 'f' => force += 1, + _ => { + if opt == -99 { + r_builtin_help(); + return EX_USAGE; + } + r_builtin_usage(); return EX_USAGE; } - r_builtin_usage (); - return EX_USAGE; } + + opt = internal_getopt(list, opt_str); } - - opt = internal_getopt (list, opt_str); - } - list = loptend; - if job_control == 0 { - sh_nojobs("cannot suspend\0".as_ptr() as *mut c_char); - return EXECUTION_FAILURE; - } - if force == 0 { - r_no_args(list); - if login_shell != 0 { - builtin_error("cannot suspend a login shell\0".as_ptr() as *mut c_char); + list = loptend; + if job_control == 0 { + sh_nojobs("cannot suspend\0".as_ptr() as *mut c_char); return EXECUTION_FAILURE; } - } + if force == 0 { + r_no_args(list); + if login_shell != 0 { + builtin_error("cannot suspend a login shell\0".as_ptr() as *mut c_char); + return EXECUTION_FAILURE; + } + } - old_cont = set_signal_handler(libc::SIGCONT, std::mem::transmute(suspend_continue as usize)); - killpg(shell_pgrp, libc::SIGSTOP); -} + old_cont = set_signal_handler( + libc::SIGCONT, + std::mem::transmute(suspend_continue as usize), + ); + killpg(shell_pgrp, libc::SIGSTOP); + } return EXECUTION_SUCCESS; } -unsafe fn suspend_continue(sig: c_int) -{ +unsafe fn suspend_continue(sig: c_int) { set_signal_handler(libc::SIGCONT, old_cont); } diff --git a/bash-5.1/builtins_rust/test/src/lib.rs b/bash-5.1/builtins_rust/test/src/lib.rs index bc6d40ef4b6abf7527665915baf6999e0cb4e40c..a7daf5dd74b4aee1d141b5c4573e83b860662463 100644 --- a/bash-5.1/builtins_rust/test/src/lib.rs +++ b/bash-5.1/builtins_rust/test/src/lib.rs @@ -1,39 +1,38 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use libc::{c_int, c_char, c_void}; -use std::ffi::{CStr, CString}; -use rcommon::{r_make_builtin_argv,WordList}; +use libc::{c_char, c_int, c_void}; + +use rcommon::{r_make_builtin_argv, WordList}; include!(concat!("intercdep.rs")); -use rhelp::r_builtin_help; #[no_mangle] pub extern "C" fn r_test_builtin(list: *mut WordList) -> i32 { - let result: c_int; - let mut argc: c_int = 0; -unsafe { - if list.is_null() { - if *this_command_name == b'[' as c_char && - *((this_command_name as usize + 1) as *mut c_char) == 0 { - builtin_error("missing `]'\0".as_ptr() as *mut c_char); - return EX_BADUSAGE; + let argc: c_int = 0; + unsafe { + if list.is_null() { + if *this_command_name == b'[' as c_char + && *((this_command_name as usize + 1) as *mut c_char) == 0 + { + builtin_error("missing `]'\0".as_ptr() as *mut c_char); + return EX_BADUSAGE; + } + return EXECUTION_FAILURE; } - return EXECUTION_FAILURE; - } - let argv = r_make_builtin_argv(list, std::mem::transmute(&argc)); - /* - let mut i = 0; - let argv = r_make_builtin_argv(list, &argc as *const i32 as*mut i32); - while i<(argc) { - let tmp = CStr::from_ptr(argv as *mut c_char); - //println!("test argv={}", tmp.to_str().unwrap()); - libc::printf(CString::new("test:i=%d, argv=%s=\n").unwrap().as_ptr(), i , *argv.offset(i as isize) as *mut c_char); - i=i+1; + let argv = r_make_builtin_argv(list, std::mem::transmute(&argc)); + /* + let mut i = 0; + let argv = r_make_builtin_argv(list, &argc as *const i32 as*mut i32); + while i<(argc) { + let tmp = CStr::from_ptr(argv as *mut c_char); + //println!("test argv={}", tmp.to_str().unwrap()); + libc::printf(CString::new("test:i=%d, argv=%s=\n").unwrap().as_ptr(), i , *argv.offset(i as isize) as *mut c_char); + i=i+1; + } + */ + result = test_command(argc, argv); + libc::free(argv as *mut c_void); } - */ - result = test_command(argc, argv); - libc::free(argv as *mut c_void); -} return result; } diff --git a/bash-5.1/builtins_rust/times/src/lib.rs b/bash-5.1/builtins_rust/times/src/lib.rs index 38eed28980943908729e3fe2554b3b78a461ebe9..b7c6e4144a455e267bc162a1a9393a839ac69013 100644 --- a/bash-5.1/builtins_rust/times/src/lib.rs +++ b/bash-5.1/builtins_rust/times/src/lib.rs @@ -1,36 +1,34 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use libc::{c_int, c_char}; -use rcommon::{r_sh_chkwrite}; +use libc::c_int; +use rcommon::r_sh_chkwrite; include!(concat!("intercdep.rs")); #[no_mangle] pub extern "C" fn r_times_builtin(list: *mut WordList) -> i32 { + unsafe { + if no_options(list) != 0 { + return EX_USAGE; + } -unsafe { + let curr: libc::rusage = std::mem::zeroed(); + let kids: libc::rusage = std::mem::zeroed(); + libc::putchar(b'\n' as c_int); - if no_options(list) != 0 { - return EX_USAGE; - } - - let mut curr: libc::rusage = std::mem::zeroed(); - let mut kids: libc::rusage = std::mem::zeroed(); - libc::putchar(b'\n' as c_int); - - libc::getrusage(libc::RUSAGE_SELF, std::mem::transmute(&curr)); - libc::getrusage(libc::RUSAGE_CHILDREN, std::mem::transmute(&kids)); + libc::getrusage(libc::RUSAGE_SELF, std::mem::transmute(&curr)); + libc::getrusage(libc::RUSAGE_CHILDREN, std::mem::transmute(&kids)); - print_timeval(stdout, std::mem::transmute(&curr.ru_utime)); - libc::putchar(b' ' as c_int); - print_timeval(stdout, std::mem::transmute(&curr.ru_stime)); - libc::putchar(b'\n' as c_int); + print_timeval(stdout, std::mem::transmute(&curr.ru_utime)); + libc::putchar(b' ' as c_int); + print_timeval(stdout, std::mem::transmute(&curr.ru_stime)); + libc::putchar(b'\n' as c_int); - print_timeval(stdout, std::mem::transmute(&kids.ru_utime)); - libc::putchar(b' ' as c_int); - print_timeval(stdout, std::mem::transmute(&kids.ru_stime)); - libc::putchar(b'\n' as c_int); + print_timeval(stdout, std::mem::transmute(&kids.ru_utime)); + libc::putchar(b' ' as c_int); + print_timeval(stdout, std::mem::transmute(&kids.ru_stime)); + libc::putchar(b'\n' as c_int); - return r_sh_chkwrite(EXECUTION_SUCCESS); -} + return r_sh_chkwrite(EXECUTION_SUCCESS); + } } diff --git a/bash-5.1/builtins_rust/trap/src/lib.rs b/bash-5.1/builtins_rust/trap/src/lib.rs index 4bb47528da36b9a98e89f9d19d00eb856143fe81..6c15d229124e8eb52cf5513373105c49c9dbfd07 100644 --- a/bash-5.1/builtins_rust/trap/src/lib.rs +++ b/bash-5.1/builtins_rust/trap/src/lib.rs @@ -1,127 +1,147 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -use std::{ffi::CString}; +use std::ffi::CString; -use libc::{c_int, c_char, c_void, PT_NULL}; -use rcommon::{r_builtin_usage,r_display_signal_list,WordList,r_sh_invalidsig,r_sh_chkwrite}; +use libc::{c_char, c_int, c_void, PT_NULL}; +use rcommon::{r_builtin_usage, r_display_signal_list, r_sh_chkwrite, r_sh_invalidsig, WordList}; use rhelp::r_builtin_help; include!(concat!("intercdep.rs")); - #[no_mangle] pub extern "C" fn r_trap_builtin(mut list: *mut WordList) -> i32 { - let mut list_signal_names: c_int = 0; let mut display: c_int = 0; let mut result: c_int = EXECUTION_SUCCESS; -unsafe { - reset_internal_getopt(); - let opt_str = CString::new("lp").unwrap(); - let mut opt = internal_getopt (list, opt_str.as_ptr() as * mut c_char); - while opt != -1 { - let opt_char:char=char::from(opt as u8); - match opt_char { - 'l' => list_signal_names += 1, - 'p' => display += 1, - _ => { - if opt == -99 { - r_builtin_help(); + unsafe { + reset_internal_getopt(); + let opt_str = CString::new("lp").unwrap(); + let mut opt = internal_getopt(list, opt_str.as_ptr() as *mut c_char); + while opt != -1 { + let opt_char: char = char::from(opt as u8); + match opt_char { + 'l' => list_signal_names += 1, + 'p' => display += 1, + _ => { + if opt == -99 { + r_builtin_help(); + return EX_USAGE; + } + r_builtin_usage(); return EX_USAGE; } - r_builtin_usage (); - return EX_USAGE; } + opt = internal_getopt(list, opt_str.as_ptr() as *mut c_char); } - opt = internal_getopt (list, opt_str.as_ptr() as * mut c_char); - } - list = loptend; - - opt = DSIG_NOCASE | DSIG_SIGPREFIX; - - if list_signal_names != 0 { - return r_sh_chkwrite(r_display_signal_list(PT_NULL as *mut WordList, 1)); - } else if display != 0 || list.is_null() { - initialize_terminating_signals(); - get_all_original_signals(); - return r_sh_chkwrite(display_traps(list, (display != 0 && posixly_correct != 0) as c_int)); - } else { - let mut operation = SET; - let first_arg = (*(*list).word).word; - let first_signal = !first_arg.is_null() && *first_arg != 0 && - all_digits(first_arg) != 0 && decode_signal (first_arg,opt) != NO_SIG; - if first_signal { - operation = REVERT; - } else if posixly_correct == 0 && !first_arg.is_null() && *first_arg != 0 && - (*first_arg != b'-' as c_char || *((first_arg as usize + 1) as *mut c_char) != 0 ) && - decode_signal (first_arg,opt) != NO_SIG && (*list).next.is_null() { - operation = REVERT; + list = loptend; + + opt = DSIG_NOCASE | DSIG_SIGPREFIX; + + if list_signal_names != 0 { + return r_sh_chkwrite(r_display_signal_list(PT_NULL as *mut WordList, 1)); + } else if display != 0 || list.is_null() { + initialize_terminating_signals(); + get_all_original_signals(); + return r_sh_chkwrite(display_traps( + list, + (display != 0 && posixly_correct != 0) as c_int, + )); } else { - list = (*list).next; - if list.is_null() { - r_builtin_usage(); - return EX_USAGE; - } else if *first_arg == b'\0' as c_char { - operation = IGNORE; - } else if *first_arg == b'-' as c_char && *((first_arg as usize + 1) as *mut c_char) == 0 { + let mut operation = SET; + let first_arg = (*(*list).word).word; + let first_signal = !first_arg.is_null() + && *first_arg != 0 + && all_digits(first_arg) != 0 + && decode_signal(first_arg, opt) != NO_SIG; + if first_signal { operation = REVERT; + } else if posixly_correct == 0 + && !first_arg.is_null() + && *first_arg != 0 + && (*first_arg != b'-' as c_char || *((first_arg as usize + 1) as *mut c_char) != 0) + && decode_signal(first_arg, opt) != NO_SIG + && (*list).next.is_null() + { + operation = REVERT; + } else { + list = (*list).next; + if list.is_null() { + r_builtin_usage(); + return EX_USAGE; + } else if *first_arg == b'\0' as c_char { + operation = IGNORE; + } else if *first_arg == b'-' as c_char + && *((first_arg as usize + 1) as *mut c_char) == 0 + { + operation = REVERT; + } } - } - if subshell_environment & SUBSHELL_RESETTRAP != 0 { - free_trap_strings(); - subshell_environment &= !SUBSHELL_RESETTRAP; - } + if subshell_environment & SUBSHELL_RESETTRAP != 0 { + free_trap_strings(); + subshell_environment &= !SUBSHELL_RESETTRAP; + } - let mut sig: c_int; - while !list.is_null() { - sig = decode_signal((*(*list).word).word, opt); - if sig == NO_SIG { - r_sh_invalidsig((*(*list).word).word); - result = EXECUTION_FAILURE; - } else { - match operation { - SET => set_signal(sig, first_arg), - IGNORE => ignore_signal(sig), - REVERT => { - restore_default_signal(sig); - match sig { - libc::SIGINT => { - if interactive != 0 { - set_signal_handler(libc::SIGINT, sigint_sighandler as *mut SigHandler); - } else if interactive_shell != 0 && - (sourcelevel != 0 || running_trap != 0 || parse_and_execute_level != 0) { - set_signal_handler(libc::SIGINT, sigint_sighandler as *mut SigHandler); - } else { - set_signal_handler(libc::SIGINT, termsig_sighandler as *mut SigHandler); + let mut sig: c_int; + while !list.is_null() { + sig = decode_signal((*(*list).word).word, opt); + if sig == NO_SIG { + r_sh_invalidsig((*(*list).word).word); + result = EXECUTION_FAILURE; + } else { + match operation { + SET => set_signal(sig, first_arg), + IGNORE => ignore_signal(sig), + REVERT => { + restore_default_signal(sig); + match sig { + libc::SIGINT => { + if interactive != 0 { + set_signal_handler( + libc::SIGINT, + sigint_sighandler as *mut SigHandler, + ); + } else if interactive_shell != 0 + && (sourcelevel != 0 + || running_trap != 0 + || parse_and_execute_level != 0) + { + set_signal_handler( + libc::SIGINT, + sigint_sighandler as *mut SigHandler, + ); + } else { + set_signal_handler( + libc::SIGINT, + termsig_sighandler as *mut SigHandler, + ); + } } - } - libc::SIGQUIT => { - set_signal_handler(libc::SIGQUIT, std::mem::transmute(1_usize)); - } - libc::SIGTERM | libc::SIGTTIN | libc::SIGTTOU | libc::SIGTSTP => { - if interactive != 0 { - set_signal_handler(sig, std::mem::transmute(1_usize)); + libc::SIGQUIT => { + set_signal_handler(libc::SIGQUIT, std::mem::transmute(1_usize)); + } + libc::SIGTERM | libc::SIGTTIN | libc::SIGTTOU | libc::SIGTSTP => { + if interactive != 0 { + set_signal_handler(sig, std::mem::transmute(1_usize)); + } } + _ => (), } - _ => (), + break; } - break; + _ => (), } - _ => (), } - } - list = (*list).next; + list = (*list).next; + } } } -} return result; } -unsafe fn showtrap(i: c_int, show_default: c_int) -{ +unsafe fn showtrap(i: c_int, show_default: c_int) { let t: *mut c_char; let p = trap_list[i as usize]; @@ -134,21 +154,58 @@ unsafe fn showtrap(i: c_int, show_default: c_int) } else if signal_is_hard_ignored(i) != 0 { t = PT_NULL as *mut c_char; } else { - t = if p == libc::SIG_IGN as *mut c_char {PT_NULL as *mut c_char} else {sh_single_quote(p)} + t = if p == libc::SIG_IGN as *mut c_char { + PT_NULL as *mut c_char + } else { + sh_single_quote(p) + } } let sn = signal_name(i); - if libc::strncmp(sn, "SIGJUNK\0".as_ptr() as *const c_char, 7) == 0 || - libc::strncmp(sn, "unknown\0".as_ptr() as *const c_char, 7) == 0 { - libc::printf("trap -- %s %d\n\0".as_ptr() as *const c_char, if t.is_null() {"''\0".as_ptr() as *mut c_char} else {t}, i); + if libc::strncmp(sn, "SIGJUNK\0".as_ptr() as *const c_char, 7) == 0 + || libc::strncmp(sn, "unknown\0".as_ptr() as *const c_char, 7) == 0 + { + libc::printf( + "trap -- %s %d\n\0".as_ptr() as *const c_char, + if t.is_null() { + "''\0".as_ptr() as *mut c_char + } else { + t + }, + i, + ); } else if posixly_correct != 0 { if libc::strncmp(sn, "SIG\0".as_ptr() as *const c_char, 3) == 0 { - libc::printf("trap -- %s %s\n\0".as_ptr() as *const c_char, if t.is_null() {"''\0".as_ptr() as *mut c_char} else {t}, (sn as usize + 3) as *mut c_char); + libc::printf( + "trap -- %s %s\n\0".as_ptr() as *const c_char, + if t.is_null() { + "''\0".as_ptr() as *mut c_char + } else { + t + }, + (sn as usize + 3) as *mut c_char, + ); } else { - libc::printf("trap -- %s %s\n\0".as_ptr() as *const c_char, if t.is_null() {"''\0".as_ptr() as *mut c_char} else {t}, sn); + libc::printf( + "trap -- %s %s\n\0".as_ptr() as *const c_char, + if t.is_null() { + "''\0".as_ptr() as *mut c_char + } else { + t + }, + sn, + ); } } else { - libc::printf("trap -- %s %s\n\0".as_ptr() as *const c_char, if t.is_null() {"''\0".as_ptr() as *mut c_char} else {t}, sn); + libc::printf( + "trap -- %s %s\n\0".as_ptr() as *const c_char, + if t.is_null() { + "''\0".as_ptr() as *mut c_char + } else { + t + }, + sn, + ); } if show_default == 0 { @@ -158,8 +215,7 @@ unsafe fn showtrap(i: c_int, show_default: c_int) } } -unsafe fn display_traps(mut list: *mut WordList, show_all: c_int) -> c_int -{ +unsafe fn display_traps(mut list: *mut WordList, show_all: c_int) -> c_int { if list.is_null() { for i in 0..BASH_NSIG { showtrap(i, show_all); diff --git a/bash-5.1/builtins_rust/type/src/lib.rs b/bash-5.1/builtins_rust/type/src/lib.rs index be74225bd818649b9c855c150c4733680c0f6c90..70a4b2c8b55147d55f5512726442198bbd09ddb9 100644 --- a/bash-5.1/builtins_rust/type/src/lib.rs +++ b/bash-5.1/builtins_rust/type/src/lib.rs @@ -1,351 +1,409 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -extern crate libc; +extern crate libc; extern crate nix; use libc::c_void; use std::ffi::CStr; use std::ffi::CString; -use std::ptr; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN,r_builtin_usage,get_local_str}; + +use rcommon::{get_local_str, WordDesc, WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; -use fluent_bundle::{FluentBundle, FluentResource, FluentValue, FluentArgs}; +use fluent_bundle::FluentArgs; use fluent_resmgr::resource_manager::ResourceManager; #[macro_export] -macro_rules! CDESC_ALL{ +macro_rules! CDESC_ALL { //print all descriptions of a command - () => {0x001} + () => { + 0x001 + }; } #[macro_export] macro_rules! CDESC_SHORTDESC { //print the description for type and command -V - () => {0x002} + () => { + 0x002 + }; } #[macro_export] -macro_rules! CDESC_REUSABLE{ +macro_rules! CDESC_REUSABLE { //print in a format that may be reused as input - () => {0x004} + () => { + 0x004 + }; } #[macro_export] macro_rules! CDESC_TYPE { //print the type for type -t - () => {0x008} + () => { + 0x008 + }; } #[macro_export] macro_rules! CDESC_PATH_ONLY { //print the path for type -p - () => {0x010} + () => { + 0x010 + }; } #[macro_export] macro_rules! CDESC_FORCE_PATH { //force a path search for type -P - () => {0x020} + () => { + 0x020 + }; } #[macro_export] macro_rules! CDESC_NOFUNCS { //skip function lookup for type -f - () => {0x040} + () => { + 0x040 + }; } #[macro_export] -macro_rules! CDESC_ABSPATH{ +macro_rules! CDESC_ABSPATH { //CDESC_ABSPATH - () => {0x080} + () => { + 0x080 + }; } #[macro_export] -macro_rules! CDESC_STDPATH{ - () => {0x100} +macro_rules! CDESC_STDPATH { + () => { + 0x100 + }; } #[macro_export] macro_rules! CHECK_HELPOPT { - ($l:expr) => { - if $l !=std::ptr::null_mut() && (*$l).word !=std::ptr::null_mut() && ISHELP!((*(*$l).word).word) == 0 { - r_builtin_help (); - return EX_USAGE; - } - } + ($l:expr) => { + if $l != std::ptr::null_mut() + && (*$l).word != std::ptr::null_mut() + && ISHELP!((*(*$l).word).word) == 0 + { + r_builtin_help(); + return EX_USAGE; + } + }; } - - #[macro_export] -macro_rules! FS_EXECABLE{ - () => {0x2} +macro_rules! FS_EXECABLE { + () => { + 0x2 + }; } #[macro_export] -macro_rules! FS_EXEC_PREFERRED{ - () => {0x4} +macro_rules! FS_EXEC_PREFERRED { + () => { + 0x4 + }; } #[macro_export] -macro_rules! FS_NODIRS{ - () => {0x20} +macro_rules! FS_NODIRS { + () => { + 0x20 + }; } #[macro_export] -macro_rules! MP_DOCWD{ - () => {0} +macro_rules! MP_DOCWD { + () => { + 0 + }; } #[macro_export] -macro_rules! MP_RMDOT{ - () => {1} +macro_rules! MP_RMDOT { + () => { + 1 + }; } #[deny(missing_fragment_specifier)] #[macro_export] -macro_rules! STREQ{ - ($a:expr,$b:expr) =>{ - *$a as libc::c_char == *$b as libc::c_char && libc::strcmp($a,$b)==0 - } +macro_rules! STREQ { + ($a:expr,$b:expr) => { + *$a as libc::c_char == *$b as libc::c_char && libc::strcmp($a, $b) == 0 + }; } #[macro_export] -macro_rules! SIZEOFWORD{ +macro_rules! SIZEOFWORD { () => { - std::mem::size_of::() - } + std::mem::size_of::() + }; } - #[repr(C)] pub struct SHELL_VAR { - name:*mut libc::c_char, - value:*mut libc::c_char, - exportstr:*mut libc::c_char, - dynamic_value:*mut fn(v:* mut SHELL_VAR)->*mut SHELL_VAR, - assign_func:* mut fn(v:* mut SHELL_VAR,str1:* mut libc::c_char,t:i64,str2:* mut libc::c_char)->*mut SHELL_VAR, - attributes:i32, - context:i32 + name: *mut libc::c_char, + value: *mut libc::c_char, + exportstr: *mut libc::c_char, + dynamic_value: *mut fn(v: *mut SHELL_VAR) -> *mut SHELL_VAR, + assign_func: *mut fn( + v: *mut SHELL_VAR, + str1: *mut libc::c_char, + t: i64, + str2: *mut libc::c_char, + ) -> *mut SHELL_VAR, + attributes: i32, + context: i32, } -#[repr (C)] -#[derive(Copy,Clone)] +#[repr(C)] +#[derive(Copy, Clone)] pub struct alias { - name :*mut libc::c_char, - value :*mut libc::c_char , - flags:libc::c_char + name: *mut libc::c_char, + value: *mut libc::c_char, + flags: libc::c_char, } type sh_builtin_func_t = fn(WordList) -> i32; type alias_t = alias; -pub fn math(op: fn(i32, i32) -> i32, a: i32, b: i32) -> i32{ +pub fn math(op: fn(i32, i32) -> i32, a: i32, b: i32) -> i32 { /// 通过函数指针调用函数 op(a, b) } - #[repr(C)] pub struct COMMAND { - type_c:command_type, - flags:i32, - line:i32, - redirects:*mut REDIRECT, - value:VALUE_COMMAND + type_c: command_type, + flags: i32, + line: i32, + redirects: *mut REDIRECT, + value: VALUE_COMMAND, } #[repr(u8)] -enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select, - cm_connection, cm_function_def, cm_until, cm_group, - cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc +enum command_type { + cm_for, + cm_case, + cm_while, + cm_if, + cm_simple, + cm_select, + cm_connection, + cm_function_def, + cm_until, + cm_group, + cm_arith, + cm_cond, + cm_arith_for, + cm_subshell, + cm_coproc, } #[repr(C)] pub union VALUE_COMMAND { - For:*mut for_com, - Case:*mut case_com, - While:*mut while_com, - If:*mut if_com, - Connection:*mut connection, - Simple:*mut simple_com, - Function_def:*mut function_def, - Group:*mut group_com, - Select:*mut select_com, - Arith:*mut arith_com, - Cond:*mut cond_com, - ArithFor:*mut arith_for_com, - Subshell:*mut subshell_com, - Coproc:*mut coproc_com + For: *mut for_com, + Case: *mut case_com, + While: *mut while_com, + If: *mut if_com, + Connection: *mut connection, + Simple: *mut simple_com, + Function_def: *mut function_def, + Group: *mut group_com, + Select: *mut select_com, + Arith: *mut arith_com, + Cond: *mut cond_com, + ArithFor: *mut arith_for_com, + Subshell: *mut subshell_com, + Coproc: *mut coproc_com, } #[repr(u8)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] enum r_instruction { - r_output_direction, r_input_direction, r_inputa_direction, - r_appending_to, r_reading_until, r_reading_string, - r_duplicating_input, r_duplicating_output, r_deblank_reading_until, - r_close_this, r_err_and_out, r_input_output, r_output_force, - r_duplicating_input_word, r_duplicating_output_word, - r_move_input, r_move_output, r_move_input_word, r_move_output_word, - r_append_err_and_out + r_output_direction, + r_input_direction, + r_inputa_direction, + r_appending_to, + r_reading_until, + r_reading_string, + r_duplicating_input, + r_duplicating_output, + r_deblank_reading_until, + r_close_this, + r_err_and_out, + r_input_output, + r_output_force, + r_duplicating_input_word, + r_duplicating_output_word, + r_move_input, + r_move_output, + r_move_input_word, + r_move_output_word, + r_append_err_and_out, } #[repr(C)] pub union REDIRECT { - next:*mut REDIRECT, - redirector:REDIRECTEE, - rflags: i32 , - flags: i32 , - instruction:r_instruction, - redirectee:REDIRECTEE, - here_doc_eof:*mut libc::c_char + next: *mut REDIRECT, + redirector: REDIRECTEE, + rflags: i32, + flags: i32, + instruction: r_instruction, + redirectee: REDIRECTEE, + here_doc_eof: *mut libc::c_char, } #[repr(C)] pub struct for_com { - flags: i32 , - line: i32 , - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: i32, + line: i32, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] -#[derive(Copy,Clone)] +#[derive(Copy, Clone)] pub union REDIRECTEE { - dest: i32 , - filename:* mut WordDesc + dest: i32, + filename: *mut WordDesc, } #[repr(C)] pub struct case_com { flags: i32, line: i32, - word:*mut WordDesc, - clauses:*mut PATTERN_LIST + word: *mut WordDesc, + clauses: *mut PATTERN_LIST, } #[repr(C)] pub struct PATTERN_LIST { - next:* mut PATTERN_LIST, - patterns:* mut WordList, - action:*mut COMMAND, - flags:i32 + next: *mut PATTERN_LIST, + patterns: *mut WordList, + action: *mut COMMAND, + flags: i32, } #[repr(C)] pub struct while_com { - flags: i32 , - test:*mut COMMAND, - action:*mut COMMAND + flags: i32, + test: *mut COMMAND, + action: *mut COMMAND, } #[repr(C)] pub struct if_com { flags: i32, - test:*mut COMMAND, - true_case:*mut COMMAND, - false_case:*mut COMMAND + test: *mut COMMAND, + true_case: *mut COMMAND, + false_case: *mut COMMAND, } #[repr(C)] pub struct connection { - ignore: i32 , - first:*mut COMMAND, - second:*mut COMMAND, - connector: i32 + ignore: i32, + first: *mut COMMAND, + second: *mut COMMAND, + connector: i32, } #[repr(C)] pub struct simple_com { - flags: i32 , - line: i32 , - words:*mut WordList, - redirects:*mut REDIRECT + flags: i32, + line: i32, + words: *mut WordList, + redirects: *mut REDIRECT, } #[repr(C)] pub struct function_def { - flags: i32 , - line: i32 , - name:*mut WordDesc, - command:*mut COMMAND, - source_file:*mut libc::c_char + flags: i32, + line: i32, + name: *mut WordDesc, + command: *mut COMMAND, + source_file: *mut libc::c_char, } #[repr(C)] pub struct group_com { - ignore: i32 , - command:*mut COMMAND, - source_file:*mut libc::c_char + ignore: i32, + command: *mut COMMAND, + source_file: *mut libc::c_char, } #[repr(C)] pub struct select_com { - flags: i32 , - line: i32 , - name:*mut WordDesc, - map_list:*mut WordList, - action:*mut COMMAND + flags: i32, + line: i32, + name: *mut WordDesc, + map_list: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct arith_com { - flags: i32 , - line: i32 , - exp:*mut WordList + flags: i32, + line: i32, + exp: *mut WordList, } #[repr(C)] pub struct cond_com { - flags: i32 , - line: i32 , - type_c: i32 , - exp:*mut WordList + flags: i32, + line: i32, + type_c: i32, + exp: *mut WordList, } #[repr(C)] pub struct arith_for_com { - flags: i32 , - line: i32 , - init:*mut WordList, - test:*mut WordList, - step:*mut WordList, - action:*mut COMMAND + flags: i32, + line: i32, + init: *mut WordList, + test: *mut WordList, + step: *mut WordList, + action: *mut COMMAND, } #[repr(C)] pub struct subshell_com { - flags:i32, - line:i32, - command:*mut COMMAND + flags: i32, + line: i32, + command: *mut COMMAND, } #[repr(C)] pub struct coproc_com { - flags:i32, - name:*mut libc::c_char, - command:*mut COMMAND + flags: i32, + name: *mut libc::c_char, + command: *mut COMMAND, } #[macro_export] macro_rules! FUNC_MULTILINE { - () => { - 0x01 - } + () => { + 0x01 + }; } #[macro_export] macro_rules! FUNC_EXTERNAL { - () => { - 0x02 - } + () => { + 0x02 + }; } #[macro_export] macro_rules! FS_EXEC_ONLY { () => { - 0x8 - } + 0x8 + }; } #[macro_export] @@ -353,7 +411,7 @@ macro_rules! ABSPATH { ($s :expr) => { unsafe { char::from(*($s as *mut libc::c_char) as u8) }== '/'; - + // $x == '/'; } } @@ -361,471 +419,476 @@ macro_rules! ABSPATH { extern "C" { fn reset_internal_getopt(); - fn internal_getopt (list:*mut WordList , opts:*mut libc::c_char)->i32; + fn internal_getopt(list: *mut WordList, opts: *mut libc::c_char) -> i32; fn builtin_usage(); - fn sh_notfound (name:* mut libc::c_char); - fn sh_chkwrite (ret:i32)->i32; - fn find_alias(alia :*mut libc::c_char) ->alias_t; + fn sh_notfound(name: *mut libc::c_char); + fn sh_chkwrite(ret: i32) -> i32; + fn find_alias(alia: *mut libc::c_char) -> alias_t; fn sh_single_quote(quote: *const libc::c_char) -> *mut libc::c_char; - fn find_reserved_word(word: *mut libc::c_char)->i32; - fn find_function (name:* const libc::c_char)-> *mut SHELL_VAR; - fn named_function_string (name: *mut libc::c_char, cmd:* mut COMMAND, i:i32)->* mut libc::c_char; + fn find_reserved_word(word: *mut libc::c_char) -> i32; + fn find_function(name: *const libc::c_char) -> *mut SHELL_VAR; + fn named_function_string( + name: *mut libc::c_char, + cmd: *mut COMMAND, + i: i32, + ) -> *mut libc::c_char; fn find_shell_builtin(builtin: *mut libc::c_char) -> *mut libc::c_char; fn find_special_builtin(builtins: *mut libc::c_char) -> *mut sh_builtin_func_t; - fn absolute_program(program:*const libc::c_char) -> i32; - fn file_status(status :*const libc::c_char) -> i32 ; - fn phash_search(search:*const libc::c_char) -> *mut libc::c_char; + fn absolute_program(program: *const libc::c_char) -> i32; + fn file_status(status: *const libc::c_char) -> i32; + fn phash_search(search: *const libc::c_char) -> *mut libc::c_char; fn conf_standard_path() -> *mut libc::c_char; - fn find_in_path(path1:*const libc::c_char, path2:*mut libc::c_char, num: i32) -> *mut libc::c_char; - fn find_user_command(cmd:*mut libc::c_char) -> *mut libc::c_char; - fn user_command_matches(cmd:*const libc::c_char, num1:i32, num2:i32) -> *mut libc::c_char; - fn sh_makepath(path:*const libc::c_char, path1:*const libc::c_char, i: i32) -> *mut libc::c_char; + fn find_in_path( + path1: *const libc::c_char, + path2: *mut libc::c_char, + num: i32, + ) -> *mut libc::c_char; + fn find_user_command(cmd: *mut libc::c_char) -> *mut libc::c_char; + fn user_command_matches(cmd: *const libc::c_char, num1: i32, num2: i32) -> *mut libc::c_char; + fn sh_makepath( + path: *const libc::c_char, + path1: *const libc::c_char, + i: i32, + ) -> *mut libc::c_char; //fn find_alias(alia : *mut libc::c_char) -> *mut alias_t; - static expand_aliases : i32; - static mut loptend:*mut WordList; - static posixly_correct:i32; + static expand_aliases: i32; + static mut loptend: *mut WordList; + static posixly_correct: i32; } -unsafe fn function_cell(var:*mut SHELL_VAR) ->* mut COMMAND { - return (*var).value as * mut COMMAND; +unsafe fn function_cell(var: *mut SHELL_VAR) -> *mut COMMAND { + return (*var).value as *mut COMMAND; } #[no_mangle] -pub unsafe extern "C" fn r_type_builtin (mut list :*mut WordList) -> i32 { +pub unsafe extern "C" fn r_type_builtin(mut list: *mut WordList) -> i32 { //println!("rtype is run"); - let mut dflags : i32; - let mut any_failed: i32 = 0 ; - let mut opt : i32 = 0; - let mut this : *mut WordList; - - dflags = CDESC_SHORTDESC!(); /* default */ - unsafe{ - this = list; - while this != std::ptr::null_mut() && char::from((*(*(*this).word).word) as u8) == '-' { - let mut flag = (((*(*this).word).word) as usize + 1) as *mut libc::c_char; - let mut c_str_type = CString::new("type").unwrap(); - let c_str_type1 = CString::new("-type").unwrap(); - let c_str_path = CString::new("path").unwrap(); - let c_str_path1 = CString::new("-path").unwrap(); - let c_str_all = CString::new("all").unwrap(); - let c_str_all1 = CString::new("-all").unwrap(); - if STREQ!(flag, c_str_type.as_ptr() as *mut libc::c_char ) || STREQ!(flag, c_str_type1.as_ptr() as *mut libc::c_char) { - unsafe { - *((*(*this).word).word).offset(1) = 't' as libc::c_char ; - *((*(*this).word).word).offset(2) = '\0' as libc::c_char ; - } - } - else if STREQ!(flag, c_str_path.as_ptr() as *mut libc::c_char) || STREQ!(flag, c_str_path1.as_ptr() as *mut libc::c_char){ - *((*(*this).word).word).offset(1) = 'p' as libc::c_char ; - *((*(*this).word).word).offset(2) = '\0' as libc::c_char ; - } - - else if STREQ!(flag, c_str_all.as_ptr() as *mut libc::c_char) || STREQ!(flag, c_str_all1.as_ptr() as *mut libc::c_char) { - *((*(*this).word).word).offset(1) = 'a' as libc::c_char ; - *((*(*this).word).word).offset(2) = '\0' as libc::c_char ; - } + let mut dflags: i32; + let mut any_failed: i32 = 0; + let _opt: i32 = 0; + let mut this: *mut WordList; - if (*this).next != std::ptr::null_mut(){ - this = (*this).next; - } - else { - break; - } - } -} + dflags = CDESC_SHORTDESC!(); /* default */ + unsafe { + this = list; + while this != std::ptr::null_mut() && char::from((*(*(*this).word).word) as u8) == '-' { + let flag = (((*(*this).word).word) as usize + 1) as *mut libc::c_char; + let c_str_type = CString::new("type").unwrap(); + let c_str_type1 = CString::new("-type").unwrap(); + let c_str_path = CString::new("path").unwrap(); + let c_str_path1 = CString::new("-path").unwrap(); + let c_str_all = CString::new("all").unwrap(); + let c_str_all1 = CString::new("-all").unwrap(); + if STREQ!(flag, c_str_type.as_ptr() as *mut libc::c_char) + || STREQ!(flag, c_str_type1.as_ptr() as *mut libc::c_char) + { + unsafe { + *((*(*this).word).word).offset(1) = 't' as libc::c_char; + *((*(*this).word).word).offset(2) = '\0' as libc::c_char; + } + } else if STREQ!(flag, c_str_path.as_ptr() as *mut libc::c_char) + || STREQ!(flag, c_str_path1.as_ptr() as *mut libc::c_char) + { + *((*(*this).word).word).offset(1) = 'p' as libc::c_char; + *((*(*this).word).word).offset(2) = '\0' as libc::c_char; + } else if STREQ!(flag, c_str_all.as_ptr() as *mut libc::c_char) + || STREQ!(flag, c_str_all1.as_ptr() as *mut libc::c_char) + { + *((*(*this).word).word).offset(1) = 'a' as libc::c_char; + *((*(*this).word).word).offset(2) = '\0' as libc::c_char; + } + + if (*this).next != std::ptr::null_mut() { + this = (*this).next; + } else { + break; + } + } + } reset_internal_getopt(); - let c_str_afptP = CString::new("afptP").unwrap(); - let mut opt = unsafe {internal_getopt(list,c_str_afptP.as_ptr() as *mut libc::c_char) } ; - while opt != -1{ - let optu8:u8= opt as u8; - let optChar:char=char::from(optu8); - match optChar{ - 'a'=> {dflags = dflags |CDESC_ALL!();} - 'f'=> {dflags = dflags | CDESC_NOFUNCS!(); } - 'p'=> {dflags = dflags | CDESC_PATH_ONLY!(); - dflags = dflags& !(CDESC_TYPE!()|CDESC_SHORTDESC!()); } - 't'=> {dflags = dflags | CDESC_TYPE!(); - dflags = dflags& !(CDESC_PATH_ONLY!()|CDESC_SHORTDESC!());} - 'P'=> {dflags = dflags | CDESC_PATH_ONLY!()| CDESC_FORCE_PATH!(); - dflags = dflags& !(CDESC_TYPE!()|CDESC_SHORTDESC!()); + let c_str_afptP = CString::new("afptP").unwrap(); + let mut opt = unsafe { internal_getopt(list, c_str_afptP.as_ptr() as *mut libc::c_char) }; + while opt != -1 { + let optu8: u8 = opt as u8; + let optChar: char = char::from(optu8); + match optChar { + 'a' => { + dflags = dflags | CDESC_ALL!(); + } + 'f' => { + dflags = dflags | CDESC_NOFUNCS!(); + } + 'p' => { + dflags = dflags | CDESC_PATH_ONLY!(); + dflags = dflags & !(CDESC_TYPE!() | CDESC_SHORTDESC!()); + } + 't' => { + dflags = dflags | CDESC_TYPE!(); + dflags = dflags & !(CDESC_PATH_ONLY!() | CDESC_SHORTDESC!()); + } + 'P' => { + dflags = dflags | CDESC_PATH_ONLY!() | CDESC_FORCE_PATH!(); + dflags = dflags & !(CDESC_TYPE!() | CDESC_SHORTDESC!()); + } + _ => { + if opt == -99 { + r_builtin_help(); + return EX_USAGE; } - _ =>{ - if opt == -99 { - r_builtin_help(); - return EX_USAGE; - } unsafe { - builtin_usage (); - return EX_USAGE; + builtin_usage(); + return EX_USAGE; } } - } - opt = internal_getopt (list, c_str_afptP.as_ptr() as * mut libc::c_char); - } - list = loptend; - while list != std::ptr::null_mut() { - let found : i32; + } + opt = internal_getopt(list, c_str_afptP.as_ptr() as *mut libc::c_char); + } + list = loptend; + while list != std::ptr::null_mut() { + let found: i32; unsafe { - found = describe_command ((*(*list).word).word, dflags); + found = describe_command((*(*list).word).word, dflags); } - if found ==0 && (dflags & (CDESC_PATH_ONLY!()|CDESC_TYPE!()))==0 { + if found == 0 && (dflags & (CDESC_PATH_ONLY!() | CDESC_TYPE!())) == 0 { unsafe { sh_notfound((*(*list).word).word); - } + } } any_failed = found + any_failed; - any_failed == 0; - // (any_failed += found) == 0; - unsafe { - list = (*list).next; - } - + let _ = any_failed == 0; + // (any_failed += found) == 0; + unsafe { + list = (*list).next; + } } - if any_failed == 0{ + if any_failed == 0 { EXECUTION_SUCCESS!(); - } - else { + } else { EXECUTION_FAILURE!(); } - return unsafe{sh_chkwrite(opt)}; -} - - -fn describe_command (command : *mut libc::c_char, dflags : i32) -> i32 { - let mut found : i32 = 0; - let mut i : i32; - let mut found_file : i32 = 0; - let mut f : i32; - let mut all : i32; - let mut full_path : *mut libc::c_char; - let mut x : *mut libc::c_char; - let mut pathlist : *mut libc::c_char; - let mut func : *mut SHELL_VAR = 0 as *mut SHELL_VAR; - // let mut alias : *mut alias_t; - - if (dflags & CDESC_ALL!()) != 0{ - all =1 ; - } - else { + return unsafe { sh_chkwrite(opt) }; +} + +fn describe_command(command: *mut libc::c_char, dflags: i32) -> i32 { + let mut found: i32 = 0; + let mut _i: i32; + let mut found_file: i32 = 0; + let mut f: i32; + let all: i32; + let mut full_path: *mut libc::c_char; + let mut x: *mut libc::c_char; + let mut pathlist: *mut libc::c_char; + let _func: *mut SHELL_VAR = 0 as *mut SHELL_VAR; + // let mut alias : *mut alias_t; + + if (dflags & CDESC_ALL!()) != 0 { + all = 1; + } else { all = 0; } unsafe { - full_path = std::ptr::null_mut() ; + full_path = std::ptr::null_mut(); } -/* - // #if defined (ALIAS) - alias = find_alias(command); - if (((dflags & CDESC_FORCE_PATH!()) == 0) && expand_aliases!=0 && alias != std::ptr::null_mut()) - { - if (dflags & CDESC_TYPE!()) != 0{ - unsafe { - libc::puts("alias" as *const libc::c_char ); + + // #if defined (ALIAS) + alias = find_alias(command); + if (((dflags & CDESC_FORCE_PATH!()) == 0) && expand_aliases!=0 && alias != std::ptr::null_mut()) + { + if (dflags & CDESC_TYPE!()) != 0{ + unsafe { + libc::puts("alias" as *const libc::c_char ); + } } - } - else if (dflags & CDESC_SHORTDESC!()) != 0 { - unsafe{ - println!("{:?} is aliased to {:?}\n",CStr::from_ptr(command), CStr::from_ptr(alias.value)); - } - } - else if dflags & CDESC_REUSABLE!(){ - unsafe { - x = sh_single_quote((*alias).value); - println!("alias {:?} = {:?}",CStr::from_ptr(command),CStr::from_ptr(x)); - libc::free(x); - } - } - found = 1; - - if all == 0 { - return 1; - } - } -*/ + else if (dflags & CDESC_SHORTDESC!()) != 0 { + unsafe{ + println!("{:?} is aliased to {:?}\n",CStr::from_ptr(command), CStr::from_ptr(alias.value)); + } + } + else if dflags & CDESC_REUSABLE!(){ + unsafe { + x = sh_single_quote((*alias).value); + println!("alias {:?} = {:?}",CStr::from_ptr(command),CStr::from_ptr(x)); + libc::free(x); + } + } + found = 1; + + if all == 0 { + return 1; + } + } + /* Command is a shell reserved word? */ - if ((dflags & CDESC_FORCE_PATH!()) == 0) && unsafe {find_reserved_word(command)} >=0 { + if ((dflags & CDESC_FORCE_PATH!()) == 0) && unsafe { find_reserved_word(command) } >= 0 { if dflags & CDESC_TYPE!() != 0 { - unsafe{ + unsafe { let c_str_keyword = CString::new("keyword").unwrap(); libc::puts(c_str_keyword.as_ptr()); } - } - else if dflags & CDESC_SHORTDESC!() != 0 { - unsafe{ + } else if dflags & CDESC_SHORTDESC!() != 0 { + unsafe { let name = String::from("iskeyword"); - translation_fn(&name,command,std::ptr::null_mut()); + translation_fn(&name, command, std::ptr::null_mut()); } - } - else if dflags & CDESC_REUSABLE!() != 0 { + } else if dflags & CDESC_REUSABLE!() != 0 { unsafe { - println! ("{:?}",CStr::from_ptr(command)); + println!("{:?}", CStr::from_ptr(command)); } } found = 1; - if all==0 { + if all == 0 { return 1; } - } - - /* Command is a function? */ - if (dflags & (CDESC_FORCE_PATH!()|CDESC_NOFUNCS!()) == 0) && unsafe{find_function (command)}!= std::ptr::null_mut() { - if dflags & CDESC_TYPE!() != 0 { - unsafe { - let c_str_function = CString::new("function").unwrap(); - libc::puts(c_str_function.as_ptr()); - } - } - else if dflags & CDESC_SHORTDESC!() != 0 { - let mut result : *mut libc::c_char; - unsafe { - let name = String::from("isfunction"); - translation_fn(&name,command,std::ptr::null_mut()); - result = named_function_string (command, function_cell(find_function (command)), FUNC_MULTILINE!()|FUNC_EXTERNAL!()); - println!("{:?}",CStr::from_ptr(result)); - } - - } - else if dflags & CDESC_REUSABLE!() != 0{ - + } + + /* Command is a function? */ + if (dflags & (CDESC_FORCE_PATH!() | CDESC_NOFUNCS!()) == 0) + && unsafe { find_function(command) } != std::ptr::null_mut() + { + if dflags & CDESC_TYPE!() != 0 { unsafe { - println!("{:?}",CStr::from_ptr(command)); + let c_str_function = CString::new("function").unwrap(); + libc::puts(c_str_function.as_ptr()); } - } - - found = 1; + } else if dflags & CDESC_SHORTDESC!() != 0 { + let result: *mut libc::c_char; + unsafe { + let name = String::from("isfunction"); + translation_fn(&name, command, std::ptr::null_mut()); + result = named_function_string( + command, + function_cell(find_function(command)), + FUNC_MULTILINE!() | FUNC_EXTERNAL!(), + ); + println!("{:?}", CStr::from_ptr(result)); + } + } else if dflags & CDESC_REUSABLE!() != 0 { + unsafe { + println!("{:?}", CStr::from_ptr(command)); + } + } - if all == 0{ - return 1; - } - } + found = 1; - /* Command is a builtin? */ - if ((dflags & CDESC_FORCE_PATH!()) == 0) && unsafe{find_shell_builtin (command)}!= std::ptr::null_mut() { - if dflags & CDESC_TYPE!() != 0{ - unsafe { - let c_str_builtin = CString::new("builtin").unwrap(); - libc::puts(c_str_builtin.as_ptr()); + if all == 0 { + return 1; } } - else if dflags & CDESC_SHORTDESC!() != 0{ - if unsafe {posixly_correct}!= 0 && unsafe {find_special_builtin (command)} != std::ptr::null_mut() { + + /* Command is a builtin? */ + if ((dflags & CDESC_FORCE_PATH!()) == 0) + && unsafe { find_shell_builtin(command) } != std::ptr::null_mut() + { + if dflags & CDESC_TYPE!() != 0 { unsafe { - let name = String::from("special"); - translation_fn(&name,command,std::ptr::null_mut()); + let c_str_builtin = CString::new("builtin").unwrap(); + libc::puts(c_str_builtin.as_ptr()); } - - } - else { + } else if dflags & CDESC_SHORTDESC!() != 0 { + if unsafe { posixly_correct } != 0 + && unsafe { find_special_builtin(command) } != std::ptr::null_mut() + { + unsafe { + let name = String::from("special"); + translation_fn(&name, command, std::ptr::null_mut()); + } + } else { + unsafe { + let name = String::from("isbuiltin"); + translation_fn(&name, command, std::ptr::null_mut()); + } + } + } else if dflags & CDESC_REUSABLE!() != 0 { unsafe { - let name = String::from("isbuiltin"); - translation_fn(&name,command,std::ptr::null_mut()); + println!("{:?}", CStr::from_ptr(command)); } } - } - else if dflags & CDESC_REUSABLE!() != 0 { - unsafe { - println!("{:?}",CStr::from_ptr(command)); + + found = 1; + if all == 0 { + return 1; } } - found = 1; - if all == 0{ - return 1; - } - } - - /* Command is a disk file? */ - /* If the command name given is already an absolute command, just - check to see if it is executable. */ - if unsafe {absolute_program (command)} != 0 { - - f = unsafe {file_status (command)}; - if f & FS_EXECABLE!() != 0{ - if dflags & CDESC_TYPE!() != 0{ + /* Command is a disk file? */ + /* If the command name given is already an absolute command, just + check to see if it is executable. */ + if unsafe { absolute_program(command) } != 0 { + f = unsafe { file_status(command) }; + if f & FS_EXECABLE!() != 0 { + if dflags & CDESC_TYPE!() != 0 { + unsafe { + let c_str_file = CString::new("file").unwrap(); + libc::puts(c_str_file.as_ptr()); + } + } + } else if dflags & CDESC_SHORTDESC!() != 0 { unsafe { - let c_str_file = CString::new("file").unwrap(); - libc::puts(c_str_file.as_ptr()); + let name = String::from("is"); + translation_fn(&name, command, command); + } + } else if dflags & (CDESC_REUSABLE!() | CDESC_PATH_ONLY!()) != 0 { + unsafe { + println!("{:?}", CStr::from_ptr(command)); } + + /* There's no use looking in the hash table or in $PATH, + because they're not consulted when an absolute program + name is supplied. */ + return 1; } - } - else if dflags & CDESC_SHORTDESC!() != 0 { - unsafe { - let name = String::from("is"); - translation_fn(&name,command,command); - } - } - else if dflags & (CDESC_REUSABLE!()|CDESC_PATH_ONLY!()) != 0{ - unsafe { - println!("{:?}",CStr::from_ptr(command)); - } - - /* There's no use looking in the hash table or in $PATH, - because they're not consulted when an absolute program - name is supplied. */ - return 1; - } } /* If the user isn't doing "-a", then we might care about - whether the file is present in our hash table. */ - if all == 0 || (dflags & CDESC_FORCE_PATH!() != 0){ - - full_path = unsafe{phash_search (command)}; - if full_path != std::ptr::null_mut(){ - - if dflags & CDESC_TYPE!() != 0{ - unsafe{ - let c_str_file = CString::new("file").unwrap(); - libc::puts(c_str_file.as_ptr()); - } - } - else if dflags & CDESC_SHORTDESC!() != 0{ - unsafe{ - let name = String::from("hashed"); - translation_fn(&name,command,full_path); - } - } - else if (dflags & (CDESC_REUSABLE!()|CDESC_PATH_ONLY!())) != 0{ - unsafe{ - println! ("{:?} ",CStr::from_ptr(full_path)); + whether the file is present in our hash table. */ + if all == 0 || (dflags & CDESC_FORCE_PATH!() != 0) { + full_path = unsafe { phash_search(command) }; + if full_path != std::ptr::null_mut() { + if dflags & CDESC_TYPE!() != 0 { + unsafe { + let c_str_file = CString::new("file").unwrap(); + libc::puts(c_str_file.as_ptr()); + } + } else if dflags & CDESC_SHORTDESC!() != 0 { + unsafe { + let name = String::from("hashed"); + translation_fn(&name, command, full_path); + } + } else if (dflags & (CDESC_REUSABLE!() | CDESC_PATH_ONLY!())) != 0 { + unsafe { + println!("{:?} ", CStr::from_ptr(full_path)); + } + } + unsafe { + libc::free(full_path as *mut c_void); + } + return 1; } } - unsafe{ - libc::free (full_path as *mut c_void); - } - return 1; - } - } - /* Now search through $PATH. */ - #[warn(while_true)] - while true{ - if dflags & CDESC_STDPATH!() != 0 { - /* command -p, all cannot be non-zero */ - unsafe{ - pathlist = conf_standard_path (); - full_path = find_in_path (command, pathlist, FS_EXEC_PREFERRED!()|FS_NODIRS!()); + /* Now search through $PATH. */ + #[warn(while_true)] + loop { + if dflags & CDESC_STDPATH!() != 0 { + /* command -p, all cannot be non-zero */ + unsafe { + pathlist = conf_standard_path(); + full_path = find_in_path(command, pathlist, FS_EXEC_PREFERRED!() | FS_NODIRS!()); libc::free(pathlist as *mut c_void); - } - /* Will only go through this once, since all == 0 if STDPATH set */ - - } - else if all == 0{ - unsafe{ - full_path = find_user_command(command); - } - - } - else{ - unsafe { - full_path = user_command_matches (command, FS_EXEC_ONLY!(), found_file); /* XXX - should that be FS_EXEC_PREFERRED? */ + } + /* Will only go through this once, since all == 0 if STDPATH set */ + } else if all == 0 { + unsafe { + full_path = find_user_command(command); + } + } else { + unsafe { + full_path = user_command_matches(command, FS_EXEC_ONLY!(), found_file); + /* XXX - should that be FS_EXEC_PREFERRED? */ + } } - - } - if full_path == std::ptr::null_mut(){ - // return 0; - break; - } - - /* If we found the command as itself by looking through $PATH, it - probably doesn't exist. Check whether or not the command is an - executable file. If it's not, don't report a match. This is - the default posix mode behavior */ - if (unsafe {STREQ!(full_path, command)} || unsafe {posixly_correct}!=0){ - unsafe{ - f = file_status (full_path); + if full_path == std::ptr::null_mut() { + // return 0; + break; } - if (f & FS_EXECABLE!() == 0){ + + /* If we found the command as itself by looking through $PATH, it + probably doesn't exist. Check whether or not the command is an + executable file. If it's not, don't report a match. This is + the default posix mode behavior */ + if (unsafe { STREQ!(full_path, command) } || unsafe { posixly_correct } != 0) { unsafe { - libc::free (full_path as *mut c_void); - full_path = std::ptr::null_mut() ; + f = file_status(full_path); + } + if f & FS_EXECABLE!() == 0 { + unsafe { + libc::free(full_path as *mut c_void); + full_path = std::ptr::null_mut(); + } + if all == 0 { + break; + } + } else if ABSPATH!(full_path) { + } + /* placeholder; don't need to do anything yet */ + else if dflags & (CDESC_REUSABLE!() | CDESC_PATH_ONLY!() | CDESC_SHORTDESC!()) != 0 { + if MP_DOCWD!() != 0 | (dflags & CDESC_ABSPATH!()) { + f = MP_RMDOT!(); + } else { + f = 0; + } + unsafe { + x = sh_makepath(std::ptr::null_mut(), full_path, f); + libc::free(full_path as *mut c_void); + } + + full_path = x; } - if all == 0{ - break; - } - } - else if ABSPATH!(full_path){ - ; - } - /* placeholder; don't need to do anything yet */ - else if dflags & (CDESC_REUSABLE!()|CDESC_PATH_ONLY!()|CDESC_SHORTDESC!()) != 0{ - if MP_DOCWD!()!=0 | (dflags & CDESC_ABSPATH!()) { - f=MP_RMDOT!(); - } - else { - f=0; - } - unsafe { - x = sh_makepath ( std::ptr::null_mut() , full_path, f); - libc::free (full_path as *mut c_void); - } - - full_path = x; - } - } - /* If we require a full path and don't have one, make one */ - else if ((dflags & CDESC_ABSPATH!())!= 0) && ABSPATH!(full_path) == false { - unsafe { - x = sh_makepath ( std::ptr::null_mut() , full_path, MP_DOCWD!()|MP_RMDOT!()); - libc::free (full_path as *mut c_void); } - full_path = x; - } - found_file += 1; - found = 1; - if dflags & CDESC_TYPE!() != 0{ - unsafe { - let c_str_file = CString::new("file").unwrap(); - libc::puts(c_str_file.as_ptr()); - } - } - else if dflags & CDESC_SHORTDESC!() != 0{ - unsafe{ - let name = String::from("is"); - translation_fn(&name,command,full_path); + /* If we require a full path and don't have one, make one */ + else if ((dflags & CDESC_ABSPATH!()) != 0) && ABSPATH!(full_path) == false { + unsafe { + x = sh_makepath(std::ptr::null_mut(), full_path, MP_DOCWD!() | MP_RMDOT!()); + libc::free(full_path as *mut c_void); + } + full_path = x; } - - } - else if dflags & (CDESC_REUSABLE!()|CDESC_PATH_ONLY!()) != 0{ - unsafe{ - println! ("{:?}", CStr::from_ptr(full_path)); + found_file += 1; + found = 1; + if dflags & CDESC_TYPE!() != 0 { + unsafe { + let c_str_file = CString::new("file").unwrap(); + libc::puts(c_str_file.as_ptr()); + } + } else if dflags & CDESC_SHORTDESC!() != 0 { + unsafe { + let name = String::from("is"); + translation_fn(&name, command, full_path); + } + } else if dflags & (CDESC_REUSABLE!() | CDESC_PATH_ONLY!()) != 0 { + unsafe { + println!("{:?}", CStr::from_ptr(full_path)); + } } - - } - unsafe { - libc::free (full_path as *mut c_void); - } - full_path = std::ptr::null_mut() ; - if all == 0{ - break; - } - + unsafe { + libc::free(full_path as *mut c_void); + } + full_path = std::ptr::null_mut(); + if all == 0 { + break; + } } - found + found } -unsafe fn translation_fn (command:&String,args1 : *mut libc::c_char,args2 : *mut libc::c_char) { +unsafe fn translation_fn(command: &String, args1: *mut libc::c_char, args2: *mut libc::c_char) { let mgr = ResourceManager::new("/usr/share/utshell/resources/{locale}/{res_id}".into()); - let resources = vec![ "message.ftl".into()]; + let resources = vec!["message.ftl".into()]; let mut args = FluentArgs::new(); - if args1 != std::ptr::null_mut(){ - args.set("str1",format!("{:?}",CStr::from_ptr(args1).to_str().unwrap())); + if args1 != std::ptr::null_mut() { + args.set( + "str1", + format!("{:?}", CStr::from_ptr(args1).to_str().unwrap()), + ); } - if args2 != std::ptr::null_mut(){ - args.set("str2",format!("{:?}",CStr::from_ptr(args2).to_str().unwrap())); + if args2 != std::ptr::null_mut() { + args.set( + "str2", + format!("{:?}", CStr::from_ptr(args2).to_str().unwrap()), + ); } let bundle = mgr.get_bundle(get_local_str(), resources); - let mut value = bundle.get_message(command).unwrap(); - let mut pattern = value.value().expect("partern err"); + let value = bundle.get_message(command).unwrap(); + let pattern = value.value().expect("partern err"); let mut errors = vec![]; - if args1 != std::ptr::null_mut(){ - let mut msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); + if args1 != std::ptr::null_mut() { + let msg1 = bundle.format_pattern(&pattern, Some(&args), &mut errors); println!("{msg1}"); - } - else{ - let mut msg1 = bundle.format_pattern(&pattern, None, &mut errors); + } else { + let msg1 = bundle.format_pattern(&pattern, None, &mut errors); println!("{msg1}"); - } -} \ No newline at end of file + } +} diff --git a/bash-5.1/builtins_rust/ulimit/src/lib.rs b/bash-5.1/builtins_rust/ulimit/src/lib.rs index bfc018164c9ed2d56528676f5070733a33ce71e8..997e7000a6cef30c68a71df02d07e42202741fee 100644 --- a/bash-5.1/builtins_rust/ulimit/src/lib.rs +++ b/bash-5.1/builtins_rust/ulimit/src/lib.rs @@ -1,15 +1,13 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. +//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. //# SPDX-License-Identifier: GPL-3.0-or-later -extern crate libc; +extern crate libc; extern crate nix; use std::ffi::CStr; use std::ffi::CString; -use std::fmt::format; -use std::ptr; -use std::mem; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN,r_builtin_usage}; + +use rcommon::{WordList, EXECUTION_FAILURE, EXECUTION_SUCCESS, EX_USAGE}; use rhelp::r_builtin_help; #[derive(Copy, Clone)] @@ -19,167 +17,162 @@ pub struct rlimit { pub rlim_max: rlim_t, } - -#[repr (C)] -#[derive(Copy,Clone)] -pub struct RESOURCE_LIMITS{ - option : i32, /* The ulimit option for this limit. */ - parameter : i32, /* Parameter to pass to get_limit (). */ - block_factor : i32, /* Blocking factor for specific limit. */ - description : *const libc::c_char, /* Descriptive string to output. */ - units : *const libc::c_char /* scale */ +#[repr(C)] +#[derive(Copy, Clone)] +pub struct RESOURCE_LIMITS { + option: i32, /* The ulimit option for this limit. */ + parameter: i32, /* Parameter to pass to get_limit (). */ + block_factor: i32, /* Blocking factor for specific limit. */ + description: *const libc::c_char, /* Descriptive string to output. */ + units: *const libc::c_char, /* scale */ } -#[repr (C)] -#[derive(Copy,Clone)] +#[repr(C)] +#[derive(Copy, Clone)] pub struct _cmd { - cmd : i32, - arg : *mut libc::c_char -} + cmd: i32, + arg: *mut libc::c_char, +} -#[repr (C)] -#[derive(Copy,Clone)] +#[repr(C)] +#[derive(Copy, Clone)] /* Information about the current user. */ pub struct user_info { - uid : uid_t, - euid : uid_t, - gid : gid_t, - egid : gid_t, - user_name : *mut libc::c_char, - shell :*mut libc::c_char, - home_dir : *mut libc::c_char + uid: uid_t, + euid: uid_t, + gid: gid_t, + egid: gid_t, + user_name: *mut libc::c_char, + shell: *mut libc::c_char, + home_dir: *mut libc::c_char, } #[macro_export] -macro_rules! SIZEOFLIMIT{ +macro_rules! SIZEOFLIMIT { () => { - std::mem::size_of::() as usize - } + std::mem::size_of::() as usize + }; } #[macro_export] -macro_rules! SIZEOFLIMITS{ +macro_rules! SIZEOFLIMITS { () => { - SIZEOFLIMIT!() *18 - } + SIZEOFLIMIT!() * 18 + }; } #[macro_export] -macro_rules! SIZEOFULCMD{ +macro_rules! SIZEOFULCMD { () => { std::mem::size_of::() - } + }; } #[macro_export] -macro_rules! LIMIT_HARD{ +macro_rules! LIMIT_HARD { () => { - 0x01 - } + 0x01 + }; } #[macro_export] -macro_rules! LIMIT_SOFT{ +macro_rules! LIMIT_SOFT { () => { - 0x02 - } + 0x02 + }; } - #[macro_export] -macro_rules! POSIXBLK{ +macro_rules! POSIXBLK { () => { - -2 - } + -2 + }; } #[macro_export] -macro_rules! BLOCKSIZE{ +macro_rules! BLOCKSIZE { ($s:expr) => { if $s == POSIXBLK!() { - if unsafe{posixly_correct}!= 0 { + if unsafe { posixly_correct } != 0 { 512 - } - else { + } else { 1024 } - } - else { + } else { $s - } - } + } + }; } #[macro_export] -macro_rules! RLIM_SAVED_MAX{ +macro_rules! RLIM_SAVED_MAX { () => { RLIM_INFINITY!(); - } + }; } - #[deny(missing_fragment_specifier)] #[macro_export] -macro_rules! STREQ{ - ($a:expr,$b:expr) =>{ - $a==$b && libc::strcmp($a,$b)==0 - } +macro_rules! STREQ { + ($a:expr,$b:expr) => { + $a == $b && libc::strcmp($a, $b) == 0 + }; } #[macro_export] -macro_rules! NCMDS { +macro_rules! NCMDS { () => { - SIZEOFLIMITS!() / SIZEOFLIMIT!() - } + SIZEOFLIMITS!() / SIZEOFLIMIT!() + }; } #[macro_export] -macro_rules! RLIMIT_FILESIZE { +macro_rules! RLIMIT_FILESIZE { () => { 1 - } + }; } #[macro_export] macro_rules! RLIMIT_PIPESIZE { - () => { + () => { 257 - } + }; } #[macro_export] macro_rules! PIPESIZE { - () => { + () => { 4096 - } + }; } #[macro_export] macro_rules! PIPE_BUF { - () => { + () => { PIPESIZE!() - } + }; } #[macro_export] -macro_rules! RLIMIT_OPENFILES{ +macro_rules! RLIMIT_OPENFILES { () => { 7 - } + }; } #[macro_export] -macro_rules! RLIMIT_VIRTMEM{ +macro_rules! RLIMIT_VIRTMEM { () => { 9 - } + }; } #[macro_export] -macro_rules! RLIMIT_MAXUPROC{ +macro_rules! RLIMIT_MAXUPROC { () => { 6 - } + }; } #[macro_export] @@ -187,19 +180,19 @@ macro_rules! RLIM_INFINITY { () => { -1 //0x7fffffff - } + }; } #[macro_export] -macro_rules! RLIM_SAVED_CUR{ +macro_rules! RLIM_SAVED_CUR { () => { RLIM_INFINITY!() - } + }; } -type RLIMTYPE = i64; -type RESOURCE_LIMITS_T= RESOURCE_LIMITS; -type ULCMD = _cmd; +type RLIMTYPE = i64; +type RESOURCE_LIMITS_T = RESOURCE_LIMITS; +type ULCMD = _cmd; pub type __rlimit_resource = libc::c_uint; pub const __RLIM_NLIMITS: __rlimit_resource = 16; pub const __RLIMIT_NLIMITS: __rlimit_resource = 16; @@ -228,51 +221,54 @@ pub type __gid_t = i32; pub type gid_t = __gid_t; pub type uid_t = __uid_t; -static mut cmdlistsz : i32 = 0; - -const limits: [ RESOURCE_LIMITS_T;18] =[ - - { RESOURCE_LIMITS { - option: 'R' as i32, - parameter: __RLIMIT_RTTIME as i32, - block_factor: 1 as i32, - description: b"real-time non-blocking time\0" as *const u8 - as *const libc::c_char, - units: b"microseconds\0" as *const u8 as *const libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'c' as i32, - parameter: RLIMIT_CORE as i32, - block_factor: -(2 as i32), - description: b"core file size\0" as *const u8 as *const libc::c_char, - units: b"blocks\0" as *const u8 as *const libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'd' as i32, - parameter: RLIMIT_DATA as i32, - block_factor: 1024 as i32, - description: b"data seg size\0" as *const u8 as *const libc::c_char, - units: b"kbytes\0" as *const u8 as *const libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'e' as i32, - parameter: __RLIMIT_NICE as i32, - block_factor: 1 as i32, - description: b"scheduling priority\0" as *const u8 as *const libc::c_char, - units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'f' as i32, - parameter: RLIMIT_FSIZE as i32, - block_factor: -(2 as i32), - description: b"file size\0" as *const u8 as *const libc::c_char, - units: b"blocks\0" as *const u8 as *const libc::c_char, - }}, - +static mut cmdlistsz: i32 = 0; + +const limits: [RESOURCE_LIMITS_T; 18] = [ + { + RESOURCE_LIMITS { + option: 'R' as i32, + parameter: __RLIMIT_RTTIME as i32, + block_factor: 1 as i32, + description: b"real-time non-blocking time\0" as *const u8 as *const libc::c_char, + units: b"microseconds\0" as *const u8 as *const libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'c' as i32, + parameter: RLIMIT_CORE as i32, + block_factor: -(2 as i32), + description: b"core file size\0" as *const u8 as *const libc::c_char, + units: b"blocks\0" as *const u8 as *const libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'd' as i32, + parameter: RLIMIT_DATA as i32, + block_factor: 1024 as i32, + description: b"data seg size\0" as *const u8 as *const libc::c_char, + units: b"kbytes\0" as *const u8 as *const libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'e' as i32, + parameter: __RLIMIT_NICE as i32, + block_factor: 1 as i32, + description: b"scheduling priority\0" as *const u8 as *const libc::c_char, + units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'f' as i32, + parameter: RLIMIT_FSIZE as i32, + block_factor: -(2 as i32), + description: b"file size\0" as *const u8 as *const libc::c_char, + units: b"blocks\0" as *const u8 as *const libc::c_char, + } + }, { RESOURCE_LIMITS { option: 'i' as i32, @@ -282,104 +278,115 @@ const limits: [ RESOURCE_LIMITS_T;18] =[ units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, } }, - - { RESOURCE_LIMITS { - option: 'l' as i32, - parameter: __RLIMIT_MEMLOCK as i32, - block_factor: 1024 as i32, - description: b"max locked memory\0" as *const u8 as *const libc::c_char, - units: b"kbytes\0" as *const u8 as *const libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'm' as i32, - parameter: __RLIMIT_RSS as i32, - block_factor: 1024 as i32, - description: b"max memory size\0" as *const u8 as *const libc::c_char, - units: b"kbytes\0" as *const u8 as *const libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'n' as i32, - parameter: RLIMIT_NOFILE as i32, - block_factor: 1 as i32, - description: b"open files\0" as *const u8 as *const libc::c_char, - units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'p' as i32, - parameter: 257 as i32, - block_factor: 512 as i32, - description: b"pipe size\0" as *const u8 as *const libc::c_char, - units: b"512 bytes\0" as *const u8 as *const libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'q' as i32, - parameter: __RLIMIT_MSGQUEUE as i32, - block_factor: 1 as i32, - description: b"POSIX message queues\0" as *const u8 as *const libc::c_char, - units: b"bytes\0" as *const u8 as *const libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'r' as i32, - parameter: __RLIMIT_RTPRIO as i32, - block_factor: 1 as i32, - description: b"real-time priority\0" as *const u8 as *const libc::c_char, - units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 's' as i32, - parameter: RLIMIT_STACK as i32, - block_factor: 1024 as i32, - description: b"stack size\0" as *const u8 as *const libc::c_char, - units: b"kbytes\0" as *const u8 as *const libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 't' as i32, - parameter: RLIMIT_CPU as i32, - block_factor: 1 as i32, - description: b"cpu time\0" as *const u8 as *const libc::c_char, - units: b"seconds\0" as *const u8 as *const libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'u' as i32, - parameter: __RLIMIT_NPROC as i32, - block_factor: 1 as i32, - description: b"max user processes\0" as *const u8 as *const libc::c_char, - units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'v' as i32, - parameter: RLIMIT_AS as i32, - block_factor: 1024 as i32, - description: b"virtual memory\0" as *const u8 as *const libc::c_char, - units: b"kbytes\0" as *const u8 as *const libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: 'x' as i32, - parameter: __RLIMIT_LOCKS as i32, - block_factor: 1 as i32, - description: b"file locks\0" as *const u8 as *const libc::c_char, - units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, - }}, - - { RESOURCE_LIMITS { - option: -1 , - parameter: -1, - block_factor:-1, - description: 0 as *const libc::c_void as *mut libc::c_void - as *mut libc::c_char, - units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, - }} - ]; + { + RESOURCE_LIMITS { + option: 'l' as i32, + parameter: __RLIMIT_MEMLOCK as i32, + block_factor: 1024 as i32, + description: b"max locked memory\0" as *const u8 as *const libc::c_char, + units: b"kbytes\0" as *const u8 as *const libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'm' as i32, + parameter: __RLIMIT_RSS as i32, + block_factor: 1024 as i32, + description: b"max memory size\0" as *const u8 as *const libc::c_char, + units: b"kbytes\0" as *const u8 as *const libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'n' as i32, + parameter: RLIMIT_NOFILE as i32, + block_factor: 1 as i32, + description: b"open files\0" as *const u8 as *const libc::c_char, + units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'p' as i32, + parameter: 257 as i32, + block_factor: 512 as i32, + description: b"pipe size\0" as *const u8 as *const libc::c_char, + units: b"512 bytes\0" as *const u8 as *const libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'q' as i32, + parameter: __RLIMIT_MSGQUEUE as i32, + block_factor: 1 as i32, + description: b"POSIX message queues\0" as *const u8 as *const libc::c_char, + units: b"bytes\0" as *const u8 as *const libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'r' as i32, + parameter: __RLIMIT_RTPRIO as i32, + block_factor: 1 as i32, + description: b"real-time priority\0" as *const u8 as *const libc::c_char, + units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 's' as i32, + parameter: RLIMIT_STACK as i32, + block_factor: 1024 as i32, + description: b"stack size\0" as *const u8 as *const libc::c_char, + units: b"kbytes\0" as *const u8 as *const libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 't' as i32, + parameter: RLIMIT_CPU as i32, + block_factor: 1 as i32, + description: b"cpu time\0" as *const u8 as *const libc::c_char, + units: b"seconds\0" as *const u8 as *const libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'u' as i32, + parameter: __RLIMIT_NPROC as i32, + block_factor: 1 as i32, + description: b"max user processes\0" as *const u8 as *const libc::c_char, + units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'v' as i32, + parameter: RLIMIT_AS as i32, + block_factor: 1024 as i32, + description: b"virtual memory\0" as *const u8 as *const libc::c_char, + units: b"kbytes\0" as *const u8 as *const libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: 'x' as i32, + parameter: __RLIMIT_LOCKS as i32, + block_factor: 1 as i32, + description: b"file locks\0" as *const u8 as *const libc::c_char, + units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, + } + }, + { + RESOURCE_LIMITS { + option: -1, + parameter: -1, + block_factor: -1, + description: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, + units: 0 as *const libc::c_void as *mut libc::c_void as *mut libc::c_char, + } + }, +]; extern "C" { fn reset_internal_getopt(); @@ -390,39 +397,36 @@ extern "C" { fn internal_getopt(_: *mut WordList, _: *mut libc::c_char) -> i32; fn strerror(_: i32) -> *mut libc::c_char; fn sprintf(_: *mut libc::c_char, _: *const libc::c_char, _: ...) -> i32; - fn string_to_rlimtype(_: *mut libc::c_char ) -> rlim_t; + fn string_to_rlimtype(_: *mut libc::c_char) -> rlim_t; fn getdtablesize() -> i32; fn builtin_usage(); - fn sh_erange (s:* mut libc::c_char, desc:* mut libc::c_char); + fn sh_erange(s: *mut libc::c_char, desc: *mut libc::c_char); fn sh_invalidnum(arg1: *mut libc::c_char); fn __errno_location() -> *mut i32; fn getrlimit(__resource: __rlimit_resource_t, __rlimits: *mut rlimit) -> i32; - fn setrlimit( - __resource: __rlimit_resource_t, - __rlimits: *const rlimit, - ) -> i32; + fn setrlimit(__resource: __rlimit_resource_t, __rlimits: *const rlimit) -> i32; fn builtin_error(_: *const libc::c_char, _: ...); fn getmaxchild() -> i64; - + static mut loptend: *mut WordList; static mut list_optarg: *mut libc::c_char; - static mut posixly_correct:i32 ; + static mut posixly_correct: i32; static mut current_user: user_info; } -static mut optstring:[ libc::c_char;4 + 2 * NCMDS!() as usize] = [0;4 + 2 * NCMDS!() as usize]; -static mut cmdlist : *mut ULCMD = 0 as *const ULCMD as *mut ULCMD; -static mut ncmd : i32 = 0; +static mut optstring: [libc::c_char; 4 + 2 * NCMDS!() as usize] = [0; 4 + 2 * NCMDS!() as usize]; +static mut cmdlist: *mut ULCMD = 0 as *const ULCMD as *mut ULCMD; +static mut ncmd: i32 = 0; -fn _findlim (opt:i32) -> i32{ - // let mut register : i32; +fn _findlim(opt: i32) -> i32 { + // let mut register : i32; //let i : i32 = 0; for i in 0..17 { - if limits[i].option > 0{ - if limits[i].option == opt { - return i as i32; + if limits[i].option > 0 { + if limits[i].option == opt { + return i as i32; } } } @@ -430,55 +434,60 @@ fn _findlim (opt:i32) -> i32{ } #[no_mangle] -pub unsafe extern "C" fn r_ulimit_builtin(mut list: *mut WordList) -> i32{ - - let mut s : *mut libc::c_char; - let mut c : i32 ; - let mut limind : i32 ; - let mut mode : i32 = 0 ; - let mut opt : i32 = 0 ; - let mut all_limits : i32 = 0 ; +pub unsafe extern "C" fn r_ulimit_builtin(mut list: *mut WordList) -> i32 { + let mut s: *mut libc::c_char; + let c: i32; + let mut limind: i32; + let mut mode: i32 = 0; + let mut opt: i32 = 0; + let mut all_limits: i32 = 0; if optstring[0] == 0 { - s = optstring.as_mut_ptr(); - s = s.offset(0); - *s = 'a' as libc::c_char; - s = s.offset(1); - *s = 'S' as libc::c_char; - s = s.offset(1); - *s = 'H' as libc::c_char; - s = s.offset(1); - c = 0 ; + s = optstring.as_mut_ptr(); + s = s.offset(0); + *s = 'a' as libc::c_char; + s = s.offset(1); + *s = 'S' as libc::c_char; + s = s.offset(1); + *s = 'H' as libc::c_char; + s = s.offset(1); + c = 0; for i in 0..17 { - if limits[i].option > 0{ + if limits[i].option > 0 { *s = limits[i].option as libc::c_char; - s = s.offset(1); - *s = ';' as libc::c_char; - s = s.offset(1); - } + s = s.offset(1); + *s = ';' as libc::c_char; + s = s.offset(1); + } } - *s = '\0' as libc::c_char; + *s = '\0' as libc::c_char; } - if cmdlistsz == 0{ - cmdlistsz = 16; + if cmdlistsz == 0 { + cmdlistsz = 16; unsafe { - cmdlist = - xmalloc ((cmdlistsz as u64)*(std::mem::size_of::() as libc::c_ulong) ) as *mut ULCMD; + cmdlist = xmalloc((cmdlistsz as u64) * (std::mem::size_of::() as libc::c_ulong)) + as *mut ULCMD; } } ncmd = 0; - reset_internal_getopt (); + reset_internal_getopt(); opt = internal_getopt(list, optstring.as_ptr() as *mut libc::c_char); while opt != -1 { - let optu8:u8= opt as u8; - let optChar:char=char::from(optu8); + let optu8: u8 = opt as u8; + let optChar: char = char::from(optu8); match optChar { - 'a' => { all_limits = all_limits + 1 ;} - 'S' => { mode = mode | LIMIT_SOFT!() ; } - 'H' => { mode = mode | LIMIT_HARD!();} - '?'=> { - builtin_usage(); - return EX_USAGE; + 'a' => { + all_limits = all_limits + 1; + } + 'S' => { + mode = mode | LIMIT_SOFT!(); + } + 'H' => { + mode = mode | LIMIT_HARD!(); + } + '?' => { + builtin_usage(); + return EX_USAGE; } _ => { if opt == -99 { @@ -486,9 +495,11 @@ pub unsafe extern "C" fn r_ulimit_builtin(mut list: *mut WordList) -> i32{ return EX_USAGE; } if ncmd >= cmdlistsz { - cmdlistsz = cmdlistsz * 2 ; + cmdlistsz = cmdlistsz * 2; cmdlist = xrealloc( - cmdlist as *mut libc::c_void,(cmdlistsz as u64) * std::mem::size_of::() as u64 ) as *mut ULCMD; + cmdlist as *mut libc::c_void, + (cmdlistsz as u64) * std::mem::size_of::() as u64, + ) as *mut ULCMD; } unsafe { (*cmdlist.offset(ncmd as isize)).cmd = opt; @@ -496,7 +507,7 @@ pub unsafe extern "C" fn r_ulimit_builtin(mut list: *mut WordList) -> i32{ //ncmd = ncmd + 1; let ref mut fresh6 = (*cmdlist.offset(fresh5 as isize)).arg; *fresh6 = list_optarg; - // let mut cmm =&mut (*((cmdlist as usize + + // let mut cmm =&mut (*((cmdlist as usize + // (ncmd as usize)*std::mem::size_of::())as *mut ULCMD) as ULCMD); // cmm.cmd = opt; // cmm.arg = list_optarg; @@ -504,225 +515,221 @@ pub unsafe extern "C" fn r_ulimit_builtin(mut list: *mut WordList) -> i32{ // as *mut ULCMD) as ULCMD).cmd = opt ; // (*((cmdlist as usize + (ncmd as usize) * std::mem::size_of::()) // as *mut ULCMD) as ULCMD).arg = list_optarg; - ncmd = ncmd+1; - } - + ncmd = ncmd + 1; + } } } - opt = internal_getopt (list, optstring.as_ptr() as * mut libc::c_char); - } + opt = internal_getopt(list, optstring.as_ptr() as *mut libc::c_char); + } // as *mut ULCMD) as ULCMD).cmd ); list = loptend; - if all_limits != 0 { - if mode == 0 { - print_all_limits (LIMIT_SOFT!()); - } - else { - print_all_limits (mode); - } - return sh_chkwrite(EXECUTION_SUCCESS!()); - } - - if ncmd == 0 { - unsafe { - (*cmdlist.offset(ncmd as isize)).cmd = 'f' as i32; - // let mut cmm = *((cmdlist as usize + (ncmd as usize )*std::mem::size_of::())as *mut ULCMD) as ULCMD; - // cmm.cmd = 'f' as i32; - } - /* `ulimit something' is same as `ulimit -f something' */ - if !list.is_null() { - unsafe { - (*cmdlist.offset(ncmd as isize)).arg = (*(*list).word).word; - // let mut cmm = *((cmdlist as usize + (ncmd as usize )*std::mem::size_of::())as *mut ULCMD) as ULCMD; - // cmm.arg = (*(*list).word).word; - ncmd = ncmd+1; - } - } - else { + if all_limits != 0 { + if mode == 0 { + print_all_limits(LIMIT_SOFT!()); + } else { + print_all_limits(mode); + } + return sh_chkwrite(EXECUTION_SUCCESS!()); + } + + if ncmd == 0 { + unsafe { + (*cmdlist.offset(ncmd as isize)).cmd = 'f' as i32; + // let mut cmm = *((cmdlist as usize + (ncmd as usize )*std::mem::size_of::())as *mut ULCMD) as ULCMD; + // cmm.cmd = 'f' as i32; + } + /* `ulimit something' is same as `ulimit -f something' */ + if !list.is_null() { + unsafe { + (*cmdlist.offset(ncmd as isize)).arg = (*(*list).word).word; + // let mut cmm = *((cmdlist as usize + (ncmd as usize )*std::mem::size_of::())as *mut ULCMD) as ULCMD; + // cmm.arg = (*(*list).word).word; + ncmd = ncmd + 1; + } + } else { unsafe { - (*cmdlist.offset(ncmd as isize)).arg = std::ptr::null_mut(); - // let mut cmm = *((cmdlist as usize + (ncmd as usize )*std::mem::size_of::())as *mut ULCMD) as ULCMD; - // cmm.arg = std::ptr::null_mut(); - ncmd = ncmd+1; + (*cmdlist.offset(ncmd as isize)).arg = std::ptr::null_mut(); + // let mut cmm = *((cmdlist as usize + (ncmd as usize )*std::mem::size_of::())as *mut ULCMD) as ULCMD; + // cmm.arg = std::ptr::null_mut(); + ncmd = ncmd + 1; + } } + if !list.is_null() { + list = (*list).next; + } + } + for d in 0..ncmd { + //as *mut ULCMD) as ULCMD).cmd); + let cmm = *((cmdlist as usize + (d as usize) * std::mem::size_of::()) as *mut ULCMD) + as ULCMD; + let _dmd = cmm.cmd; + + limind = _findlim((*cmdlist.offset(d as isize)).cmd); + if limind == -1 { + unsafe { + builtin_error( + b"%s: bad command : %s\0" as *const u8 as *const libc::c_char, + (*cmdlist.offset(d as isize)).cmd, + strerror(*__errno_location()) as *const libc::c_char, + ); + } + return EX_USAGE; + } } - if !list.is_null() { - list = (*list).next; + + for d in 0..ncmd { + let dmd = (*cmdlist.offset(d as isize)).cmd; + let drg = (*cmdlist.offset(d as isize)).arg; + // let dmd = (*((cmdlist as usize + (d as usize )*std::mem::size_of::()) + // as *mut ULCMD) as ULCMD).cmd; + // let drg = (*((cmdlist as usize + (d as usize )*std::mem::size_of::()) + // as *mut ULCMD) as ULCMD).arg; + if (ulimit_internal(dmd, drg, mode, d - 1)) == EXECUTION_FAILURE!() { + return EXECUTION_FAILURE!(); + } } - } + return EXECUTION_SUCCESS!(); +} - for d in 0..ncmd { - //as *mut ULCMD) as ULCMD).cmd); - let cmm = *((cmdlist as usize + (d as usize )*std::mem::size_of::())as *mut ULCMD) as ULCMD; - let dmd = cmm.cmd; +unsafe fn ulimit_internal( + cmd: i32, + cmdarg: *mut libc::c_char, + mut mode: i32, + multiple: i32, +) -> i32 { + let opt: i32; + let limind: i32; + let setting: i32; + let block_factor: i32; + let mut soft_limit: RLIMTYPE = 0; + let mut hard_limit: RLIMTYPE = 0; + let mut real_limit: RLIMTYPE = 0; + let limit: RLIMTYPE; - limind = _findlim ((*cmdlist.offset(d as isize)).cmd); - if limind == -1 { - unsafe { - builtin_error(b"%s: bad command : %s\0" as *const u8 as *const libc::c_char, - (*cmdlist.offset(d as isize)).cmd, - strerror(*__errno_location()) as *const libc::c_char); - } - return EX_USAGE; - } - } - - for d in 0..ncmd { - let dmd = (*cmdlist.offset(d as isize)).cmd; - let drg = (*cmdlist.offset(d as isize)).arg; - // let dmd = (*((cmdlist as usize + (d as usize )*std::mem::size_of::()) - // as *mut ULCMD) as ULCMD).cmd; - // let drg = (*((cmdlist as usize + (d as usize )*std::mem::size_of::()) - // as *mut ULCMD) as ULCMD).arg; - if (ulimit_internal (dmd,drg, mode, d-1)) == EXECUTION_FAILURE!() { - return EXECUTION_FAILURE!(); - } - } - return EXECUTION_SUCCESS!(); - -} - -unsafe fn ulimit_internal (cmd : i32 , cmdarg :*mut libc::c_char,mut mode : i32, multiple : i32) -> i32 { - let mut opt : i32 ; - let mut limind : i32 ; - let mut setting : i32 ; - let mut block_factor : i32 ; - let mut soft_limit : RLIMTYPE = 0; - let mut hard_limit : RLIMTYPE =0; - let mut real_limit : RLIMTYPE = 0; - let mut limit : RLIMTYPE; - if cmdarg != std::ptr::null_mut() { setting = 1; - } - else { + } else { setting = 0; } limind = _findlim(cmd); if mode == 0 { if setting != 0 { - mode = LIMIT_HARD!()|LIMIT_SOFT!(); - } - else { + mode = LIMIT_HARD!() | LIMIT_SOFT!(); + } else { mode = LIMIT_SOFT!(); } } - opt = get_limit (limind, &mut soft_limit, &mut hard_limit); + opt = get_limit(limind, &mut soft_limit, &mut hard_limit); - if opt < 0 { - unsafe { - builtin_error(b"%s: cannot get limit : %s\0" as *const u8 as *const libc::c_char, limits[limind as usize].description, - strerror(*__errno_location()) as *const libc::c_char); + if opt < 0 { + unsafe { + builtin_error( + b"%s: cannot get limit : %s\0" as *const u8 as *const libc::c_char, + limits[limind as usize].description, + strerror(*__errno_location()) as *const libc::c_char, + ); + } + + return EXECUTION_FAILURE!(); } - - return EXECUTION_FAILURE!(); - } - - if setting == 0 { - if (mode & LIMIT_SOFT!()) != 0 { - printone (limind,soft_limit,multiple); - } - else { - printone (limind,hard_limit,multiple); - } - return EXECUTION_SUCCESS!(); - } - - let mut c_str_hard = CString::new("hard").unwrap(); - let mut c_str_soft = CString::new("soft").unwrap(); - let mut c_str_unlimited = CString::new("unlimited").unwrap(); - if unsafe{STREQ!(cmdarg,c_str_hard.as_ptr() as *mut libc::c_char )}{ - real_limit = hard_limit; - } - - else if unsafe{STREQ!(cmdarg, c_str_soft.as_ptr() as *mut libc::c_char)}{ - real_limit = soft_limit; - } - else if unsafe{STREQ!(cmdarg, c_str_unlimited.as_ptr() as *mut libc::c_char)}{ - real_limit = RLIM_INFINITY!(); - } - - else if unsafe {all_digits(cmdarg)} !=0 { - limit = unsafe {string_to_rlimtype (cmdarg) as i64}; - block_factor = BLOCKSIZE!(limits[limind as usize].block_factor); - real_limit = limit * block_factor as i64; - - if (real_limit / block_factor as i64) != limit { - let c_str_limit =CString::new("limit").unwrap(); - unsafe {sh_erange (cmdarg,c_str_limit.as_ptr() as *mut libc::c_char)}; - return EXECUTION_FAILURE!(); - } - } - - else { - sh_invalidnum (cmdarg); - return EXECUTION_FAILURE!(); - } - if set_limit (limind, real_limit, mode) < 0 { - builtin_error(b"%s: cannot modify limit : %s\0" as *const u8 as *const libc::c_char, limits[limind as usize].description, - strerror(*__errno_location()) as *const libc::c_char); - return EXECUTION_FAILURE!(); + + if setting == 0 { + if (mode & LIMIT_SOFT!()) != 0 { + printone(limind, soft_limit, multiple); + } else { + printone(limind, hard_limit, multiple); + } + return EXECUTION_SUCCESS!(); + } + + let c_str_hard = CString::new("hard").unwrap(); + let c_str_soft = CString::new("soft").unwrap(); + let c_str_unlimited = CString::new("unlimited").unwrap(); + if unsafe { STREQ!(cmdarg, c_str_hard.as_ptr() as *mut libc::c_char) } { + real_limit = hard_limit; + } else if unsafe { STREQ!(cmdarg, c_str_soft.as_ptr() as *mut libc::c_char) } { + real_limit = soft_limit; + } else if unsafe { STREQ!(cmdarg, c_str_unlimited.as_ptr() as *mut libc::c_char) } { + real_limit = RLIM_INFINITY!(); + } else if unsafe { all_digits(cmdarg) } != 0 { + limit = unsafe { string_to_rlimtype(cmdarg) as i64 }; + block_factor = BLOCKSIZE!(limits[limind as usize].block_factor); + real_limit = limit * block_factor as i64; + + if (real_limit / block_factor as i64) != limit { + let c_str_limit = CString::new("limit").unwrap(); + unsafe { sh_erange(cmdarg, c_str_limit.as_ptr() as *mut libc::c_char) }; + return EXECUTION_FAILURE!(); + } + } else { + sh_invalidnum(cmdarg); + return EXECUTION_FAILURE!(); + } + if set_limit(limind, real_limit, mode) < 0 { + builtin_error( + b"%s: cannot modify limit : %s\0" as *const u8 as *const libc::c_char, + limits[limind as usize].description, + strerror(*__errno_location()) as *const libc::c_char, + ); + return EXECUTION_FAILURE!(); } return EXECUTION_SUCCESS!(); - } -fn get_limit (mut ind : i32, softlim : *mut RLIMTYPE, hardlim : *mut RLIMTYPE ) -> i32 { - let mut value : RLIMTYPE = 0 ; - let mut limit: rlimit = rlimit { rlim_cur: 1, rlim_max: 1 }; +fn get_limit(ind: i32, softlim: *mut RLIMTYPE, hardlim: *mut RLIMTYPE) -> i32 { + let mut value: RLIMTYPE = 0; + let mut limit: rlimit = rlimit { + rlim_cur: 1, + rlim_max: 1, + }; if limits[ind as usize].parameter >= 256 { match limits[ind as usize].parameter { RLIMIT_FILESIZE!() => { - if filesize (((&mut value) as *mut i64) as *mut u64) < 0 { + if filesize(((&mut value) as *mut i64) as *mut u64) < 0 { return -1; } } RLIMIT_PIPESIZE!() => { - if unsafe { - pipesize (((&mut value) as *mut i64) as *mut u64)} < 0 { - return -1; - } - + if unsafe { pipesize(((&mut value) as *mut i64) as *mut u64) } < 0 { + return -1; + } } RLIMIT_OPENFILES!() => { - value = unsafe {getdtablesize()} as RLIMTYPE ; - + value = unsafe { getdtablesize() } as RLIMTYPE; } RLIMIT_VIRTMEM!() => { - return unsafe {getmaxvm(softlim, hardlim as *mut libc::c_char) }; + return unsafe { getmaxvm(softlim, hardlim as *mut libc::c_char) }; } RLIMIT_MAXUPROC!() => { - if getmaxuprc ((value as usize) as *mut u64) < 0 { + if getmaxuprc((value as usize) as *mut u64) < 0 { return -1; } - - } - _ => { - unsafe { - *__errno_location() = libc::EINVAL; - } } + _ => unsafe { + *__errno_location() = libc::EINVAL; + }, } unsafe { - *softlim = value; + *softlim = value; *hardlim = value; } return 0; - } - else{ + } else { unsafe { - let ii = getrlimit(limits[ind as u32 as usize ].parameter as __rlimit_resource_t, - &mut limit); - if ii < 0 { - return -1; - } + let ii = getrlimit( + limits[ind as u32 as usize].parameter as __rlimit_resource_t, + &mut limit, + ); + if ii < 0 { + return -1; + } } unsafe { - // limit.rlim_max as i64); + // limit.rlim_max as i64); *softlim = limit.rlim_cur as i64; *hardlim = limit.rlim_max as i64; } @@ -730,42 +737,50 @@ fn get_limit (mut ind : i32, softlim : *mut RLIMTYPE, hardlim : *mut RLIMTYPE ) } } -fn set_limit (ind : i32, newlim : RLIMTYPE, mode : i32) -> i32{ - let mut limit : rlimit = rlimit { rlim_cur: 0, rlim_max: 0 }; - let mut val : RLIMTYPE = 0; - +fn set_limit(ind: i32, newlim: RLIMTYPE, mode: i32) -> i32 { + let mut limit: rlimit = rlimit { + rlim_cur: 0, + rlim_max: 0, + }; + let mut val: RLIMTYPE = 0; + if limits[ind as usize].parameter >= 256 { match limits[ind as usize].parameter { RLIMIT_FILESIZE!() => { unsafe { *__errno_location() = libc::EINVAL; } - return -1; + return -1; } - RLIMIT_OPENFILES!() | RLIMIT_PIPESIZE !() | - RLIMIT_VIRTMEM!() | RLIMIT_MAXUPROC !() | - _ => { + RLIMIT_OPENFILES!() + | RLIMIT_PIPESIZE!() + | RLIMIT_VIRTMEM!() + | RLIMIT_MAXUPROC!() + | _ => { unsafe { *__errno_location() = libc::EINVAL; } return -1; } } - } - else{ + } else { if unsafe { - getrlimit (limits[ind as usize].parameter - as __rlimit_resource_t,&mut limit ) - } < 0 { - return -1; + getrlimit( + limits[ind as usize].parameter as __rlimit_resource_t, + &mut limit, + ) + } < 0 + { + return -1; } - let b = unsafe {current_user.euid }!= 0 && newlim == RLIM_INFINITY!() - && (mode & LIMIT_HARD!()) == 0 && limit.rlim_cur <= limit.rlim_max; + let b = unsafe { current_user.euid } != 0 + && newlim == RLIM_INFINITY!() + && (mode & LIMIT_HARD!()) == 0 + && limit.rlim_cur <= limit.rlim_max; if b { - val = limit.rlim_max as i64; - } - else { - val = newlim; + val = limit.rlim_max as i64; + } else { + val = newlim; } if mode & LIMIT_SOFT!() != 0 { limit.rlim_cur = val as u64; @@ -773,41 +788,52 @@ fn set_limit (ind : i32, newlim : RLIMTYPE, mode : i32) -> i32{ if mode & LIMIT_HARD!() != 0 { limit.rlim_max = val as u64; } - return - unsafe {setrlimit(limits[ind as usize].parameter as __rlimit_resource_t, &mut limit)}; - } + return unsafe { + setrlimit( + limits[ind as usize].parameter as __rlimit_resource_t, + &mut limit, + ) + }; + } } -unsafe fn getmaxvm(softlim : *mut RLIMTYPE , hardlim : *mut libc::c_char) -> i32 { - let mut datalim : rlimit = rlimit { rlim_cur: 0, rlim_max: 0 }; - let mut stacklim : rlimit = rlimit { rlim_cur: 0, rlim_max: 0 }; - +unsafe fn getmaxvm(softlim: *mut RLIMTYPE, hardlim: *mut libc::c_char) -> i32 { + let mut datalim: rlimit = rlimit { + rlim_cur: 0, + rlim_max: 0, + }; + let mut stacklim: rlimit = rlimit { + rlim_cur: 0, + rlim_max: 0, + }; + if getrlimit(RLIMIT_DATA, &mut datalim) < 0 { return -1; } - if getrlimit (RLIMIT_STACK, &mut stacklim) < 0 { + if getrlimit(RLIMIT_STACK, &mut stacklim) < 0 { return -1; - } - *softlim = (datalim.rlim_cur as i64 / 1024 as i64) + (stacklim.rlim_cur as i64/1024 as i64); - *hardlim = ((datalim.rlim_max as i64) /1024 as i64) as libc::c_char + (stacklim.rlim_max as i64/1024 as i64) as libc::c_char; + } + *softlim = (datalim.rlim_cur as i64 / 1024 as i64) + (stacklim.rlim_cur as i64 / 1024 as i64); + *hardlim = ((datalim.rlim_max as i64) / 1024 as i64) as libc::c_char + + (stacklim.rlim_max as i64 / 1024 as i64) as libc::c_char; return 0; } - -fn filesize(mut valuep: *mut rlim_t) -> i32 { + +fn filesize(_valuep: *mut rlim_t) -> i32 { unsafe { *__errno_location() = libc::EINVAL; } return -1; } -unsafe fn pipesize(mut valuep: *mut rlim_t) -> i32 { - *((valuep as usize) as *mut rlim_t) = PIPE_BUF!() as rlim_t; - return 0 ; +unsafe fn pipesize(valuep: *mut rlim_t) -> i32 { + *((valuep as usize) as *mut rlim_t) = PIPE_BUF!() as rlim_t; + return 0; } -fn getmaxuprc(mut valuep: *mut rlim_t) -> i32 { +fn getmaxuprc(valuep: *mut rlim_t) -> i32 { let mut maxchild: i64 = 0; - maxchild = unsafe{getmaxchild()}; + maxchild = unsafe { getmaxchild() }; if maxchild < 0 as i32 as libc::c_long { unsafe { *__errno_location() = libc::EINVAL; @@ -816,85 +842,94 @@ fn getmaxuprc(mut valuep: *mut rlim_t) -> i32 { } else { unsafe { *valuep = maxchild as rlim_t; - } - return 0 ; + } + return 0; }; } -fn print_all_limits (mut mode : i32) { - let mut i : i32 ; - let mut softlim : RLIMTYPE = 0; - let mut hardlim : RLIMTYPE = 0; - - if mode == 0 - { +fn print_all_limits(mut mode: i32) { + let mut i: i32; + let mut softlim: RLIMTYPE = 0; + let mut hardlim: RLIMTYPE = 0; + + if mode == 0 { mode = mode | LIMIT_SOFT!(); } i = 0; - while limits[i as usize].option >0 { - + while limits[i as usize].option > 0 { if get_limit(i, &mut softlim, &mut hardlim) == 0 { if mode & LIMIT_SOFT!() != 0 { - printone(i,softlim,1); + printone(i, softlim, 1); + } else { + printone(i, hardlim, 1); } - else { - printone(i, hardlim,1); + } else if unsafe { *__errno_location() != libc::EINVAL } { + unsafe { + builtin_error( + b"%s: cannot get limit : %s\0" as *const u8 as *const libc::c_char, + limits[i as usize].description, + strerror(*__errno_location()) as *const libc::c_char, + ); } } - else if unsafe { - *__errno_location() != libc::EINVAL } { - unsafe { - builtin_error(b"%s: cannot get limit : %s\0" as *const u8 as *const libc::c_char, limits[i as usize].description, - strerror(*__errno_location()) as *const libc::c_char); - } - } - i = i+1; + i = i + 1; } } -fn printone (limind : i32, curlim :RLIMTYPE , pdesc : i32){ - let mut unitstr :[ libc::c_char; 64] = [0 ; 64]; - let mut factor : i32 ; +fn printone(limind: i32, curlim: RLIMTYPE, pdesc: i32) { + let mut unitstr: [libc::c_char; 64] = [0; 64]; + let factor: i32; factor = BLOCKSIZE!(limits[limind as usize].block_factor); if pdesc > 0 { - if !limits[limind as usize].units.is_null(){ + if !limits[limind as usize].units.is_null() { unsafe { - sprintf (unitstr.as_mut_ptr(), b"(%s, -%c) \0" as *const u8 as *const libc::c_char, - limits[limind as usize].units, - limits[limind as usize].option); + sprintf( + unitstr.as_mut_ptr(), + b"(%s, -%c) \0" as *const u8 as *const libc::c_char, + limits[limind as usize].units, + limits[limind as usize].option, + ); } - - } - else { + } else { unsafe { - sprintf (unitstr.as_mut_ptr(),b"(-%c) \0" as *const u8 as *const libc::c_char, - limits[limind as usize].option); + sprintf( + unitstr.as_mut_ptr(), + b"(-%c) \0" as *const u8 as *const libc::c_char, + limits[limind as usize].option, + ); } } - print!("{:<20} {:>20}", unsafe { - CStr::from_ptr(limits[limind as usize].description).to_str().unwrap()} - , unsafe {CStr::from_ptr(unitstr.as_mut_ptr()).to_str().unwrap()}); + print!( + "{:<20} {:>20}", + unsafe { + CStr::from_ptr(limits[limind as usize].description) + .to_str() + .unwrap() + }, + unsafe { CStr::from_ptr(unitstr.as_mut_ptr()).to_str().unwrap() } + ); } if curlim == RLIM_INFINITY!() { let c_str_unlimited = b"unlimited" as *const u8 as *const libc::c_char; - println!("{}",unsafe {CStr::from_ptr(c_str_unlimited).to_str().unwrap()}); - } - - else if curlim == RLIM_SAVED_MAX!() { + println!("{}", unsafe { + CStr::from_ptr(c_str_unlimited).to_str().unwrap() + }); + } else if curlim == RLIM_SAVED_MAX!() { //println!("hard"); let c_str_hard = b"hard" as *const u8 as *const libc::c_char; - println!("{}",unsafe {CStr::from_ptr(c_str_hard).to_str().unwrap()}); - } - else if curlim == RLIM_SAVED_CUR!() { + println!("{}", unsafe { + CStr::from_ptr(c_str_hard).to_str().unwrap() + }); + } else if curlim == RLIM_SAVED_CUR!() { //println!("soft"); let c_str_soft = b"soft" as *const u8 as *const libc::c_char; - println!("{}",unsafe {CStr::from_ptr(c_str_soft).to_str().unwrap()}); - } - else{ - print_rlimtype ((curlim / factor as i64) as u64 , 1); + println!("{}", unsafe { + CStr::from_ptr(c_str_soft).to_str().unwrap() + }); + } else { + print_rlimtype((curlim / factor as i64) as u64, 1); } - } /* Set all limits to NEWLIM. NEWLIM currently must be RLIM_INFINITY, which @@ -903,28 +938,25 @@ fn printone (limind : i32, curlim :RLIMTYPE , pdesc : i32){ were set successfully, and 1 if at least one limit could not be set. To raise all soft limits to their corresponding hard limits, use - ulimit -S -a unlimited + ulimit -S -a unlimited To attempt to raise all hard limits to infinity (superuser-only), use - ulimit -H -a unlimited + ulimit -H -a unlimited To attempt to raise all soft and hard limits to infinity, use - ulimit -a unlimited + ulimit -a unlimited */ -fn print_rlimtype(num : u64, nl : i32) -{ - if nl > 0{ +fn print_rlimtype(num: u64, nl: i32) { + if nl > 0 { println!("{num}"); - } - else { + } else { print!("{num}"); } } +fn set_all_limits(mut mode: i32, newlim: RLIMTYPE) -> i32 { + let mut i: i32; + let mut retval: i32 = 0; -fn set_all_limits (mut mode : i32 , newlim : RLIMTYPE) -> i32 { - let mut i : i32 ; - let mut retval : i32 = 0; - if newlim != RLIM_INFINITY!() { unsafe { *__errno_location() = libc::EINVAL; @@ -933,22 +965,23 @@ fn set_all_limits (mut mode : i32 , newlim : RLIMTYPE) -> i32 { } if mode == 0 { - mode = LIMIT_SOFT!()|LIMIT_HARD!(); + mode = LIMIT_SOFT!() | LIMIT_HARD!(); } - retval = 0 ; + retval = 0; i = 0; while limits[i as usize].option > 0 { - if set_limit (i, newlim, mode) < 0 { + if set_limit(i, newlim, mode) < 0 { unsafe { - builtin_error(b"%s: cannot modify limit : %s\0" as *const u8 as *const libc::c_char, limits[i as usize].description, - strerror(*__errno_location()) as *const libc::c_char); + builtin_error( + b"%s: cannot modify limit : %s\0" as *const u8 as *const libc::c_char, + limits[i as usize].description, + strerror(*__errno_location()) as *const libc::c_char, + ); } - retval = 1; - i = i +1; + retval = 1; + i = i + 1; } } - return retval; + return retval; } - - diff --git a/bash-5.1/builtins_rust/umask/src/lib.rs b/bash-5.1/builtins_rust/umask/src/lib.rs index 2ca353dec5c0a9a0e977449d390f216fc0e8ce94..0c89bc9d6d72ed0912693b66ee59a523d7efe3b5 100644 --- a/bash-5.1/builtins_rust/umask/src/lib.rs +++ b/bash-5.1/builtins_rust/umask/src/lib.rs @@ -6,7 +6,7 @@ extern crate libc; use libc::{c_char,c_int}; use std::ffi::{CString}; use rcommon::{r_read_octal}; -use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN,r_builtin_usage}; +use rcommon::{WordList, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; use rhelp::r_builtin_help; //结构体 diff --git a/bash-5.1/builtins_rust/wait/src/lib.rs b/bash-5.1/builtins_rust/wait/src/lib.rs index 32b5eb80e0add5198237bceb24af2126781bee49..0147c813f5901f9944d3b3ad1acc9431a5ac11ed 100644 --- a/bash-5.1/builtins_rust/wait/src/lib.rs +++ b/bash-5.1/builtins_rust/wait/src/lib.rs @@ -26,13 +26,13 @@ extern "C" { ) -> ::std::os::raw::c_int; } -use libc::{c_ulong, c_char, intmax_t, c_short,c_int, c_long}; +use libc::{c_char, intmax_t, c_short,c_int, c_long}; use std::ffi::{CString,}; -use nix::sys::signal::{SigSet, Signal}; +use nix::sys::signal::{SigSet}; use rjobs::{PROCESS,COMMAND, BLOCK_CHILD, UNBLOCK_CHILD}; use rread::{SHELL_VAR, sh_var_value_func_t, sh_var_assign_func_t}; use rcommon::{r_builtin_unbind_variable,r_builtin_usage,r_get_job_spec,WordList}; -use rcommon::{ WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE, EX_NOTFOUND, EX_NOEXEC, SUBSHELL_PAREN}; +use rcommon::{ EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE}; use rhelp::r_builtin_help; // 结构体 @@ -454,7 +454,7 @@ extern "C" fn r_set_waitlist(list:*mut WordList) -> i32{ let mut set:SigSet = SigSet::empty(); let mut oset:SigSet = SigSet::empty(); let mut job:i32; - let mut r:i32; + let mut _r:i32; let mut njob:i32; let mut pid:intmax_t=0; let mut l:*mut WordList; diff --git a/bash-5.1/config.h b/bash-5.1/config.h deleted file mode 100644 index 4a614133bb49be9ec6c49a8b3909a160039d7e99..0000000000000000000000000000000000000000 --- a/bash-5.1/config.h +++ /dev/null @@ -1,1250 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/* config.h -- Configuration file for bash. */ - -/* Copyright (C) 1987-2009,2011-2012,2013-2019 Free Software Foundation, Inc. - - This file is part of GNU Bash, the Bourne Again SHell. - - Bash is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - Bash is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with Bash. If not, see . -*/ - -#ifndef _CONFIG_H_ -#define _CONFIG_H_ - -/* Template settings for autoconf */ - -#define __EXTENSIONS__ 1 -#define _ALL_SOURCE 1 -#define _GNU_SOURCE 1 -/* #undef _POSIX_SOURCE */ -/* #undef _POSIX_1_SOURCE */ -#define _POSIX_PTHREAD_SEMANTICS 1 -#define _TANDEM_SOURCE 1 -/* #undef _MINIX */ - -/* Configuration feature settings controllable by autoconf. */ - -/* Define JOB_CONTROL if your operating system supports - BSD-like job control. */ -#define JOB_CONTROL 1 - -/* Define ALIAS if you want the alias features. */ -#define ALIAS 1 - -/* Define PUSHD_AND_POPD if you want those commands to be compiled in. - (Also the `dirs' commands.) */ -#define PUSHD_AND_POPD 1 - -/* Define BRACE_EXPANSION if you want curly brace expansion a la Csh: - foo{a,b} -> fooa foob. Even if this is compiled in (the default) you - can turn it off at shell startup with `-nobraceexpansion', or during - shell execution with `set +o braceexpand'. */ -#define BRACE_EXPANSION 1 - -/* Define READLINE to get the nifty/glitzy editing features. - This is on by default. You can turn it off interactively - with the -nolineediting flag. */ -#define READLINE 1 - -/* Define BANG_HISTORY if you want to have Csh style "!" history expansion. - This is unrelated to READLINE. */ -#define BANG_HISTORY 1 - -/* Define HISTORY if you want to have access to previously typed commands. - - If both HISTORY and READLINE are defined, you can get at the commands - with line editing commands, and you can directly manipulate the history - from the command line. - - If only HISTORY is defined, the `fc' and `history' builtins are - available. */ -#define HISTORY 1 - -/* Define this if you want completion that puts all alternatives into - a brace expansion shell expression. */ -#if defined (BRACE_EXPANSION) && defined (READLINE) -# define BRACE_COMPLETION -#endif /* BRACE_EXPANSION */ - -/* Define DEFAULT_ECHO_TO_XPG if you want the echo builtin to interpret - the backslash-escape characters by default, like the XPG Single Unix - Specification V2 for echo. - This requires that V9_ECHO be defined. */ -/* #undef DEFAULT_ECHO_TO_XPG */ - -/* Define HELP_BUILTIN if you want the `help' shell builtin and the long - documentation strings compiled into the shell. */ -#define HELP_BUILTIN 1 - -/* Define RESTRICTED_SHELL if you want the generated shell to have the - ability to be a restricted one. The shell thus generated can become - restricted by being run with the name "rbash", or by setting the -r - flag. */ -#define RESTRICTED_SHELL 1 - -/* Define DISABLED_BUILTINS if you want "builtin foo" to always run the - shell builtin "foo", even if it has been disabled with "enable -n foo". */ -/* #undef DISABLED_BUILTINS */ - -/* Define PROCESS_SUBSTITUTION if you want the K*rn shell-like process - substitution features "<(file)". */ -/* Right now, you cannot do this on machines without fully operational - FIFO support. This currently include NeXT and Alliant. */ -#define PROCESS_SUBSTITUTION 1 - -/* Define PROMPT_STRING_DECODE if you want the backslash-escaped special - characters in PS1 and PS2 expanded. Variable expansion will still be - performed. */ -#define PROMPT_STRING_DECODE 1 - -/* Define SELECT_COMMAND if you want the Korn-shell style `select' command: - select word in word_list; do command_list; done */ -#define SELECT_COMMAND 1 - -/* Define COMMAND_TIMING of you want the ksh-style `time' reserved word and - the ability to time pipelines, functions, and builtins. */ -#define COMMAND_TIMING 1 - -/* Define ARRAY_VARS if you want ksh-style one-dimensional array variables. */ -#define ARRAY_VARS 1 - -/* Define DPAREN_ARITHMETIC if you want the ksh-style ((...)) arithmetic - evaluation command. */ -#define DPAREN_ARITHMETIC 1 - -/* Define EXTENDED_GLOB if you want the ksh-style [*+@?!](patlist) extended - pattern matching. */ -#define EXTENDED_GLOB 1 - -/* Define EXTGLOB_DEFAULT to the value you'd like the extglob shell option - to have by default */ -#define EXTGLOB_DEFAULT 0 - -/* Define COND_COMMAND if you want the ksh-style [[...]] conditional - command. */ -#define COND_COMMAND 1 - -/* Define COND_REGEXP if you want extended regular expression matching and the - =~ binary operator in the [[...]] conditional command. */ -#define COND_REGEXP 1 - -/* Define COPROCESS_SUPPORT if you want support for ksh-like coprocesses and - the `coproc' reserved word */ -#define COPROCESS_SUPPORT 1 - -/* Define ARITH_FOR_COMMAND if you want the ksh93-style - for (( init; test; step )) do list; done - arithmetic for command. */ -#define ARITH_FOR_COMMAND 1 - -/* Define NETWORK_REDIRECTIONS if you want /dev/(tcp|udp)/host/port to open - socket connections when used in redirections */ -#define NETWORK_REDIRECTIONS 1 - -/* Define PROGRAMMABLE_COMPLETION for the programmable completion features - and the complete builtin. */ -#define PROGRAMMABLE_COMPLETION 1 - -/* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte - characters, even if the OS supports them. */ -/* #undef NO_MULTIBYTE_SUPPORT */ - -/* Define DEBUGGER if you want to compile in some features used only by the - bash debugger. */ -#define DEBUGGER 1 - -/* Define STRICT_POSIX if you want bash to be strictly posix.2 conformant by - default (except for echo; that is controlled separately). */ -/* #undef STRICT_POSIX */ - -/* Define MEMSCRAMBLE if you want the bash malloc and free to scramble - memory contents on malloc() and free(). */ -#define MEMSCRAMBLE 1 - -/* Define for case-modifying variable attributes; variables modified on - assignment */ -#define CASEMOD_ATTRS 1 - -/* Define for case-modifying word expansions */ -#define CASEMOD_EXPANSIONS 1 - -/* Define to make the `direxpand' shopt option enabled by default. */ -/* #undef DIRCOMPLETE_EXPAND_DEFAULT */ - -/* Define to make the `globasciiranges' shopt option enabled by default. */ -#define GLOBASCII_DEFAULT 1 - -/* Define to allow functions to be imported from the environment. */ -#define FUNCTION_IMPORT 1 - -/* Define AFS if you are using Transarc's AFS. */ -/* #undef AFS */ - -#define ENABLE_NLS 1 - -/* End of configuration settings controllable by autoconf. */ -/* Other settable options appear in config-top.h. */ - -#include "config-top.h" - -/* Beginning of autoconf additions. */ - -/* Characteristics of the C compiler */ -/* #undef const */ - -/* #undef inline */ - -#define restrict __restrict - -/* #undef volatile */ - -/* Define if cpp supports the ANSI-C stringizing `#' operator */ -#define HAVE_STRINGIZE 1 - -/* Define if the compiler supports `long double' variables. */ -#define HAVE_LONG_DOUBLE 1 - -#define PROTOTYPES 1 -#define __PROTOTYPES 1 - -/* #undef __CHAR_UNSIGNED__ */ - -/* Define if the compiler supports `long long' variables. */ -#define HAVE_LONG_LONG 1 - -#define HAVE_UNSIGNED_LONG_LONG 1 - -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 8 - -/* The number of bytes in a pointer to char. */ -#define SIZEOF_CHAR_P 8 - -/* The number of bytes in a double (hopefully 8). */ -#define SIZEOF_DOUBLE 8 - -/* The number of bytes in an `intmax_t'. */ -#define SIZEOF_INTMAX_T 8 - -/* The number of bytes in a `long long', if we have one. */ -#define SIZEOF_LONG_LONG 8 - -/* The number of bytes in a `wchar_t', if supported */ -#define SIZEOF_WCHAR_T 4 - -/* System paths */ - -#define DEFAULT_MAIL_DIRECTORY "/var/mail" - -/* Characteristics of the system's header files and libraries that affect - the compilation environment. */ - -/* Define if the system does not provide POSIX.1 features except - with this defined. */ -/* #undef _POSIX_1_SOURCE */ - -/* Define if you need to in order for stat and other things to work. */ -/* #undef _POSIX_SOURCE */ - -/* Define to use GNU libc extensions */ -#define _GNU_SOURCE 1 - -/* Define if you have the ANSI C header files. */ -#define STDC_HEADERS 1 - -/* Memory management functions. */ - -/* Define if using the bash version of malloc in lib/malloc/malloc.c */ -#define USING_BASH_MALLOC 1 - -/* #undef DISABLE_MALLOC_WRAPPERS */ - -/* Define if using alloca.c. */ -/* #undef C_ALLOCA */ - -/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. - This function is required for alloca.c support on those systems. */ -/* #undef CRAY_STACKSEG_END */ - -/* Define if you have alloca, as a function or macro. */ -#define HAVE_ALLOCA 1 - -/* Define if you have and it should be used (not on Ultrix). */ -#define HAVE_ALLOCA_H 1 - -/* Define if major/minor/makedev is defined in */ -/* #undef MAJOR_IN_MAKEDEV */ - -/* Define if major/minor/makedev is defined in */ -#define MAJOR_IN_SYSMACROS 1 - -/* SYSTEM TYPES */ - -/* Define to `long' if doesn't define. */ -/* #undef off_t */ - -/* Define to `int' if doesn't define. */ -/* #undef mode_t */ - -/* Define to `int' if doesn't define. */ -/* #undef sigset_t */ - -/* Define to `int' if doesn't define. */ -/* #undef pid_t */ - -/* Define to `short' if doesn't define. */ -#define bits16_t short - -/* Define to `unsigned short' if doesn't define. */ -#define u_bits16_t unsigned short - -/* Define to `int' if doesn't define. */ -#define bits32_t int - -/* Define to `unsigned int' if doesn't define. */ -#define u_bits32_t unsigned int - -/* Define to `double' if doesn't define. */ -#define bits64_t char * - -/* Define to `unsigned int' if doesn't define. */ -/* #undef u_int */ - -/* Define to `unsigned long' if doesn't define. */ -/* #undef u_long */ - -/* Define to `int' if doesn't define. */ -/* #undef ptrdiff_t */ - -/* Define to `unsigned' if doesn't define. */ -/* #undef size_t */ - -/* Define to `int' if doesn't define. */ -/* #undef ssize_t */ - -/* Define to `long' if doesn't define. */ -/* #undef intmax_t */ - -/* Define to `unsigned long' if doesn't define. */ -/* #undef uintmax_t */ - -/* Define to integer type wide enough to hold a pointer if doesn't define. */ -/* #undef uintptr_t */ - -/* Define to `int' if doesn't define. */ -/* #undef uid_t */ - -/* Define to `long' if doesn't define. */ -/* #undef clock_t */ - -/* Define to `long' if doesn't define. */ -/* #undef time_t */ - -/* Define to `int' if doesn't define. */ -/* #undef gid_t */ - -/* Define to `unsigned int' if doesn't define. */ -/* #undef socklen_t */ - -/* Define to `int' if doesn't define. */ -/* #undef sig_atomic_t */ - -#define HAVE_MBSTATE_T 1 - -/* Define if you have quad_t in . */ -#define HAVE_QUAD_T 1 - -/* Define if you have wchar_t in . */ -#define HAVE_WCHAR_T 1 - -/* Define if you have wctype_t in . */ -#define HAVE_WCTYPE_T 1 - -/* Define if you have wint_t in . */ -#define HAVE_WINT_T 1 - -#define RLIMTYPE rlim_t - -/* Define to the type of elements in the array set by `getgroups'. - Usually this is either `int' or `gid_t'. */ -#define GETGROUPS_T gid_t - -/* Characteristics of the machine archictecture. */ - -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown - */ -/* #undef STACK_DIRECTION */ - -/* Define if the machine architecture is big-endian. */ -/* #undef WORDS_BIGENDIAN */ - -/* Check for the presence of certain non-function symbols in the system - libraries. */ - -/* Define if `sys_siglist' is declared by or . */ -#define HAVE_DECL_SYS_SIGLIST 0 -/* #undef SYS_SIGLIST_DECLARED */ - -/* Define if `_sys_siglist' is declared by or . */ -/* #undef UNDER_SYS_SIGLIST_DECLARED */ - -/* #undef HAVE_SYS_SIGLIST */ - -/* #undef HAVE_UNDER_SYS_SIGLIST */ - -#define HAVE_SYS_ERRLIST 1 - -/* #undef HAVE_TZNAME */ -/* #undef HAVE_DECL_TZNAME */ - -/* Characteristics of some of the system structures. */ - -#define HAVE_STRUCT_DIRENT_D_INO 1 - -#define HAVE_STRUCT_DIRENT_D_FILENO 1 - -/* #undef HAVE_STRUCT_DIRENT_D_NAMLEN */ - -/* #undef TIOCSTAT_IN_SYS_IOCTL */ - -#define FIONREAD_IN_SYS_IOCTL 1 - -#define GWINSZ_IN_SYS_IOCTL 1 - -#define STRUCT_WINSIZE_IN_SYS_IOCTL 1 - -/* #undef TM_IN_SYS_TIME */ - -/* #undef STRUCT_WINSIZE_IN_TERMIOS */ - -/* #undef SPEED_T_IN_SYS_TYPES */ - -#define TERMIOS_LDISC 1 - -#define TERMIO_LDISC 1 - -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 - -#define HAVE_STRUCT_TM_TM_ZONE 1 -#define HAVE_TM_ZONE 1 - -#define HAVE_TIMEVAL 1 - -#define HAVE_STRUCT_TIMEZONE 1 - -#define WEXITSTATUS_OFFSET 8 - -#define HAVE_STRUCT_TIMESPEC 1 -#define TIME_H_DEFINES_STRUCT_TIMESPEC 1 -/* #undef SYS_TIME_H_DEFINES_STRUCT_TIMESPEC */ -/* #undef PTHREAD_H_DEFINES_STRUCT_TIMESPEC */ - -#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 -/* #undef HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC */ -/* #undef HAVE_STRUCT_STAT_ST_ATIMENSEC */ -/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */ - -/* Characteristics of definitions in the system header files. */ - -#define HAVE_GETPW_DECLS 1 - -/* #undef HAVE_RESOURCE */ - -/* #undef HAVE_LIBC_FNM_EXTMATCH */ - -/* Define if you have and it defines AUDIT_USER_TTY */ -#define HAVE_DECL_AUDIT_USER_TTY 1 - -#define HAVE_DECL_CONFSTR 1 - -#define HAVE_DECL_PRINTF 1 - -#define HAVE_DECL_SBRK 1 - -#define HAVE_DECL_STRCPY 1 - -#define HAVE_DECL_STRSIGNAL 1 - -#define HAVE_DECL_STRTOLD 1 - -/* #undef PRI_MACROS_BROKEN */ - -/* #undef STRTOLD_BROKEN */ - -/* Define if WCONTINUED is defined in system headers, but rejected by waitpid */ -/* #undef WCONTINUED_BROKEN */ - -/* These are checked with BASH_CHECK_DECL */ - -#define HAVE_DECL_STRTOIMAX 1 -#define HAVE_DECL_STRTOL 1 -#define HAVE_DECL_STRTOLL 1 -#define HAVE_DECL_STRTOUL 1 -#define HAVE_DECL_STRTOULL 1 -#define HAVE_DECL_STRTOUMAX 1 - -/* Characteristics of system calls and C library functions. */ - -/* Define if the `getpgrp' function takes no argument. */ -#define GETPGRP_VOID 1 - -/* #undef NAMED_PIPES_MISSING */ - -/* #undef OPENDIR_NOT_ROBUST */ - -#define PGRP_PIPE 1 - -/* Define if the setvbuf function takes the buffering type as its second - argument and the buffer pointer as the third, as on System V - before release 3. */ -/* #undef SETVBUF_REVERSED */ - -/* #undef STAT_MACROS_BROKEN */ - -#define ULIMIT_MAXFDS 1 - -#define CAN_REDEFINE_GETENV 1 - -#define HAVE_STD_PUTENV 1 - -#define HAVE_STD_UNSETENV 1 - -#define HAVE_PRINTF_A_FORMAT 1 - -/* #undef CTYPE_NON_ASCII */ - -/* Define if you have and nl_langinfo(CODESET). */ -#define HAVE_LANGINFO_CODESET 1 - -/* Characteristics of properties exported by the kernel. */ - -/* Define if the kernel can exec files beginning with #! */ -#define HAVE_HASH_BANG_EXEC 1 - -/* Define if you have the /dev/fd devices to map open files into the file system. */ -#define HAVE_DEV_FD 1 - -/* Defined to /dev/fd or /proc/self/fd (linux). */ -#define DEV_FD_PREFIX "/dev/fd/" - -/* Define if you have the /dev/stdin device. */ -#define HAVE_DEV_STDIN 1 - -/* The type of iconv's `inbuf' argument */ -#define ICONV_CONST - -/* Type and behavior of signal handling functions. */ - -/* Define as the return type of signal handlers (int or void). */ -#define RETSIGTYPE void - -/* Define if return type of signal handlers is void */ -#define VOID_SIGHANDLER 1 - -/* #undef MUST_REINSTALL_SIGHANDLERS */ - -/* #undef HAVE_BSD_SIGNALS */ - -#define HAVE_POSIX_SIGNALS 1 - -/* #undef HAVE_USG_SIGHOLD */ - -/* #undef UNUSABLE_RT_SIGNALS */ - -/* Presence of system and C library functions. */ - -/* Define if you have the arc4random function. */ -/* #undef HAVE_ARC4RANDOM */ - -/* Define if you have the asprintf function. */ -#define HAVE_ASPRINTF 1 - -/* Define if you have the bcopy function. */ -#define HAVE_BCOPY 1 - -/* Define if you have the bzero function. */ -#define HAVE_BZERO 1 - -/* Define if you have the chown function. */ -#define HAVE_CHOWN 1 - -/* Define if you have the confstr function. */ -#define HAVE_CONFSTR 1 - -/* Define if you have the dlclose function. */ -#define HAVE_DLCLOSE 1 - -/* Define if you have the dlopen function. */ -#define HAVE_DLOPEN 1 - -/* Define if you have the dlsym function. */ -#define HAVE_DLSYM 1 - -/* Define if you don't have vprintf but do have _doprnt. */ -/* #undef HAVE_DOPRNT */ - -/* Define if you have the dprintf function. */ -#define HAVE_DPRINTF 1 - -/* Define if you have the dup2 function. */ -#define HAVE_DUP2 1 - -/* Define if you have the eaccess function. */ -#define HAVE_EACCESS 1 - -/* Define if you have the faccessat function. */ -#define HAVE_FACCESSAT 1 - -/* Define if you have the fcntl function. */ -#define HAVE_FCNTL 1 - -/* Define if you have the fnmatch function. */ -#define HAVE_FNMATCH 1 - -/* Can fnmatch be used as a fallback to match [=equiv=] with collation weights? */ -#define FNMATCH_EQUIV_FALLBACK 1 - -/* Define if you have the fpurge/__fpurge function. */ -/* #undef HAVE_FPURGE */ -#define HAVE___FPURGE 1 -#define HAVE_DECL_FPURGE 0 - -/* Define if you have the getaddrinfo function. */ -#define HAVE_GETADDRINFO 1 - -/* Define if you have the getcwd function. */ -#define HAVE_GETCWD 1 - -/* Define if you have the getentropy function. */ -#define HAVE_GETENTROPY 1 - -/* Define if you have the getdtablesize function. */ -#define HAVE_GETDTABLESIZE 1 - -/* Define if you have the getgroups function. */ -#define HAVE_GETGROUPS 1 - -/* Define if you have the gethostbyname function. */ -#define HAVE_GETHOSTBYNAME 1 - -/* Define if you have the gethostname function. */ -#define HAVE_GETHOSTNAME 1 - -/* Define if you have the getpagesize function. */ -#define HAVE_GETPAGESIZE 1 - -/* Define if you have the getpeername function. */ -#define HAVE_GETPEERNAME 1 - -/* Define if you have the getpwent function. */ -#define HAVE_GETPWENT 1 - -/* Define if you have the getpwnam function. */ -#define HAVE_GETPWNAM 1 - -/* Define if you have the getpwuid function. */ -#define HAVE_GETPWUID 1 - -/* Define if you have the getrandom function. */ -#define HAVE_GETRANDOM 1 - -/* Define if you have the getrlimit function. */ -#define HAVE_GETRLIMIT 1 - -/* Define if you have the getrusage function. */ -#define HAVE_GETRUSAGE 1 - -/* Define if you have the getservbyname function. */ -#define HAVE_GETSERVBYNAME 1 - -/* Define if you have the getservent function. */ -#define HAVE_GETSERVENT 1 - -/* Define if you have the gettimeofday function. */ -#define HAVE_GETTIMEOFDAY 1 - -/* Define if you have the getwd function. */ -/* #undef HAVE_GETWD */ - -/* Define if you have the iconv function. */ -#define HAVE_ICONV 1 - -/* Define if you have the imaxdiv function. */ -#define HAVE_IMAXDIV 1 - -/* Define if you have the inet_aton function. */ -#define HAVE_INET_ATON 1 - -/* Define if you have the isascii function. */ -#define HAVE_ISASCII 1 - -/* Define if you have the isblank function. */ -#define HAVE_ISBLANK 1 - -/* Define if you have the isgraph function. */ -#define HAVE_ISGRAPH 1 - -/* Define if you have the isprint function. */ -#define HAVE_ISPRINT 1 - -/* Define if you have the isspace function. */ -#define HAVE_ISSPACE 1 - -/* Define if you have the iswctype function. */ -#define HAVE_ISWCTYPE 1 - -/* Define if you have the iswlower function. */ -#define HAVE_ISWLOWER 1 - -/* Define if you have the iswupper function. */ -#define HAVE_ISWUPPER 1 - -/* Define if you have the isxdigit function. */ -#define HAVE_ISXDIGIT 1 - -/* Define if you have the kill function. */ -#define HAVE_KILL 1 - -/* Define if you have the killpg function. */ -#define HAVE_KILLPG 1 - -/* Define if you have the lstat function. */ -#define HAVE_LSTAT 1 - -/* Define if you have the locale_charset function. */ -/* #undef HAVE_LOCALE_CHARSET */ - -/* Define if you have the mbrlen function. */ -#define HAVE_MBRLEN 1 - -/* Define if you have the mbrtowc function. */ -#define HAVE_MBRTOWC 1 - -/* Define if you have the mbscasecmp function. */ -/* #undef HAVE_MBSCASECMP */ - -/* Define if you have the mbschr function. */ -/* #undef HAVE_MBSCHR */ - -/* Define if you have the mbscmp function. */ -/* #undef HAVE_MBSCMP */ - -/* Define if you have the mbsnrtowcs function. */ -#define HAVE_MBSNRTOWCS 1 - -/* Define if you have the mbsrtowcs function. */ -#define HAVE_MBSRTOWCS 1 - -/* Define if you have the memmove function. */ -#define HAVE_MEMMOVE 1 - -/* Define if you have the memset function. */ -#define HAVE_MEMSET 1 - -/* Define if you have the mkdtemp function. */ -#define HAVE_MKDTEMP 1 - -/* Define if you have the mkfifo function. */ -#define HAVE_MKFIFO 1 - -/* Define if you have the mkstemp function. */ -#define HAVE_MKSTEMP 1 - -/* Define if you have the pathconf function. */ -#define HAVE_PATHCONF 1 - -/* Define if you have the pselect function. */ -#define HAVE_PSELECT 1 - -/* Define if you have the pread function. */ -#define HAVE_PREAD 1 - -/* Define if you have the putenv function. */ -#define HAVE_PUTENV 1 - -/* Define if you have the raise function. */ -#define HAVE_RAISE 1 - -/* Define if you have the random function. */ -#define HAVE_RANDOM 1 - -/* Define if you have the readlink function. */ -#define HAVE_READLINK 1 - -/* Define if you have the regcomp function. */ -#define HAVE_REGCOMP 1 - -/* Define if you have the regexec function. */ -#define HAVE_REGEXEC 1 - -/* Define if you have the rename function. */ -#define HAVE_RENAME 1 - -/* Define if you have the sbrk function. */ -#define HAVE_SBRK 1 - -/* Define if you have the select function. */ -#define HAVE_SELECT 1 - -/* Define if you have the setdtablesize function. */ -/* #undef HAVE_SETDTABLESIZE */ - -/* Define if you have the setenv function. */ -#define HAVE_SETENV 1 - -/* Define if you have the setitimer function. */ -#define HAVE_SETITIMER 1 - -/* Define if you have the setlinebuf function. */ -#define HAVE_SETLINEBUF 1 - -/* Define if you have the setlocale function. */ -#define HAVE_SETLOCALE 1 - -/* Define if you have the setostype function. */ -/* #undef HAVE_SETOSTYPE */ - -/* Define if you have the setregid function. */ -/* #undef HAVE_SETREGID */ -#define HAVE_DECL_SETREGID 1 - -/* Define if you have the setregid function. */ -#define HAVE_SETRESGID 1 -/* #undef HAVE_DECL_SETRESGID */ - -/* Define if you have the setresuid function. */ -#define HAVE_SETRESUID 1 -/* #undef HAVE_DECL_SETRESUID */ - -/* Define if you have the setvbuf function. */ -#define HAVE_SETVBUF 1 - -/* Define if you have the siginterrupt function. */ -#define HAVE_SIGINTERRUPT 1 - -/* Define if you have the POSIX.1-style sigsetjmp function. */ -#define HAVE_POSIX_SIGSETJMP 1 - -/* Define if you have the snprintf function. */ -#define HAVE_SNPRINTF 1 - -/* Define if you have the strcasecmp function. */ -#define HAVE_STRCASECMP 1 - -/* Define if you have the strcasestr function. */ -#define HAVE_STRCASESTR 1 - -/* Define if you have the strchr function. */ -#define HAVE_STRCHR 1 - -/* Define if you have the strchrnul function. */ -#define HAVE_STRCHRNUL 1 - -/* Define if you have the strcoll function. */ -#define HAVE_STRCOLL 1 - -/* Define if you have the strerror function. */ -#define HAVE_STRERROR 1 - -/* Define if you have the strftime function. */ -#define HAVE_STRFTIME 1 - -/* Define if you have the strnlen function. */ -#define HAVE_STRNLEN 1 - -/* Define if you have the strpbrk function. */ -#define HAVE_STRPBRK 1 - -/* Define if you have the strstr function. */ -#define HAVE_STRSTR 1 - -/* Define if you have the strtod function. */ -#define HAVE_STRTOD 1 - -/* Define if you have the strtoimax function. */ -#define HAVE_STRTOIMAX 1 - -/* Define if you have the strtol function. */ -#define HAVE_STRTOL 1 - -/* Define if you have the strtoll function. */ -#define HAVE_STRTOLL 1 - -/* Define if you have the strtoul function. */ -#define HAVE_STRTOUL 1 - -/* Define if you have the strtoull function. */ -#define HAVE_STRTOULL 1 - -/* Define if you have the strtoumax function. */ -#define HAVE_STRTOUMAX 1 - -/* Define if you have the strsignal function or macro. */ -#define HAVE_STRSIGNAL 1 - -/* Define if you have the sysconf function. */ -#define HAVE_SYSCONF 1 - -/* Define if you have the syslog function. */ -#define HAVE_SYSLOG 1 - -/* Define if you have the tcgetattr function. */ -#define HAVE_TCGETATTR 1 - -/* Define if you have the tcgetpgrp function. */ -#define HAVE_TCGETPGRP 1 - -/* Define if you have the times function. */ -#define HAVE_TIMES 1 - -/* Define if you have the towlower function. */ -#define HAVE_TOWLOWER 1 - -/* Define if you have the towupper function. */ -#define HAVE_TOWUPPER 1 - -/* Define if you have the ttyname function. */ -#define HAVE_TTYNAME 1 - -/* Define if you have the tzset function. */ -#define HAVE_TZSET 1 - -/* Define if you have the ulimit function. */ -#define HAVE_ULIMIT 1 - -/* Define if you have the uname function. */ -#define HAVE_UNAME 1 - -/* Define if you have the unsetenv function. */ -#define HAVE_UNSETENV 1 - -/* Define if you have the vasprintf function. */ -#define HAVE_VASPRINTF 1 - -/* Define if you have the vprintf function. */ -#define HAVE_VPRINTF 1 - -/* Define if you have the vsnprintf function. */ -#define HAVE_VSNPRINTF 1 - -/* Define if you have the waitpid function. */ -#define HAVE_WAITPID 1 - -/* Define if you have the wait3 function. */ -#define HAVE_WAIT3 1 - -/* Define if you have the wcrtomb function. */ -#define HAVE_WCRTOMB 1 - -/* Define if you have the wcscoll function. */ -#define HAVE_WCSCOLL 1 - -/* Define if you have the wcsdup function. */ -#define HAVE_WCSDUP 1 - -/* Define if you have the wctype function. */ -#define HAVE_WCTYPE 1 - -/* Define if you have the wcswidth function. */ -#define HAVE_WCSWIDTH 1 - -/* Define if you have the wcwidth function. */ -#define HAVE_WCWIDTH 1 - -/* and if it works */ -/* #undef WCWIDTH_BROKEN */ - -/* Presence of certain system include files. */ - -/* Define if you have the header file. */ -#define HAVE_ARPA_INET_H 1 - -/* Define if you have the header file. */ -#define HAVE_DIRENT_H 1 - -/* Define if you have the header file. */ -#define HAVE_DLFCN_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_ELF_H */ - -/* Define if you have the header file. */ -#define HAVE_GRP_H 1 - -/* Define if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define if you have the header file. */ -#define HAVE_LANGINFO_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_LIBAUDIT_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_LIBINTL_H */ - -/* Define if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define if you have the header file. */ -#define HAVE_LOCALE_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_MBSTR_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_NDIR_H */ - -/* Define if you have the header file. */ -#define HAVE_NETDB_H 1 - -/* Define if you have the header file. */ -#define HAVE_NETINET_IN_H 1 - -/* Define if you have the header file. */ -#define HAVE_PWD_H 1 - -/* Define if you have the header file. */ -#define HAVE_REGEX_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define if you have the header file. */ -#define HAVE_STRINGS_H 1 - -/* Define if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDBOOL_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDDEF_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYSLOG_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_DIR_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_FILE_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_IOCTL_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_MMAN_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_NDIR_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_PTE_H */ - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_PTEM_H */ - -/* Define if you have the header file. */ -#define HAVE_SYS_RANDOM_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_SELECT_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_SOCKET_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_SYS_STREAM_H */ - -/* Define if you have */ -#define HAVE_SYS_TIME_H 1 - -#define TIME_WITH_SYS_TIME 1 - -/* Define if you have */ -#define HAVE_SYS_TIMES_H 1 - -/* Define if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define if you have that is POSIX.1 compatible. */ -#define HAVE_SYS_WAIT_H 1 - -/* Define if you have the header file. */ -#define HAVE_TERMCAP_H 1 - -/* Define if you have the header file. */ -#define HAVE_TERMIO_H 1 - -/* Define if you have the header file. */ -#define HAVE_TERMIOS_H 1 - -/* Define if you have the header file. */ -#define HAVE_ULIMIT_H 1 - -/* Define if you have the header file. */ -#define HAVE_UNISTD_H 1 - -/* Define if you have the header file. */ -/* #undef HAVE_VARARGS_H */ - -/* Define if you have the header file. */ -#define HAVE_WCHAR_H 1 - -/* Define if you have the header file. */ -#define HAVE_WCTYPE_H 1 - -/* Presence of certain system libraries. */ - -#define HAVE_LIBDL 1 - -/* #undef HAVE_LIBSUN */ - -/* #undef HAVE_LIBSOCKET */ - -/* Are we running the GNU C library, version 2.1 or later? */ -/* #undef GLIBC21 */ - -/* Are we running SVR5 (UnixWare 7)? */ -/* #undef SVR5 */ - -/* Are we running SVR4.2? */ -/* #undef SVR4_2 */ - -/* Are we running some version of SVR4? */ -/* #undef SVR4 */ - -/* Define if job control is unusable or unsupported. */ -/* #undef JOB_CONTROL_MISSING */ - -/* Do we need to define _KERNEL to get the RLIMIT_* defines from - ? */ -/* #undef RLIMIT_NEEDS_KERNEL */ - -/* Number of bits in a file offset, on hosts where this is settable. */ -/* #undef _FILE_OFFSET_BITS */ - -/* Define for large files on AIX-style hosts. */ -/* #undef _LARGE_FILES */ - -/* Do strcoll(3) and strcmp(3) give different results in the default locale? */ -/* #undef STRCOLL_BROKEN */ - -/* #undef DUP2_BROKEN */ - -/* #undef GETCWD_BROKEN */ - -/* #undef DEV_FD_STAT_BROKEN */ - -/* Additional defines for configuring lib/intl, maintained by autoscan/autoheader */ - -/* Define if you have the header file. */ -#define HAVE_ARGZ_H 1 - -/* Define if you have the header file. */ -#define HAVE_ERRNO_H 1 - -/* Define if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define if you have the header file. */ -#define HAVE_MALLOC_H 1 - -/* Define if you have the header file. */ -#define HAVE_STDIO_EXT_H 1 - -/* Define if you have the `dcgettext' function. */ -#define HAVE_DCGETTEXT 1 - -/* Define if you have the `localeconv' function. */ -#define HAVE_LOCALECONV 1 - -/* Define if your system has a working `malloc' function. */ -/* #undef HAVE_MALLOC */ - -/* Define if you have the `mempcpy' function. */ -#define HAVE_MEMPCPY 1 - -/* Define if you have a working `mmap' system call. */ -#define HAVE_MMAP 1 - -/* Define if you have the `mremap' function. */ -#define HAVE_MREMAP 1 - -/* Define if you have the `munmap' function. */ -#define HAVE_MUNMAP 1 - -/* Define if you have the `nl_langinfo' function. */ -/* #undef HAVE_NL_LANGINFO */ - -/* Define if you have the `stpcpy' function. */ -#define HAVE_STPCPY 1 - -/* Define if you have the `strcspn' function. */ -#define HAVE_STRCSPN 1 - -/* Define if you have the `strdup' function. */ -#define HAVE_STRDUP 1 - -/* Define if you have the `__argz_count' function. */ -#define HAVE___ARGZ_COUNT 1 - -/* Define if you have the `__argz_next' function. */ -#define HAVE___ARGZ_NEXT 1 - -/* Define if you have the `__argz_stringify' function. */ -#define HAVE___ARGZ_STRINGIFY 1 - -/* End additions for lib/intl */ - - -/* Additions for lib/readline */ - -/* Define if you have and it defines AUDIT_USER_TTY */ -#define HAVE_DECL_AUDIT_USER_TTY 1 - -/* End additions for lib/readline */ - -#include "config-bot.h" - -#endif /* _CONFIG_H_ */ diff --git a/bash-5.1/config.log b/bash-5.1/config.log deleted file mode 100644 index faf548b332f56e99a4e14360cc361814b93da619..0000000000000000000000000000000000000000 --- a/bash-5.1/config.log +++ /dev/null @@ -1,23534 +0,0 @@ -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by rash configure 0.1-release, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ ./configure - -## --------- ## -## Platform. ## -## --------- ## - -hostname = pc -uname -m = x86_64 -uname -r = 5.19.0-50-generic -uname -s = Linux -uname -v = #50-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 10 18:24:29 UTC 2023 - -/usr/bin/uname -p = x86_64 -/bin/uname -X = unknown - -/bin/arch = x86_64 -/usr/bin/arch -k = unknown -/usr/convex/getsysinfo = unknown -/usr/bin/hostinfo = unknown -/bin/machine = unknown -/usr/bin/oslevel = unknown -/bin/universe = unknown - -PATH: /home/tong/anaconda3/bin -PATH: /home/tong/anaconda3/condabin -PATH: /home/tong/.nix-profile/bin -PATH: /nix/var/nix/profiles/default/bin -PATH: /home/tong/.local/bin -PATH: /home/tong/.nix-profile/bin -PATH: /nix/var/nix/profiles/default/bin -PATH: /home/tong/.cargo/bin -PATH: /home/tong/.local/bin -PATH: /home/tong/.nix-profile/bin -PATH: /nix/var/nix/profiles/default/bin -PATH: /usr/local/sbin -PATH: /usr/local/bin -PATH: /usr/sbin -PATH: /usr/bin -PATH: /sbin -PATH: /bin -PATH: /usr/games -PATH: /usr/local/games -PATH: /snap/bin -PATH: /usr/local/cuda/bin - - -## ----------- ## -## Core tests. ## -## ----------- ## - -configure:2814: checking build system type -configure:2828: result: x86_64-pc-linux-gnu -configure:2848: checking host system type -configure:2861: result: x86_64-pc-linux-gnu -configure:3489: checking for gcc -configure:3505: found /usr/bin/gcc -configure:3516: result: gcc -configure:3745: checking for C compiler version -configure:3754: gcc --version >&5 -gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 -Copyright (C) 2021 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -configure:3765: $? = 0 -configure:3754: gcc -v >&5 -Using built-in specs. -COLLECT_GCC=gcc -COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper -OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa -OFFLOAD_TARGET_DEFAULT=1 -Target: x86_64-linux-gnu -Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2 -Thread model: posix -Supported LTO compression algorithms: zlib zstd -gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) -... rest of stderr output deleted ... -configure:3765: $? = 0 -configure:3754: gcc -V >&5 -gcc: error: unrecognized command-line option '-V' -gcc: fatal error: no input files -compilation terminated. -configure:3765: $? = 1 -configure:3754: gcc -qversion >&5 -gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'? -gcc: fatal error: no input files -compilation terminated. -configure:3765: $? = 1 -configure:3785: checking whether the C compiler works -configure:3807: gcc conftest.c >&5 -configure:3811: $? = 0 -configure:3859: result: yes -configure:3862: checking for C compiler default output file name -configure:3864: result: a.out -configure:3870: checking for suffix of executables -configure:3877: gcc -o conftest conftest.c >&5 -configure:3881: $? = 0 -configure:3903: result: -configure:3925: checking whether we are cross compiling -configure:3933: gcc -o conftest conftest.c >&5 -configure:3937: $? = 0 -configure:3944: ./conftest -configure:3948: $? = 0 -configure:3963: result: no -configure:3968: checking for suffix of object files -configure:3990: gcc -c conftest.c >&5 -configure:3994: $? = 0 -configure:4015: result: o -configure:4019: checking whether we are using the GNU C compiler -configure:4038: gcc -c conftest.c >&5 -configure:4038: $? = 0 -configure:4047: result: yes -configure:4056: checking whether gcc accepts -g -configure:4076: gcc -c -g conftest.c >&5 -configure:4076: $? = 0 -configure:4117: result: yes -configure:4134: checking for gcc option to accept ISO C89 -configure:4197: gcc -c -g -O2 conftest.c >&5 -configure:4197: $? = 0 -configure:4210: result: none needed -configure:4240: checking for library containing strerror -configure:4271: gcc -o conftest -g -O2 conftest.c >&5 -configure:4271: $? = 0 -configure:4288: result: none required -configure:4301: checking how to run the C preprocessor -configure:4332: gcc -E conftest.c -configure:4332: $? = 0 -configure:4346: gcc -E conftest.c -conftest.c:35:10: fatal error: ac_nonexistent.h: No such file or directory - 35 | #include - | ^~~~~~~~~~~~~~~~~~ -compilation terminated. -configure:4346: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| /* end confdefs.h. */ -| #include -configure:4371: result: gcc -E -configure:4391: gcc -E conftest.c -configure:4391: $? = 0 -configure:4405: gcc -E conftest.c -conftest.c:35:10: fatal error: ac_nonexistent.h: No such file or directory - 35 | #include - | ^~~~~~~~~~~~~~~~~~ -compilation terminated. -configure:4405: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| /* end confdefs.h. */ -| #include -configure:4434: checking for grep that handles long lines and -e -configure:4492: result: /usr/bin/grep -configure:4497: checking for egrep -configure:4559: result: /usr/bin/grep -E -configure:4564: checking for ANSI C header files -configure:4584: gcc -c -g -O2 conftest.c >&5 -configure:4584: $? = 0 -configure:4657: gcc -o conftest -g -O2 conftest.c >&5 -configure:4657: $? = 0 -configure:4657: ./conftest -configure:4657: $? = 0 -configure:4668: result: yes -configure:4681: checking for sys/types.h -configure:4681: gcc -c -g -O2 conftest.c >&5 -configure:4681: $? = 0 -configure:4681: result: yes -configure:4681: checking for sys/stat.h -configure:4681: gcc -c -g -O2 conftest.c >&5 -configure:4681: $? = 0 -configure:4681: result: yes -configure:4681: checking for stdlib.h -configure:4681: gcc -c -g -O2 conftest.c >&5 -configure:4681: $? = 0 -configure:4681: result: yes -configure:4681: checking for string.h -configure:4681: gcc -c -g -O2 conftest.c >&5 -configure:4681: $? = 0 -configure:4681: result: yes -configure:4681: checking for memory.h -configure:4681: gcc -c -g -O2 conftest.c >&5 -configure:4681: $? = 0 -configure:4681: result: yes -configure:4681: checking for strings.h -configure:4681: gcc -c -g -O2 conftest.c >&5 -configure:4681: $? = 0 -configure:4681: result: yes -configure:4681: checking for inttypes.h -configure:4681: gcc -c -g -O2 conftest.c >&5 -configure:4681: $? = 0 -configure:4681: result: yes -configure:4681: checking for stdint.h -configure:4681: gcc -c -g -O2 conftest.c >&5 -configure:4681: $? = 0 -configure:4681: result: yes -configure:4681: checking for unistd.h -configure:4681: gcc -c -g -O2 conftest.c >&5 -configure:4681: $? = 0 -configure:4681: result: yes -configure:4694: checking minix/config.h usability -configure:4694: gcc -c -g -O2 conftest.c >&5 -conftest.c:78:10: fatal error: minix/config.h: No such file or directory - 78 | #include - | ^~~~~~~~~~~~~~~~ -compilation terminated. -configure:4694: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| #include -configure:4694: result: no -configure:4694: checking minix/config.h presence -configure:4694: gcc -E conftest.c -conftest.c:45:10: fatal error: minix/config.h: No such file or directory - 45 | #include - | ^~~~~~~~~~~~~~~~ -compilation terminated. -configure:4694: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| /* end confdefs.h. */ -| #include -configure:4694: result: no -configure:4694: checking for minix/config.h -configure:4694: result: no -configure:4715: checking whether it is safe to define __EXTENSIONS__ -configure:4733: gcc -c -g -O2 conftest.c >&5 -configure:4733: $? = 0 -configure:4740: result: yes -configure:4763: checking for special C compiler options needed for large files -configure:4808: result: no -configure:4814: checking for _FILE_OFFSET_BITS value needed for large files -configure:4839: gcc -c -g -O2 conftest.c >&5 -configure:4839: $? = 0 -configure:4871: result: no -configure:5060: checking whether gcc needs -traditional -configure:5094: result: no -configure:5617: checking for a BSD-compatible install -configure:5685: result: /usr/bin/install -c -configure:5739: checking for ar -configure:5755: found /usr/bin/ar -configure:5766: result: ar -configure:5832: checking for ranlib -configure:5848: found /usr/bin/ranlib -configure:5859: result: ranlib -configure:5885: checking for bison -configure:5901: found /usr/bin/bison -configure:5912: result: bison -y -configure:5924: checking whether make sets $(MAKE) -configure:5946: result: yes -configure:6332: checking for an ANSI C-conforming const -configure:6398: gcc -c -g -O2 conftest.c >&5 -configure:6398: $? = 0 -configure:6405: result: yes -configure:6413: checking for inline -configure:6429: gcc -c -g -O2 conftest.c >&5 -configure:6429: $? = 0 -configure:6437: result: inline -configure:6455: checking whether byte ordering is bigendian -configure:6470: gcc -c -g -O2 conftest.c >&5 -conftest.c:55:16: error: unknown type name 'not' - 55 | not a universal capable compiler - | ^~~ -conftest.c:55:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'universal' - 55 | not a universal capable compiler - | ^~~~~~~~~ -conftest.c:55:22: error: unknown type name 'universal' -configure:6470: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| /* end confdefs.h. */ -| #ifndef __APPLE_CC__ -| not a universal capable compiler -| #endif -| typedef int dummy; -| -configure:6515: gcc -c -g -O2 conftest.c >&5 -configure:6515: $? = 0 -configure:6533: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:61:18: error: unknown type name 'not'; did you mean 'ino_t'? - 61 | not big endian - | ^~~ - | ino_t -conftest.c:61:26: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'endian' - 61 | not big endian - | ^~~~~~ -configure:6533: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| /* end confdefs.h. */ -| #include -| #include -| -| int -| main () -| { -| #if BYTE_ORDER != BIG_ENDIAN -| not big endian -| #endif -| -| ; -| return 0; -| } -configure:6661: result: no -configure:6679: checking for preprocessor stringizing operator -configure:6699: result: yes -configure:6709: checking for long double with more range or precision than double -configure:6745: gcc -c -g -O2 conftest.c >&5 -configure:6745: $? = 0 -configure:6752: result: yes -configure:6767: checking for function prototypes -configure:6770: result: yes -configure:6783: checking whether char is unsigned -configure:6802: gcc -c -g -O2 conftest.c >&5 -configure:6802: $? = 0 -configure:6809: result: no -configure:6816: checking for working volatile -configure:6835: gcc -c -g -O2 conftest.c >&5 -configure:6835: $? = 0 -configure:6842: result: yes -configure:6850: checking for C/C++ restrict keyword -configure:6875: gcc -c -g -O2 conftest.c >&5 -configure:6875: $? = 0 -configure:6883: result: __restrict -configure:6897: checking for a thread-safe mkdir -p -configure:6936: result: /usr/bin/mkdir -p -configure:6939: checking for a sed that does not truncate output -configure:7003: result: /usr/bin/sed -configure:7009: checking whether NLS is requested -configure:7018: result: yes -configure:7058: checking for msgfmt -configure: trying /usr/bin/msgfmt... -0 translated messages. -configure:7090: result: /usr/bin/msgfmt -configure:7099: checking for gmsgfmt -configure:7130: result: /usr/bin/msgfmt -configure:7180: checking for xgettext -configure: trying /usr/bin/xgettext... -/usr/bin/xgettext: warning: file '/dev/null' extension '' is unknown; will try C -configure:7212: result: /usr/bin/xgettext -configure:7257: checking for msgmerge -configure: trying /usr/bin/msgmerge... -configure:7288: result: /usr/bin/msgmerge -configure:7303: checking whether we are using the GNU C Library 2 or newer -configure:7330: result: yes -configure:7341: checking whether the -Werror option is usable -configure:7359: gcc -c -g -O2 -Werror conftest.c >&5 -configure:7359: $? = 0 -configure:7368: result: yes -configure:7370: checking for simple visibility declarations -configure:7396: gcc -c -g -O2 -fvisibility=hidden -Werror conftest.c >&5 -configure:7396: $? = 0 -configure:7405: result: yes -configure:7420: checking for size_t -configure:7420: gcc -c -g -O2 conftest.c >&5 -configure:7420: $? = 0 -configure:7420: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:97:21: error: expected expression before ')' token - 97 | if (sizeof ((size_t))) - | ^ -configure:7420: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((size_t))) -| return 0; -| ; -| return 0; -| } -configure:7420: result: yes -configure:7432: checking for stdint.h -configure:7449: gcc -c -g -O2 conftest.c >&5 -configure:7449: $? = 0 -configure:7456: result: yes -configure:7468: checking for working alloca.h -configure:7485: gcc -o conftest -g -O2 conftest.c >&5 -configure:7485: $? = 0 -configure:7493: result: yes -configure:7501: checking for alloca -configure:7538: gcc -o conftest -g -O2 conftest.c >&5 -configure:7538: $? = 0 -configure:7546: result: yes -configure:7658: checking for stdlib.h -configure:7658: result: yes -configure:7658: checking for unistd.h -configure:7658: result: yes -configure:7658: checking for sys/param.h -configure:7658: gcc -c -g -O2 conftest.c >&5 -configure:7658: $? = 0 -configure:7658: result: yes -configure:7658: checking for xlocale.h -configure:7658: gcc -c -g -O2 conftest.c >&5 -conftest.c:101:10: fatal error: xlocale.h: No such file or directory - 101 | #include - | ^~~~~~~~~~~ -compilation terminated. -configure:7658: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| -| #include -configure:7658: result: no -configure:7658: checking for sys/time.h -configure:7658: gcc -c -g -O2 conftest.c >&5 -configure:7658: $? = 0 -configure:7658: result: yes -configure:7678: checking for getpagesize -configure:7678: gcc -o conftest -g -O2 conftest.c >&5 -configure:7678: $? = 0 -configure:7678: result: yes -configure:7687: checking for working mmap -configure:7834: gcc -o conftest -g -O2 conftest.c >&5 -configure:7834: $? = 0 -configure:7834: ./conftest -configure:7834: $? = 0 -configure:7844: result: yes -configure:7855: checking whether integer division by zero raises SIGFPE -configure:7921: gcc -o conftest -g -O2 conftest.c >&5 -configure:7921: $? = 0 -configure:7921: ./conftest -configure:7921: $? = 0 -configure:7933: result: yes -configure:7946: checking for inttypes.h -configure:7965: gcc -c -g -O2 conftest.c >&5 -configure:7965: $? = 0 -configure:7972: result: yes -configure:7983: checking for unsigned long long int -configure:8022: gcc -o conftest -g -O2 conftest.c >&5 -configure:8022: $? = 0 -configure:8031: result: yes -configure:8061: checking for inttypes.h -configure:8061: result: yes -configure:8072: checking whether the inttypes.h PRIxNN macros are broken -configure:8094: gcc -c -g -O2 conftest.c >&5 -configure:8094: $? = 0 -configure:8102: result: no -configure:8210: checking for ld used by gcc -configure:8335: result: /usr/bin/ld -configure:8342: checking if the linker (/usr/bin/ld) is GNU ld -configure:8357: result: yes -configure:8364: checking for shared library run path origin -configure:8377: result: done -configure:8398: checking 32-bit host C ABI -configure:8436: gcc -c -g -O2 conftest.c >&5 -configure:8436: $? = 0 -configure:8623: result: no -configure:8660: checking for the common suffixes of directories in the library search path -configure:8711: result: lib,lib -configure:8725: checking whether imported symbols can be declared weak -configure:8743: gcc -o conftest -g -O2 conftest.c >&5 -configure:8743: $? = 0 -configure:8777: gcc -o conftest -g -O2 conftest.c >&5 -configure:8777: $? = 0 -configure:8777: ./conftest -configure:8777: $? = 0 -configure:8792: result: yes -configure:8797: checking pthread.h usability -configure:8797: gcc -c -g -O2 conftest.c >&5 -configure:8797: $? = 0 -configure:8797: result: yes -configure:8797: checking pthread.h presence -configure:8797: gcc -E conftest.c -configure:8797: $? = 0 -configure:8797: result: yes -configure:8797: checking for pthread.h -configure:8797: result: yes -configure:8835: gcc -o conftest -g -O2 conftest.c >&5 -configure:8835: $? = 0 -configure:8851: checking for pthread_kill in -lpthread -configure:8876: gcc -o conftest -g -O2 conftest.c -lpthread >&5 -configure:8876: $? = 0 -configure:8885: result: yes -configure:9628: checking for multithread API to use -configure:9630: result: posix -configure:9647: checking for pthread_rwlock_t -configure:9647: gcc -c -g -O2 conftest.c >&5 -configure:9647: $? = 0 -configure:9647: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:82:31: error: expected expression before ')' token - 82 | if (sizeof ((pthread_rwlock_t))) - | ^ -configure:9647: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| /* end confdefs.h. */ -| #include -| -| int -| main () -| { -| if (sizeof ((pthread_rwlock_t))) -| return 0; -| ; -| return 0; -| } -configure:9647: result: yes -configure:9659: checking whether pthread_rwlock_rdlock prefers a writer to a reader -configure:9784: gcc -o conftest -g -O2 conftest.c -lpthread >&5 -configure:9784: $? = 0 -configure:9784: ./conftest -configure:9784: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| /* end confdefs.h. */ -| -| #include -| #include -| #include -| #include -| -| #define SUCCEED() exit (0) -| #define FAILURE() exit (1) -| #define UNEXPECTED(n) (exit (10 + (n))) -| -| /* The main thread creates the waiting writer and the requesting reader threads -| in the default way; this guarantees that they have the same priority. -| We can reuse the main thread as first reader thread. */ -| -| static pthread_rwlock_t lock; -| static pthread_t reader1; -| static pthread_t writer; -| static pthread_t reader2; -| static pthread_t timer; -| /* Used to pass control from writer to reader2 and from reader2 to timer, -| as in a relay race. -| Passing control from one running thread to another running thread -| is most likely faster than to create the second thread. */ -| static pthread_mutex_t baton; -| -| static void * -| timer_func (void *ignored) -| { -| /* Step 13 (can be before or after step 12): -| The timer thread takes the baton, then waits a moment to make sure -| it can tell whether the second reader thread is blocked at step 12. */ -| if (pthread_mutex_lock (&baton)) -| UNEXPECTED (13); -| usleep (100000); -| /* By the time we get here, it's clear that the second reader thread is -| blocked at step 12. This is the desired behaviour. */ -| SUCCEED (); -| } -| -| static void * -| reader2_func (void *ignored) -| { -| int err; -| -| /* Step 8 (can be before or after step 7): -| The second reader thread takes the baton, then waits a moment to make sure -| the writer thread has reached step 7. */ -| if (pthread_mutex_lock (&baton)) -| UNEXPECTED (8); -| usleep (100000); -| /* Step 9: The second reader thread requests the lock. */ -| err = pthread_rwlock_tryrdlock (&lock); -| if (err == 0) -| FAILURE (); -| else if (err != EBUSY) -| UNEXPECTED (9); -| /* Step 10: Launch a timer, to test whether the next call blocks. */ -| if (pthread_create (&timer, NULL, timer_func, NULL)) -| UNEXPECTED (10); -| /* Step 11: Release the baton. */ -| if (pthread_mutex_unlock (&baton)) -| UNEXPECTED (11); -| /* Step 12: The second reader thread requests the lock. */ -| err = pthread_rwlock_rdlock (&lock); -| if (err == 0) -| FAILURE (); -| else -| UNEXPECTED (12); -| } -| -| static void * -| writer_func (void *ignored) -| { -| /* Step 4: Take the baton, so that the second reader thread does not go ahead -| too early. */ -| if (pthread_mutex_lock (&baton)) -| UNEXPECTED (4); -| /* Step 5: Create the second reader thread. */ -| if (pthread_create (&reader2, NULL, reader2_func, NULL)) -| UNEXPECTED (5); -| /* Step 6: Release the baton. */ -| if (pthread_mutex_unlock (&baton)) -| UNEXPECTED (6); -| /* Step 7: The writer thread requests the lock. */ -| if (pthread_rwlock_wrlock (&lock)) -| UNEXPECTED (7); -| return NULL; -| } -| -| int -| main () -| { -| reader1 = pthread_self (); -| -| /* Step 1: The main thread initializes the lock and the baton. */ -| if (pthread_rwlock_init (&lock, NULL)) -| UNEXPECTED (1); -| if (pthread_mutex_init (&baton, NULL)) -| UNEXPECTED (1); -| /* Step 2: The main thread acquires the lock as a reader. */ -| if (pthread_rwlock_rdlock (&lock)) -| UNEXPECTED (2); -| /* Step 3: Create the writer thread. */ -| if (pthread_create (&writer, NULL, writer_func, NULL)) -| UNEXPECTED (3); -| /* Job done. Go to sleep. */ -| for (;;) -| { -| sleep (1); -| } -| } -| -configure:9796: result: no -configure:9830: gcc -c -g -O2 conftest.c >&5 -configure:9830: $? = 0 -configure:10333: checking for iconv -configure:10357: gcc -o conftest -g -O2 conftest.c >&5 -configure:10357: $? = 0 -configure:10391: result: yes -configure:10394: checking for working iconv -configure:10535: gcc -o conftest -g -O2 conftest.c >&5 -configure:10535: $? = 0 -configure:10535: ./conftest -configure:10535: $? = 0 -configure:10547: result: yes -configure:10575: checking for iconv declaration -configure:10604: gcc -c -g -O2 conftest.c >&5 -configure:10604: $? = 0 -configure:10615: result: - extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); -configure:10642: gcc -o conftest -g -O2 conftest.c >&5 -configure:10642: $? = 0 -configure:10653: checking argz.h usability -configure:10653: gcc -c -g -O2 conftest.c >&5 -configure:10653: $? = 0 -configure:10653: result: yes -configure:10653: checking argz.h presence -configure:10653: gcc -E conftest.c -configure:10653: $? = 0 -configure:10653: result: yes -configure:10653: checking for argz.h -configure:10653: result: yes -configure:10653: checking for inttypes.h -configure:10653: result: yes -configure:10653: checking limits.h usability -configure:10653: gcc -c -g -O2 conftest.c >&5 -configure:10653: $? = 0 -configure:10653: result: yes -configure:10653: checking limits.h presence -configure:10653: gcc -E conftest.c -configure:10653: $? = 0 -configure:10653: result: yes -configure:10653: checking for limits.h -configure:10653: result: yes -configure:10653: checking for unistd.h -configure:10653: result: yes -configure:10653: checking for sys/param.h -configure:10653: result: yes -configure:10668: checking for getcwd -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for getegid -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for geteuid -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for getgid -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for getuid -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for mempcpy -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:115:6: warning: conflicting types for built-in function 'mempcpy'; expected 'void *(void *, const void *, long unsigned int)' [-Wbuiltin-declaration-mismatch] - 115 | char mempcpy (); - | ^~~~~~~ -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for munmap -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for stpcpy -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:117:6: warning: conflicting types for built-in function 'stpcpy'; expected 'char *(char *, const char *)' [-Wbuiltin-declaration-mismatch] - 117 | char stpcpy (); - | ^~~~~~ -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for strcasecmp -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:118:6: warning: conflicting types for built-in function 'strcasecmp'; expected 'int(const char *, const char *)' [-Wbuiltin-declaration-mismatch] - 118 | char strcasecmp (); - | ^~~~~~~~~~ -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for strdup -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:119:6: warning: conflicting types for built-in function 'strdup'; expected 'char *(const char *)' [-Wbuiltin-declaration-mismatch] - 119 | char strdup (); - | ^~~~~~ -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for strtoul -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for tsearch -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for argz_count -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for argz_stringify -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for argz_next -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10668: checking for __fsetlocking -configure:10668: gcc -o conftest -g -O2 conftest.c >&5 -configure:10668: $? = 0 -configure:10668: result: yes -configure:10680: checking for localeconv -configure:10680: gcc -o conftest -g -O2 conftest.c >&5 -configure:10680: $? = 0 -configure:10680: result: yes -configure:10690: checking whether feof_unlocked is declared -configure:10690: gcc -c -g -O2 conftest.c >&5 -configure:10690: $? = 0 -configure:10690: result: yes -configure:10701: checking whether fgets_unlocked is declared -configure:10701: gcc -c -g -O2 conftest.c >&5 -configure:10701: $? = 0 -configure:10701: result: yes -configure:10720: checking for bison -configure:10736: found /usr/bin/bison -configure:10747: result: bison -configure:10761: checking version of bison -configure:10770: result: 3.8.2, ok -configure:10779: checking for long long int -configure:10817: gcc -o conftest -g -O2 conftest.c >&5 -configure:10817: $? = 0 -configure:10817: ./conftest -configure:10817: $? = 0 -configure:10829: result: yes -configure:10838: checking for wchar_t -configure:10855: gcc -c -g -O2 conftest.c >&5 -configure:10855: $? = 0 -configure:10862: result: yes -configure:10871: checking for wint_t -configure:10896: gcc -c -g -O2 conftest.c >&5 -configure:10896: $? = 0 -configure:10903: result: yes -configure:10910: checking whether wint_t is too small -configure:10938: gcc -c -g -O2 conftest.c >&5 -configure:10938: $? = 0 -configure:10945: result: no -configure:10960: checking for intmax_t -configure:10986: gcc -c -g -O2 conftest.c >&5 -configure:10986: $? = 0 -configure:10993: result: yes -configure:11003: checking whether printf() supports POSIX/XSI format strings -configure:11044: gcc -o conftest -g -O2 conftest.c >&5 -configure:11044: $? = 0 -configure:11044: ./conftest -configure:11044: $? = 0 -configure:11055: result: yes -configure:11066: checking whether we are using the GNU C Library >= 2.1 or uClibc -configure:11096: result: yes -configure:11105: checking for stdint.h -configure:11105: result: yes -configure:11115: checking for SIZE_MAX -configure:11186: result: yes -configure:11201: checking for stdint.h -configure:11201: result: yes -configure:11218: checking for symlink -configure:11218: gcc -o conftest -g -O2 conftest.c >&5 -configure:11218: $? = 0 -configure:11218: result: yes -configure:11218: checking for uselocale -configure:11218: gcc -o conftest -g -O2 conftest.c >&5 -configure:11218: $? = 0 -configure:11218: result: yes -configure:11218: checking for alarm -configure:11218: gcc -o conftest -g -O2 conftest.c >&5 -configure:11218: $? = 0 -configure:11218: result: yes -configure:11218: checking for fpurge -configure:11218: gcc -o conftest -g -O2 conftest.c >&5 -/usr/bin/ld: /tmp/cc2IKD8w.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:150: undefined reference to `fpurge' -collect2: error: ld returned 1 exit status -configure:11218: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| /* end confdefs.h. */ -| /* Define fpurge to an innocuous variant, in case declares fpurge. -| For example, HP-UX 11i declares gettimeofday. */ -| #define fpurge innocuous_fpurge -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char fpurge (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef fpurge -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char fpurge (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_fpurge || defined __stub___fpurge -| choke me -| #endif -| -| int -| main () -| { -| return fpurge (); -| ; -| return 0; -| } -configure:11218: result: no -configure:11218: checking for __fpurge -configure:11218: gcc -o conftest -g -O2 conftest.c >&5 -configure:11218: $? = 0 -configure:11218: result: yes -configure:11218: checking for snprintf -configure:11218: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:140:6: warning: conflicting types for built-in function 'snprintf'; expected 'int(char *, long unsigned int, const char *, ...)' [-Wbuiltin-declaration-mismatch] - 140 | char snprintf (); - | ^~~~~~~~ -conftest.c:128:1: note: 'snprintf' is declared in header '' - 127 | # include - 128 | #else -configure:11218: $? = 0 -configure:11218: result: yes -configure:11218: checking for vsnprintf -configure:11218: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:141:6: warning: conflicting types for built-in function 'vsnprintf'; expected 'int(char *, long unsigned int, const char *, __va_list_tag *)' [-Wbuiltin-declaration-mismatch] - 141 | char vsnprintf (); - | ^~~~~~~~~ -conftest.c:129:1: note: 'vsnprintf' is declared in header '' - 128 | # include - 129 | #else -configure:11218: $? = 0 -configure:11218: result: yes -configure:11234: checking for working fcntl.h -configure:11342: gcc -o conftest -g -O2 conftest.c >&5 -configure:11342: $? = 0 -configure:11342: ./conftest -configure:11342: $? = 0 -configure:11358: result: yes -configure:11397: checking whether uselocale works -configure:11424: gcc -o conftest -g -O2 conftest.c >&5 -configure:11424: $? = 0 -configure:11424: ./conftest -configure:11424: $? = 0 -configure:11435: result: yes -configure:11452: checking for fake locale system (OpenBSD) -configure:11481: gcc -o conftest -g -O2 conftest.c >&5 -configure:11481: $? = 0 -configure:11481: ./conftest -configure:11481: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| /* end confdefs.h. */ -| -| #include -| #if HAVE_XLOCALE_H -| # include -| #endif -| int main () -| { -| locale_t loc1, loc2; -| if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1; -| if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1; -| loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0); -| loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0); -| return !(loc1 == loc2); -| } -configure:11492: result: no -configure:11507: checking for Solaris 11.4 locale system -configure:11540: result: no -configure:11555: checking for getlocalename_l -configure:11555: gcc -o conftest -g -O2 conftest.c >&5 -/usr/bin/ld: /tmp/ccdj03iV.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:156: undefined reference to `getlocalename_l' -collect2: error: ld returned 1 exit status -configure:11555: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| /* end confdefs.h. */ -| /* Define getlocalename_l to an innocuous variant, in case declares getlocalename_l. -| For example, HP-UX 11i declares gettimeofday. */ -| #define getlocalename_l innocuous_getlocalename_l -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char getlocalename_l (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef getlocalename_l -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char getlocalename_l (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_getlocalename_l || defined __stub___getlocalename_l -| choke me -| #endif -| -| int -| main () -| { -| return getlocalename_l (); -| ; -| return 0; -| } -configure:11555: result: no -configure:11576: checking for CFPreferencesCopyAppValue -configure:11594: gcc -o conftest -g -O2 conftest.c -Wl,-framework -Wl,CoreFoundation >&5 -conftest.c:122:10: fatal error: CoreFoundation/CFPreferences.h: No such file or directory - 122 | #include - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -compilation terminated. -configure:11594: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| /* end confdefs.h. */ -| #include -| int -| main () -| { -| CFPreferencesCopyAppValue(NULL, NULL) -| ; -| return 0; -| } -configure:11603: result: no -configure:11610: checking for CFLocaleCopyCurrent -configure:11628: gcc -o conftest -g -O2 conftest.c -Wl,-framework -Wl,CoreFoundation >&5 -conftest.c:122:10: fatal error: CoreFoundation/CFLocale.h: No such file or directory - 122 | #include - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -compilation terminated. -configure:11628: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| /* end confdefs.h. */ -| #include -| int -| main () -| { -| CFLocaleCopyCurrent(); -| ; -| return 0; -| } -configure:11637: result: no -configure:11644: checking for CFLocaleCopyPreferredLanguages -configure:11662: gcc -o conftest -g -O2 conftest.c -Wl,-framework -Wl,CoreFoundation >&5 -conftest.c:122:10: fatal error: CoreFoundation/CFLocale.h: No such file or directory - 122 | #include - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -compilation terminated. -configure:11662: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| /* end confdefs.h. */ -| #include -| int -| main () -| { -| CFLocaleCopyPreferredLanguages(); -| ; -| return 0; -| } -configure:11671: result: no -configure:11692: checking for flexible array members -configure:11715: gcc -c -g -O2 conftest.c >&5 -configure:11715: $? = 0 -configure:11722: result: yes -configure:11783: checking for ar -configure:11810: result: ar -configure:11846: checking for ptrdiff_t -configure:11846: gcc -c -g -O2 conftest.c >&5 -configure:11846: $? = 0 -configure:11846: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:159:24: error: expected expression before ')' token - 159 | if (sizeof ((ptrdiff_t))) - | ^ -configure:11846: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((ptrdiff_t))) -| return 0; -| ; -| return 0; -| } -configure:11846: result: yes -configure:11859: checking features.h usability -configure:11859: gcc -c -g -O2 conftest.c >&5 -configure:11859: $? = 0 -configure:11859: result: yes -configure:11859: checking features.h presence -configure:11859: gcc -E conftest.c -configure:11859: $? = 0 -configure:11859: result: yes -configure:11859: checking for features.h -configure:11859: result: yes -configure:11859: checking stddef.h usability -configure:11859: gcc -c -g -O2 conftest.c >&5 -configure:11859: $? = 0 -configure:11859: result: yes -configure:11859: checking stddef.h presence -configure:11859: gcc -E conftest.c -configure:11859: $? = 0 -configure:11859: result: yes -configure:11859: checking for stddef.h -configure:11859: result: yes -configure:11859: checking for stdlib.h -configure:11859: result: yes -configure:11859: checking for string.h -configure:11859: result: yes -configure:11873: checking for asprintf -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -configure:11873: $? = 0 -configure:11873: result: yes -configure:11873: checking for fwprintf -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -configure:11873: $? = 0 -configure:11873: result: yes -configure:11873: checking for newlocale -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -configure:11873: $? = 0 -configure:11873: result: yes -configure:11873: checking for putenv -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -configure:11873: $? = 0 -configure:11873: result: yes -configure:11873: checking for setenv -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -configure:11873: $? = 0 -configure:11873: result: yes -configure:11873: checking for setlocale -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -configure:11873: $? = 0 -configure:11873: result: yes -configure:11873: checking for snprintf -configure:11873: result: yes -configure:11873: checking for strnlen -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:157:6: warning: conflicting types for built-in function 'strnlen'; expected 'long unsigned int(const char *, long unsigned int)' [-Wbuiltin-declaration-mismatch] - 157 | char strnlen (); - | ^~~~~~~ -configure:11873: $? = 0 -configure:11873: result: yes -configure:11873: checking for uselocale -configure:11873: result: yes -configure:11873: checking for wcslen -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -configure:11873: $? = 0 -configure:11873: result: yes -configure:11873: checking for wcsnlen -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -configure:11873: $? = 0 -configure:11873: result: yes -configure:11873: checking for mbrtowc -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -configure:11873: $? = 0 -configure:11873: result: yes -configure:11873: checking for wcrtomb -configure:11873: gcc -o conftest -g -O2 conftest.c >&5 -configure:11873: $? = 0 -configure:11873: result: yes -configure:11883: checking whether _snprintf is declared -configure:11883: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:149:10: error: '_snprintf' undeclared (first use in this function); did you mean 'vsnprintf'? - 149 | (void) _snprintf; - | ^~~~~~~~~ - | vsnprintf -conftest.c:149:10: note: each undeclared identifier is reported only once for each function it appears in -configure:11883: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| /* end confdefs.h. */ -| #include -| -| int -| main () -| { -| #ifndef _snprintf -| #ifdef __cplusplus -| (void) _snprintf; -| #else -| (void) _snprintf; -| #endif -| #endif -| -| ; -| return 0; -| } -configure:11883: result: no -configure:11894: checking whether _snwprintf is declared -configure:11894: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:150:10: error: '_snwprintf' undeclared (first use in this function); did you mean 'vsnprintf'? - 150 | (void) _snwprintf; - | ^~~~~~~~~~ - | vsnprintf -conftest.c:150:10: note: each undeclared identifier is reported only once for each function it appears in -configure:11894: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| /* end confdefs.h. */ -| #include -| -| int -| main () -| { -| #ifndef _snwprintf -| #ifdef __cplusplus -| (void) _snwprintf; -| #else -| (void) _snwprintf; -| #endif -| #endif -| -| ; -| return 0; -| } -configure:11894: result: no -configure:11907: checking whether getc_unlocked is declared -configure:11907: gcc -c -g -O2 conftest.c >&5 -configure:11907: $? = 0 -configure:11907: result: yes -configure:11951: checking for nl_langinfo and CODESET -configure:11967: gcc -o conftest -g -O2 conftest.c >&5 -configure:11967: $? = 0 -configure:11976: result: yes -configure:11985: checking for LC_MESSAGES -configure:12001: gcc -o conftest -g -O2 conftest.c >&5 -configure:12001: $? = 0 -configure:12009: result: yes -configure:12162: checking for CFPreferencesCopyAppValue -configure:12189: result: no -configure:12196: checking for CFLocaleCopyCurrent -configure:12223: result: no -configure:12230: checking for CFLocaleCopyPreferredLanguages -configure:12257: result: no -configure:12294: checking whether included gettext is requested -configure:12304: result: no -configure:12327: checking for GNU gettext in libc -configure:12356: gcc -o conftest -g -O2 conftest.c >&5 -configure:12356: $? = 0 -configure:12365: result: yes -configure:12970: checking whether to use NLS -configure:12972: result: yes -configure:12975: checking where the gettext function comes from -configure:12986: result: libc -configure:13076: checking for dirent.h that defines DIR -configure:13095: gcc -c -g -O2 conftest.c >&5 -configure:13095: $? = 0 -configure:13103: result: yes -configure:13116: checking for library containing opendir -configure:13147: gcc -o conftest -g -O2 conftest.c >&5 -configure:13147: $? = 0 -configure:13164: result: none required -configure:13231: checking whether time.h and sys/time.h may both be included -configure:13251: gcc -c -g -O2 conftest.c >&5 -configure:13251: $? = 0 -configure:13258: result: yes -configure:13266: checking whether sys/types.h defines makedev -configure:13282: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:154:8: warning: implicit declaration of function 'makedev' [-Wimplicit-function-declaration] - 154 | return makedev(0, 0); - | ^~~~~~~ -/usr/bin/ld: /tmp/ccjXPztc.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:154: undefined reference to `makedev' -collect2: error: ld returned 1 exit status -configure:13282: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| /* end confdefs.h. */ -| #include -| int -| main () -| { -| return makedev(0, 0); -| ; -| return 0; -| } -configure:13291: result: no -configure:13295: checking sys/mkdev.h usability -configure:13295: gcc -c -g -O2 conftest.c >&5 -conftest.c:183:10: fatal error: sys/mkdev.h: No such file or directory - 183 | #include - | ^~~~~~~~~~~~~ -compilation terminated. -configure:13295: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| #include -configure:13295: result: no -configure:13295: checking sys/mkdev.h presence -configure:13295: gcc -E conftest.c -conftest.c:150:10: fatal error: sys/mkdev.h: No such file or directory - 150 | #include - | ^~~~~~~~~~~~~ -compilation terminated. -configure:13295: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| /* end confdefs.h. */ -| #include -configure:13295: result: no -configure:13295: checking for sys/mkdev.h -configure:13295: result: no -configure:13305: checking sys/sysmacros.h usability -configure:13305: gcc -c -g -O2 conftest.c >&5 -configure:13305: $? = 0 -configure:13305: result: yes -configure:13305: checking sys/sysmacros.h presence -configure:13305: gcc -E conftest.c -configure:13305: $? = 0 -configure:13305: result: yes -configure:13305: checking for sys/sysmacros.h -configure:13305: result: yes -configure:13320: checking for inttypes.h -configure:13320: result: yes -configure:13338: checking for unistd.h -configure:13338: result: yes -configure:13338: checking for stdlib.h -configure:13338: result: yes -configure:13338: checking stdarg.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking stdarg.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for stdarg.h -configure:13338: result: yes -configure:13338: checking varargs.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -In file included from conftest.c:188: -/usr/lib/gcc/x86_64-linux-gnu/11/include/varargs.h:4:2: error: #error "GCC no longer implements ." - 4 | #error "GCC no longer implements ." - | ^~~~~ -/usr/lib/gcc/x86_64-linux-gnu/11/include/varargs.h:5:2: error: #error "Revise your code to use ." - 5 | #error "Revise your code to use ." - | ^~~~~ -configure:13338: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| #include -configure:13338: result: no -configure:13338: checking varargs.h presence -configure:13338: gcc -E conftest.c -In file included from conftest.c:155: -/usr/lib/gcc/x86_64-linux-gnu/11/include/varargs.h:4:2: error: #error "GCC no longer implements ." - 4 | #error "GCC no longer implements ." - | ^~~~~ -/usr/lib/gcc/x86_64-linux-gnu/11/include/varargs.h:5:2: error: #error "Revise your code to use ." - 5 | #error "Revise your code to use ." - | ^~~~~ -configure:13338: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| /* end confdefs.h. */ -| #include -configure:13338: result: no -configure:13338: checking for varargs.h -configure:13338: result: no -configure:13338: checking for limits.h -configure:13338: result: yes -configure:13338: checking for string.h -configure:13338: result: yes -configure:13338: checking for memory.h -configure:13338: result: yes -configure:13338: checking locale.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking locale.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for locale.h -configure:13338: result: yes -configure:13338: checking termcap.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking termcap.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for termcap.h -configure:13338: result: yes -configure:13338: checking termio.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking termio.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for termio.h -configure:13338: result: yes -configure:13338: checking termios.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking termios.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for termios.h -configure:13338: result: yes -configure:13338: checking dlfcn.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking dlfcn.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for dlfcn.h -configure:13338: result: yes -configure:13338: checking stdbool.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking stdbool.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for stdbool.h -configure:13338: result: yes -configure:13338: checking for stddef.h -configure:13338: result: yes -configure:13338: checking for stdint.h -configure:13338: result: yes -configure:13338: checking netdb.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking netdb.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for netdb.h -configure:13338: result: yes -configure:13338: checking pwd.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking pwd.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for pwd.h -configure:13338: result: yes -configure:13338: checking grp.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking grp.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for grp.h -configure:13338: result: yes -configure:13338: checking for strings.h -configure:13338: result: yes -configure:13338: checking regex.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking regex.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for regex.h -configure:13338: result: yes -configure:13338: checking syslog.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking syslog.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for syslog.h -configure:13338: result: yes -configure:13338: checking ulimit.h usability -configure:13338: gcc -c -g -O2 conftest.c >&5 -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking ulimit.h presence -configure:13338: gcc -E conftest.c -configure:13338: $? = 0 -configure:13338: result: yes -configure:13338: checking for ulimit.h -configure:13338: result: yes -configure:13353: checking sys/pte.h usability -configure:13353: gcc -c -g -O2 conftest.c >&5 -conftest.c:206:10: fatal error: sys/pte.h: No such file or directory - 206 | #include - | ^~~~~~~~~~~ -compilation terminated. -configure:13353: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| #include -configure:13353: result: no -configure:13353: checking sys/pte.h presence -configure:13353: gcc -E conftest.c -conftest.c:173:10: fatal error: sys/pte.h: No such file or directory - 173 | #include - | ^~~~~~~~~~~ -compilation terminated. -configure:13353: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| /* end confdefs.h. */ -| #include -configure:13353: result: no -configure:13353: checking for sys/pte.h -configure:13353: result: no -configure:13353: checking sys/stream.h usability -configure:13353: gcc -c -g -O2 conftest.c >&5 -conftest.c:206:10: fatal error: sys/stream.h: No such file or directory - 206 | #include - | ^~~~~~~~~~~~~~ -compilation terminated. -configure:13353: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| #include -configure:13353: result: no -configure:13353: checking sys/stream.h presence -configure:13353: gcc -E conftest.c -conftest.c:173:10: fatal error: sys/stream.h: No such file or directory - 173 | #include - | ^~~~~~~~~~~~~~ -compilation terminated. -configure:13353: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| /* end confdefs.h. */ -| #include -configure:13353: result: no -configure:13353: checking for sys/stream.h -configure:13353: result: no -configure:13353: checking sys/select.h usability -configure:13353: gcc -c -g -O2 conftest.c >&5 -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking sys/select.h presence -configure:13353: gcc -E conftest.c -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking for sys/select.h -configure:13353: result: yes -configure:13353: checking sys/file.h usability -configure:13353: gcc -c -g -O2 conftest.c >&5 -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking sys/file.h presence -configure:13353: gcc -E conftest.c -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking for sys/file.h -configure:13353: result: yes -configure:13353: checking sys/ioctl.h usability -configure:13353: gcc -c -g -O2 conftest.c >&5 -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking sys/ioctl.h presence -configure:13353: gcc -E conftest.c -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking for sys/ioctl.h -configure:13353: result: yes -configure:13353: checking sys/mman.h usability -configure:13353: gcc -c -g -O2 conftest.c >&5 -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking sys/mman.h presence -configure:13353: gcc -E conftest.c -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking for sys/mman.h -configure:13353: result: yes -configure:13353: checking for sys/param.h -configure:13353: result: yes -configure:13353: checking sys/random.h usability -configure:13353: gcc -c -g -O2 conftest.c >&5 -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking sys/random.h presence -configure:13353: gcc -E conftest.c -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking for sys/random.h -configure:13353: result: yes -configure:13353: checking sys/socket.h usability -configure:13353: gcc -c -g -O2 conftest.c >&5 -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking sys/socket.h presence -configure:13353: gcc -E conftest.c -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking for sys/socket.h -configure:13353: result: yes -configure:13353: checking for sys/stat.h -configure:13353: result: yes -configure:13353: checking for sys/time.h -configure:13353: result: yes -configure:13353: checking sys/times.h usability -configure:13353: gcc -c -g -O2 conftest.c >&5 -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking sys/times.h presence -configure:13353: gcc -E conftest.c -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking for sys/times.h -configure:13353: result: yes -configure:13353: checking for sys/types.h -configure:13353: result: yes -configure:13353: checking sys/wait.h usability -configure:13353: gcc -c -g -O2 conftest.c >&5 -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking sys/wait.h presence -configure:13353: gcc -E conftest.c -configure:13353: $? = 0 -configure:13353: result: yes -configure:13353: checking for sys/wait.h -configure:13353: result: yes -configure:13366: checking netinet/in.h usability -configure:13366: gcc -c -g -O2 conftest.c >&5 -configure:13366: $? = 0 -configure:13366: result: yes -configure:13366: checking netinet/in.h presence -configure:13366: gcc -E conftest.c -configure:13366: $? = 0 -configure:13366: result: yes -configure:13366: checking for netinet/in.h -configure:13366: result: yes -configure:13366: checking arpa/inet.h usability -configure:13366: gcc -c -g -O2 conftest.c >&5 -configure:13366: $? = 0 -configure:13366: result: yes -configure:13366: checking arpa/inet.h presence -configure:13366: gcc -E conftest.c -configure:13366: $? = 0 -configure:13366: result: yes -configure:13366: checking for arpa/inet.h -configure:13366: result: yes -configure:13377: checking for sys/ptem.h -configure:13377: gcc -c -g -O2 conftest.c >&5 -conftest.c:193:10: fatal error: sys/ptem.h: No such file or directory - 193 | #include - | ^~~~~~~~~~~~ -compilation terminated. -configure:13377: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| /* end confdefs.h. */ -| -| #if HAVE_SYS_STREAM_H -| # include -| #endif -| -| -| #include -configure:13377: result: no -configure:13389: checking for sys/resource.h -configure:13389: gcc -c -g -O2 conftest.c >&5 -configure:13389: $? = 0 -configure:13389: result: yes -configure:13404: checking for working alloca.h -configure:13429: result: yes -configure:13437: checking for alloca -configure:13482: result: yes -configure:13588: checking for uid_t in sys/types.h -configure:13607: result: yes -configure:13620: checking for unistd.h -configure:13620: result: yes -configure:13630: checking for working chown -configure:13663: gcc -o conftest -g -O2 conftest.c >&5 -configure:13663: $? = 0 -configure:13663: ./conftest -configure:13663: $? = 0 -configure:13675: result: yes -configure:13683: checking whether getpgrp requires zero arguments -configure:13700: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:228:1: error: too many arguments to function 'getpgrp' - 228 | getpgrp (0); - | ^~~~~~~ -In file included from conftest.c:223: -/usr/include/unistd.h:656:16: note: declared here - 656 | extern __pid_t getpgrp (void) __THROW; - | ^~~~~~~ -configure:13700: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| getpgrp (0); -| ; -| return 0; -| } -configure:13708: result: yes -configure:13725: checking for vprintf -configure:13725: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:216:6: warning: conflicting types for built-in function 'vprintf'; expected 'int(const char *, __va_list_tag *)' [-Wbuiltin-declaration-mismatch] - 216 | char vprintf (); - | ^~~~~~~ -conftest.c:204:1: note: 'vprintf' is declared in header '' - 203 | # include - 204 | #else -configure:13725: $? = 0 -configure:13725: result: yes -configure:13731: checking for _doprnt -configure:13731: gcc -o conftest -g -O2 conftest.c >&5 -/usr/bin/ld: /tmp/ccRB0RCF.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:228: undefined reference to `_doprnt' -collect2: error: ld returned 1 exit status -configure:13731: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| /* end confdefs.h. */ -| /* Define _doprnt to an innocuous variant, in case declares _doprnt. -| For example, HP-UX 11i declares gettimeofday. */ -| #define _doprnt innocuous__doprnt -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char _doprnt (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef _doprnt -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char _doprnt (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub__doprnt || defined __stub____doprnt -| choke me -| #endif -| -| int -| main () -| { -| return _doprnt (); -| ; -| return 0; -| } -configure:13731: result: no -configure:13742: checking for working strcoll -configure:13763: gcc -o conftest -g -O2 conftest.c >&5 -configure:13763: $? = 0 -configure:13763: ./conftest -configure:13763: $? = 0 -configure:13773: result: yes -configure:13824: checking return type of signal handlers -configure:13842: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:201:10: error: void value not ignored as it ought to be - 201 | return *(signal (0, 0)) (0) == 1; - | ~^~~~~~~~~~~~~~~~~~ -configure:13842: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| /* end confdefs.h. */ -| #include -| #include -| -| int -| main () -| { -| return *(signal (0, 0)) (0) == 1; -| ; -| return 0; -| } -configure:13849: result: void -configure:13858: checking for __setostype -configure:13858: gcc -o conftest -g -O2 conftest.c >&5 -/usr/bin/ld: /tmp/ccSL1S5S.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:230: undefined reference to `__setostype' -collect2: error: ld returned 1 exit status -configure:13858: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| /* end confdefs.h. */ -| /* Define __setostype to an innocuous variant, in case declares __setostype. -| For example, HP-UX 11i declares gettimeofday. */ -| #define __setostype innocuous___setostype -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char __setostype (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef __setostype -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char __setostype (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub___setostype || defined __stub_____setostype -| choke me -| #endif -| -| int -| main () -| { -| return __setostype (); -| ; -| return 0; -| } -configure:13858: result: no -configure:13864: checking for wait3 -configure:13864: gcc -o conftest -g -O2 conftest.c >&5 -configure:13864: $? = 0 -configure:13864: result: yes -configure:13871: checking for mkfifo -configure:13871: gcc -o conftest -g -O2 conftest.c >&5 -configure:13871: $? = 0 -configure:13871: result: yes -configure:13887: checking for dup2 -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for eaccess -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for fcntl -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for getdtablesize -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for getentropy -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for getgroups -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for gethostname -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for getpagesize -configure:13887: result: yes -configure:13887: checking for getpeername -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for getrandom -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for getrlimit -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for getrusage -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for gettimeofday -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for kill -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for killpg -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for lstat -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for pselect -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for readlink -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for select -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for setdtablesize -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -/usr/bin/ld: /tmp/ccKglkS4.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:251: undefined reference to `setdtablesize' -collect2: error: ld returned 1 exit status -configure:13887: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| /* end confdefs.h. */ -| /* Define setdtablesize to an innocuous variant, in case declares setdtablesize. -| For example, HP-UX 11i declares gettimeofday. */ -| #define setdtablesize innocuous_setdtablesize -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char setdtablesize (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef setdtablesize -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char setdtablesize (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_setdtablesize || defined __stub___setdtablesize -| choke me -| #endif -| -| int -| main () -| { -| return setdtablesize (); -| ; -| return 0; -| } -configure:13887: result: no -configure:13887: checking for setitimer -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for tcgetpgrp -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for uname -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for ulimit -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for waitpid -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13887: checking for pread -configure:13887: gcc -o conftest -g -O2 conftest.c >&5 -configure:13887: $? = 0 -configure:13887: result: yes -configure:13896: checking for rename -configure:13896: gcc -o conftest -g -O2 conftest.c >&5 -configure:13896: $? = 0 -configure:13896: result: yes -configure:13918: checking for bcopy -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:247:6: warning: conflicting types for built-in function 'bcopy'; expected 'void(const void *, void *, long unsigned int)' [-Wbuiltin-declaration-mismatch] - 247 | char bcopy (); - | ^~~~~ -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for bzero -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:248:6: warning: conflicting types for built-in function 'bzero'; expected 'void(void *, long unsigned int)' [-Wbuiltin-declaration-mismatch] - 248 | char bzero (); - | ^~~~~ -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for confstr -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for faccessat -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for fnmatch -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for getaddrinfo -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for gethostbyname -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for getservbyname -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for getservent -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for inet_aton -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for imaxdiv -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for memmove -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:258:6: warning: conflicting types for built-in function 'memmove'; expected 'void *(void *, const void *, long unsigned int)' [-Wbuiltin-declaration-mismatch] - 258 | char memmove (); - | ^~~~~~~ -conftest.c:246:1: note: 'memmove' is declared in header '' - 245 | # include - 246 | #else -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for pathconf -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for putenv -configure:13918: result: yes -configure:13918: checking for raise -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for random -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for regcomp -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for regexec -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for setenv -configure:13918: result: yes -configure:13918: checking for setlinebuf -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for setlocale -configure:13918: result: yes -configure:13918: checking for setvbuf -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for siginterrupt -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for strchr -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:270:6: warning: conflicting types for built-in function 'strchr'; expected 'char *(const char *, int)' [-Wbuiltin-declaration-mismatch] - 270 | char strchr (); - | ^~~~~~ -conftest.c:258:1: note: 'strchr' is declared in header '' - 257 | # include - 258 | #else -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for sysconf -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for syslog -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for tcgetattr -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for times -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for ttyname -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for tzset -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13918: checking for unsetenv -configure:13918: gcc -o conftest -g -O2 conftest.c >&5 -configure:13918: $? = 0 -configure:13918: result: yes -configure:13931: checking for vasprintf -configure:13931: gcc -o conftest -g -O2 conftest.c >&5 -configure:13931: $? = 0 -configure:13931: result: yes -configure:13931: checking for asprintf -configure:13931: result: yes -configure:13943: checking for isascii -configure:13943: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:280:6: warning: conflicting types for built-in function 'isascii'; expected 'int(int)' [-Wbuiltin-declaration-mismatch] - 280 | char isascii (); - | ^~~~~~~ -configure:13943: $? = 0 -configure:13943: result: yes -configure:13943: checking for isblank -configure:13943: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:281:6: warning: conflicting types for built-in function 'isblank'; expected 'int(int)' [-Wbuiltin-declaration-mismatch] - 281 | char isblank (); - | ^~~~~~~ -conftest.c:269:1: note: 'isblank' is declared in header '' - 268 | # include - 269 | #else -configure:13943: $? = 0 -configure:13943: result: yes -configure:13943: checking for isgraph -configure:13943: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:282:6: warning: conflicting types for built-in function 'isgraph'; expected 'int(int)' [-Wbuiltin-declaration-mismatch] - 282 | char isgraph (); - | ^~~~~~~ -conftest.c:270:1: note: 'isgraph' is declared in header '' - 269 | # include - 270 | #else -configure:13943: $? = 0 -configure:13943: result: yes -configure:13943: checking for isprint -configure:13943: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:283:6: warning: conflicting types for built-in function 'isprint'; expected 'int(int)' [-Wbuiltin-declaration-mismatch] - 283 | char isprint (); - | ^~~~~~~ -conftest.c:271:1: note: 'isprint' is declared in header '' - 270 | # include - 271 | #else -configure:13943: $? = 0 -configure:13943: result: yes -configure:13943: checking for isspace -configure:13943: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:284:6: warning: conflicting types for built-in function 'isspace'; expected 'int(int)' [-Wbuiltin-declaration-mismatch] - 284 | char isspace (); - | ^~~~~~~ -conftest.c:272:1: note: 'isspace' is declared in header '' - 271 | # include - 272 | #else -configure:13943: $? = 0 -configure:13943: result: yes -configure:13943: checking for isxdigit -configure:13943: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:285:6: warning: conflicting types for built-in function 'isxdigit'; expected 'int(int)' [-Wbuiltin-declaration-mismatch] - 285 | char isxdigit (); - | ^~~~~~~~ -conftest.c:273:1: note: 'isxdigit' is declared in header '' - 272 | # include - 273 | #else -configure:13943: $? = 0 -configure:13943: result: yes -configure:13955: checking for getpwent -configure:13955: gcc -o conftest -g -O2 conftest.c >&5 -configure:13955: $? = 0 -configure:13955: result: yes -configure:13955: checking for getpwnam -configure:13955: gcc -o conftest -g -O2 conftest.c >&5 -configure:13955: $? = 0 -configure:13955: result: yes -configure:13955: checking for getpwuid -configure:13955: gcc -o conftest -g -O2 conftest.c >&5 -configure:13955: $? = 0 -configure:13955: result: yes -configure:13967: checking for mkstemp -configure:13967: gcc -o conftest -g -O2 conftest.c >&5 -configure:13967: $? = 0 -configure:13967: result: yes -configure:13967: checking for mkdtemp -configure:13967: gcc -o conftest -g -O2 conftest.c >&5 -configure:13967: $? = 0 -configure:13967: result: yes -configure:13978: checking for arc4random -configure:13978: gcc -o conftest -g -O2 conftest.c >&5 -/usr/bin/ld: /tmp/cccWceui.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:302: undefined reference to `arc4random' -collect2: error: ld returned 1 exit status -configure:13978: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| /* end confdefs.h. */ -| /* Define arc4random to an innocuous variant, in case declares arc4random. -| For example, HP-UX 11i declares gettimeofday. */ -| #define arc4random innocuous_arc4random -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char arc4random (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef arc4random -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char arc4random (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_arc4random || defined __stub___arc4random -| choke me -| #endif -| -| int -| main () -| { -| return arc4random (); -| ; -| return 0; -| } -configure:13978: result: no -configure:13988: checking for getcwd -configure:13988: result: yes -configure:14001: checking for memset -configure:14001: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:292:6: warning: conflicting types for built-in function 'memset'; expected 'void *(void *, int, long unsigned int)' [-Wbuiltin-declaration-mismatch] - 292 | char memset (); - | ^~~~~~ -conftest.c:280:1: note: 'memset' is declared in header '' - 279 | # include - 280 | #else -configure:14001: $? = 0 -configure:14001: result: yes -configure:14015: checking for strcasecmp -configure:14015: result: yes -configure:14028: checking for strcasestr -configure:14028: gcc -o conftest -g -O2 conftest.c >&5 -configure:14028: $? = 0 -configure:14028: result: yes -configure:14041: checking for strerror -configure:14041: gcc -o conftest -g -O2 conftest.c >&5 -configure:14041: $? = 0 -configure:14041: result: yes -configure:14054: checking for strftime -configure:14054: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:296:6: warning: conflicting types for built-in function 'strftime'; expected 'long unsigned int(char *, long unsigned int, const char *, const void *)' [-Wbuiltin-declaration-mismatch] - 296 | char strftime (); - | ^~~~~~~~ -conftest.c:284:1: note: 'strftime' is declared in header '' - 283 | # include - 284 | #else -configure:14054: $? = 0 -configure:14054: result: yes -configure:14067: checking for strnlen -configure:14067: result: yes -configure:14080: checking for strpbrk -configure:14080: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:298:6: warning: conflicting types for built-in function 'strpbrk'; expected 'char *(const char *, const char *)' [-Wbuiltin-declaration-mismatch] - 298 | char strpbrk (); - | ^~~~~~~ -conftest.c:286:1: note: 'strpbrk' is declared in header '' - 285 | # include - 286 | #else -configure:14080: $? = 0 -configure:14080: result: yes -configure:14093: checking for strstr -configure:14093: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:299:6: warning: conflicting types for built-in function 'strstr'; expected 'char *(const char *, const char *)' [-Wbuiltin-declaration-mismatch] - 299 | char strstr (); - | ^~~~~~ -conftest.c:287:1: note: 'strstr' is declared in header '' - 286 | # include - 287 | #else -configure:14093: $? = 0 -configure:14093: result: yes -configure:14107: checking for strtod -configure:14107: gcc -o conftest -g -O2 conftest.c >&5 -configure:14107: $? = 0 -configure:14107: result: yes -configure:14120: checking for strtol -configure:14120: gcc -o conftest -g -O2 conftest.c >&5 -configure:14120: $? = 0 -configure:14120: result: yes -configure:14133: checking for strtoul -configure:14133: result: yes -configure:14146: checking for strtoll -configure:14146: gcc -o conftest -g -O2 conftest.c >&5 -configure:14146: $? = 0 -configure:14146: result: yes -configure:14159: checking for strtoull -configure:14159: gcc -o conftest -g -O2 conftest.c >&5 -configure:14159: $? = 0 -configure:14159: result: yes -configure:14172: checking for strtoimax -configure:14172: gcc -o conftest -g -O2 conftest.c >&5 -configure:14172: $? = 0 -configure:14172: result: yes -configure:14185: checking for strtoumax -configure:14185: gcc -o conftest -g -O2 conftest.c >&5 -configure:14185: $? = 0 -configure:14185: result: yes -configure:14199: checking for dprintf -configure:14199: gcc -o conftest -g -O2 conftest.c >&5 -configure:14199: $? = 0 -configure:14199: result: yes -configure:14213: checking for strchrnul -configure:14213: gcc -o conftest -g -O2 conftest.c >&5 -configure:14213: $? = 0 -configure:14213: result: yes -configure:14227: checking for strdup -configure:14227: result: yes -configure:14244: checking libaudit.h usability -configure:14244: gcc -c -g -O2 conftest.c >&5 -conftest.c:320:10: fatal error: libaudit.h: No such file or directory - 320 | #include - | ^~~~~~~~~~~~ -compilation terminated. -configure:14244: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| #include -configure:14244: result: no -configure:14244: checking libaudit.h presence -configure:14244: gcc -E conftest.c -conftest.c:287:10: fatal error: libaudit.h: No such file or directory - 287 | #include - | ^~~~~~~~~~~~ -compilation terminated. -configure:14244: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| /* end confdefs.h. */ -| #include -configure:14244: result: no -configure:14244: checking for libaudit.h -configure:14244: result: no -configure:14254: checking whether AUDIT_USER_TTY is declared -configure:14254: gcc -c -g -O2 conftest.c >&5 -configure:14254: $? = 0 -configure:14254: result: yes -configure:14267: checking whether confstr is declared -configure:14267: gcc -c -g -O2 conftest.c >&5 -configure:14267: $? = 0 -configure:14267: result: yes -configure:14278: checking whether printf is declared -configure:14278: gcc -c -g -O2 conftest.c >&5 -configure:14278: $? = 0 -configure:14278: result: yes -configure:14289: checking whether sbrk is declared -configure:14289: gcc -c -g -O2 conftest.c >&5 -configure:14289: $? = 0 -configure:14289: result: yes -configure:14300: checking whether setregid is declared -configure:14300: gcc -c -g -O2 conftest.c >&5 -configure:14300: $? = 0 -configure:14300: result: yes -configure:14311: checking whether strcpy is declared -configure:14311: gcc -c -g -O2 conftest.c >&5 -configure:14311: $? = 0 -configure:14311: result: yes -configure:14322: checking whether strsignal is declared -configure:14322: gcc -c -g -O2 conftest.c >&5 -configure:14322: $? = 0 -configure:14322: result: yes -configure:14337: checking for setresuid -configure:14337: gcc -o conftest -g -O2 conftest.c >&5 -configure:14337: $? = 0 -configure:14337: result: yes -configure:14337: checking for setresgid -configure:14337: gcc -o conftest -g -O2 conftest.c >&5 -configure:14337: $? = 0 -configure:14337: result: yes -configure:14347: checking whether strtold is declared -configure:14347: gcc -c -g -O2 conftest.c >&5 -configure:14347: $? = 0 -configure:14347: result: yes -configure:14359: checking for broken strtold -configure:14375: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:301:49: warning: passing argument 2 of 'strtold' from incompatible pointer type [-Wincompatible-pointer-types] - 301 | long double r; char *foo, bar; r = strtold(foo, &bar); - | ^~~~ - | | - | char * -In file included from conftest.c:297: -/usr/include/stdlib.h:128:47: note: expected 'char ** restrict' but argument is of type 'char *' - 128 | char **__restrict __endptr) - | ~~~~~~~~~~~~~~~~~~^~~~~~~~ -configure:14375: $? = 0 -configure:14385: result: no -configure:14398: checking for declaration of strtoimax -configure:14421: gcc -o conftest -g -O2 conftest.c >&5 -configure:14421: $? = 0 -configure:14429: result: yes -configure:14447: checking for declaration of strtol -configure:14470: gcc -o conftest -g -O2 conftest.c >&5 -configure:14470: $? = 0 -configure:14478: result: yes -configure:14496: checking for declaration of strtoll -configure:14519: gcc -o conftest -g -O2 conftest.c >&5 -configure:14519: $? = 0 -configure:14527: result: yes -configure:14545: checking for declaration of strtoul -configure:14568: gcc -o conftest -g -O2 conftest.c >&5 -configure:14568: $? = 0 -configure:14576: result: yes -configure:14594: checking for declaration of strtoull -configure:14617: gcc -o conftest -g -O2 conftest.c >&5 -configure:14617: $? = 0 -configure:14625: result: yes -configure:14643: checking for declaration of strtoumax -configure:14666: gcc -o conftest -g -O2 conftest.c >&5 -configure:14666: $? = 0 -configure:14674: result: yes -configure:14696: checking for working mktime -configure:14898: gcc -o conftest -g -O2 conftest.c >&5 -configure:14898: $? = 0 -configure:14898: ./conftest -configure:14898: $? = 0 -configure:14908: result: yes -configure:14924: checking for argz.h -configure:14924: result: yes -configure:14924: checking errno.h usability -configure:14924: gcc -c -g -O2 conftest.c >&5 -configure:14924: $? = 0 -configure:14924: result: yes -configure:14924: checking errno.h presence -configure:14924: gcc -E conftest.c -configure:14924: $? = 0 -configure:14924: result: yes -configure:14924: checking for errno.h -configure:14924: result: yes -configure:14924: checking fcntl.h usability -configure:14924: gcc -c -g -O2 conftest.c >&5 -configure:14924: $? = 0 -configure:14924: result: yes -configure:14924: checking fcntl.h presence -configure:14924: gcc -E conftest.c -configure:14924: $? = 0 -configure:14924: result: yes -configure:14924: checking for fcntl.h -configure:14924: result: yes -configure:14924: checking malloc.h usability -configure:14924: gcc -c -g -O2 conftest.c >&5 -configure:14924: $? = 0 -configure:14924: result: yes -configure:14924: checking malloc.h presence -configure:14924: gcc -E conftest.c -configure:14924: $? = 0 -configure:14924: result: yes -configure:14924: checking for malloc.h -configure:14924: result: yes -configure:14924: checking stdio_ext.h usability -configure:14924: gcc -c -g -O2 conftest.c >&5 -configure:14924: $? = 0 -configure:14924: result: yes -configure:14924: checking stdio_ext.h presence -configure:14924: gcc -E conftest.c -configure:14924: $? = 0 -configure:14924: result: yes -configure:14924: checking for stdio_ext.h -configure:14924: result: yes -configure:14938: checking for getpagesize -configure:14938: result: yes -configure:14947: checking for working mmap -configure:15104: result: yes -configure:15117: checking for __argz_count -configure:15117: gcc -o conftest -g -O2 conftest.c >&5 -configure:15117: $? = 0 -configure:15117: result: yes -configure:15117: checking for __argz_next -configure:15117: gcc -o conftest -g -O2 conftest.c >&5 -configure:15117: $? = 0 -configure:15117: result: yes -configure:15117: checking for __argz_stringify -configure:15117: gcc -o conftest -g -O2 conftest.c >&5 -configure:15117: $? = 0 -configure:15117: result: yes -configure:15117: checking for dcgettext -configure:15117: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:336:6: warning: conflicting types for built-in function 'dcgettext'; expected 'char *(const char *, const char *, int)' [-Wbuiltin-declaration-mismatch] - 336 | char dcgettext (); - | ^~~~~~~~~ -configure:15117: $? = 0 -configure:15117: result: yes -configure:15117: checking for mempcpy -configure:15117: result: yes -configure:15117: checking for munmap -configure:15117: result: yes -configure:15117: checking for mremap -configure:15117: gcc -o conftest -g -O2 conftest.c >&5 -configure:15117: $? = 0 -configure:15117: result: yes -configure:15117: checking for stpcpy -configure:15117: result: yes -configure:15117: checking for strcspn -configure:15117: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:341:6: warning: conflicting types for built-in function 'strcspn'; expected 'long unsigned int(const char *, const char *)' [-Wbuiltin-declaration-mismatch] - 341 | char strcspn (); - | ^~~~~~~ -conftest.c:329:1: note: 'strcspn' is declared in header '' - 328 | # include - 329 | #else -configure:15117: $? = 0 -configure:15117: result: yes -configure:15141: checking wctype.h usability -configure:15141: gcc -c -g -O2 conftest.c >&5 -configure:15141: $? = 0 -configure:15141: result: yes -configure:15141: checking wctype.h presence -configure:15141: gcc -E conftest.c -configure:15141: $? = 0 -configure:15141: result: yes -configure:15141: checking for wctype.h -configure:15141: result: yes -configure:15153: checking wchar.h usability -configure:15153: gcc -c -g -O2 conftest.c >&5 -configure:15153: $? = 0 -configure:15153: result: yes -configure:15153: checking wchar.h presence -configure:15153: gcc -E conftest.c -configure:15153: $? = 0 -configure:15153: result: yes -configure:15153: checking for wchar.h -configure:15153: result: yes -configure:15165: checking langinfo.h usability -configure:15165: gcc -c -g -O2 conftest.c >&5 -configure:15165: $? = 0 -configure:15165: result: yes -configure:15165: checking langinfo.h presence -configure:15165: gcc -E conftest.c -configure:15165: $? = 0 -configure:15165: result: yes -configure:15165: checking for langinfo.h -configure:15165: result: yes -configure:15178: checking mbstr.h usability -configure:15178: gcc -c -g -O2 conftest.c >&5 -conftest.c:355:10: fatal error: mbstr.h: No such file or directory - 355 | #include - | ^~~~~~~~~ -compilation terminated. -configure:15178: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| #include -configure:15178: result: no -configure:15178: checking mbstr.h presence -configure:15178: gcc -E conftest.c -conftest.c:322:10: fatal error: mbstr.h: No such file or directory - 322 | #include - | ^~~~~~~~~ -compilation terminated. -configure:15178: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| /* end confdefs.h. */ -| #include -configure:15178: result: no -configure:15178: checking for mbstr.h -configure:15178: result: no -configure:15189: checking for mbrlen -configure:15189: gcc -o conftest -g -O2 conftest.c >&5 -configure:15189: $? = 0 -configure:15189: result: yes -configure:15195: checking for mbscasecmp -configure:15195: gcc -o conftest -g -O2 conftest.c >&5 -/usr/bin/ld: /tmp/cclopOs1.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:357: undefined reference to `mbscasecmp' -collect2: error: ld returned 1 exit status -configure:15195: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| /* end confdefs.h. */ -| /* Define mbscasecmp to an innocuous variant, in case declares mbscasecmp. -| For example, HP-UX 11i declares gettimeofday. */ -| #define mbscasecmp innocuous_mbscasecmp -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char mbscasecmp (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef mbscasecmp -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char mbscasecmp (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_mbscasecmp || defined __stub___mbscasecmp -| choke me -| #endif -| -| int -| main () -| { -| return mbscasecmp (); -| ; -| return 0; -| } -configure:15195: result: no -configure:15201: checking for mbscmp -configure:15201: gcc -o conftest -g -O2 conftest.c >&5 -/usr/bin/ld: /tmp/ccRNbJk6.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:357: undefined reference to `mbscmp' -collect2: error: ld returned 1 exit status -configure:15201: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| /* end confdefs.h. */ -| /* Define mbscmp to an innocuous variant, in case declares mbscmp. -| For example, HP-UX 11i declares gettimeofday. */ -| #define mbscmp innocuous_mbscmp -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char mbscmp (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef mbscmp -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char mbscmp (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_mbscmp || defined __stub___mbscmp -| choke me -| #endif -| -| int -| main () -| { -| return mbscmp (); -| ; -| return 0; -| } -configure:15201: result: no -configure:15207: checking for mbsnrtowcs -configure:15207: gcc -o conftest -g -O2 conftest.c >&5 -configure:15207: $? = 0 -configure:15207: result: yes -configure:15213: checking for mbsrtowcs -configure:15213: gcc -o conftest -g -O2 conftest.c >&5 -configure:15213: $? = 0 -configure:15213: result: yes -configure:15220: checking for mbschr -configure:15220: gcc -o conftest -g -O2 conftest.c >&5 -/usr/bin/ld: /tmp/ccYozunJ.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:359: undefined reference to `mbschr' -collect2: error: ld returned 1 exit status -configure:15220: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| /* end confdefs.h. */ -| /* Define mbschr to an innocuous variant, in case declares mbschr. -| For example, HP-UX 11i declares gettimeofday. */ -| #define mbschr innocuous_mbschr -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char mbschr (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef mbschr -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char mbschr (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_mbschr || defined __stub___mbschr -| choke me -| #endif -| -| int -| main () -| { -| return mbschr (); -| ; -| return 0; -| } -configure:15220: result: no -configure:15235: checking for wcrtomb -configure:15235: result: yes -configure:15241: checking for wcscoll -configure:15241: gcc -o conftest -g -O2 conftest.c >&5 -configure:15241: $? = 0 -configure:15241: result: yes -configure:15247: checking for wcsdup -configure:15247: gcc -o conftest -g -O2 conftest.c >&5 -configure:15247: $? = 0 -configure:15247: result: yes -configure:15253: checking for wcwidth -configure:15253: gcc -o conftest -g -O2 conftest.c >&5 -configure:15253: $? = 0 -configure:15253: result: yes -configure:15259: checking for wctype -configure:15259: gcc -o conftest -g -O2 conftest.c >&5 -configure:15259: $? = 0 -configure:15259: result: yes -configure:15266: checking for wcswidth -configure:15266: gcc -o conftest -g -O2 conftest.c >&5 -configure:15266: $? = 0 -configure:15266: result: yes -configure:15282: checking whether mbrtowc and mbstate_t are properly declared -configure:15310: result: yes -configure:15326: checking for iswlower -configure:15326: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:356:6: warning: conflicting types for built-in function 'iswlower'; expected 'int(unsigned int)' [-Wbuiltin-declaration-mismatch] - 356 | char iswlower (); - | ^~~~~~~~ -conftest.c:344:1: note: 'iswlower' is declared in header '' - 343 | # include - 344 | #else -configure:15326: $? = 0 -configure:15326: result: yes -configure:15326: checking for iswupper -configure:15326: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:357:6: warning: conflicting types for built-in function 'iswupper'; expected 'int(unsigned int)' [-Wbuiltin-declaration-mismatch] - 357 | char iswupper (); - | ^~~~~~~~ -conftest.c:345:1: note: 'iswupper' is declared in header '' - 344 | # include - 345 | #else -configure:15326: $? = 0 -configure:15326: result: yes -configure:15326: checking for towlower -configure:15326: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:358:6: warning: conflicting types for built-in function 'towlower'; expected 'unsigned int(unsigned int)' [-Wbuiltin-declaration-mismatch] - 358 | char towlower (); - | ^~~~~~~~ -conftest.c:346:1: note: 'towlower' is declared in header '' - 345 | # include - 346 | #else -configure:15326: $? = 0 -configure:15326: result: yes -configure:15326: checking for towupper -configure:15326: gcc -o conftest -g -O2 conftest.c >&5 -conftest.c:359:6: warning: conflicting types for built-in function 'towupper'; expected 'unsigned int(unsigned int)' [-Wbuiltin-declaration-mismatch] - 359 | char towupper (); - | ^~~~~~~~ -conftest.c:347:1: note: 'towupper' is declared in header '' - 346 | # include - 347 | #else -configure:15326: $? = 0 -configure:15326: result: yes -configure:15326: checking for iswctype -configure:15326: gcc -o conftest -g -O2 conftest.c >&5 -configure:15326: $? = 0 -configure:15326: result: yes -configure:15336: checking for nl_langinfo and CODESET -configure:15352: gcc -o conftest -g -O2 conftest.c >&5 -configure:15352: $? = 0 -configure:15360: result: yes -configure:15367: checking for wchar_t in wchar.h -configure:15387: gcc -c -g -O2 conftest.c >&5 -configure:15387: $? = 0 -configure:15394: result: yes -configure:15402: checking for wctype_t in wctype.h -configure:15421: gcc -c -g -O2 conftest.c >&5 -configure:15421: $? = 0 -configure:15428: result: yes -configure:15436: checking for wint_t in wctype.h -configure:15455: gcc -c -g -O2 conftest.c >&5 -configure:15455: $? = 0 -configure:15462: result: yes -configure:15470: checking for wcwidth broken with unicode combining characters -configure:15501: gcc -o conftest -g -O2 conftest.c >&5 -configure:15501: $? = 0 -configure:15501: ./conftest -configure:15501: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| /* end confdefs.h. */ -| -| #include -| #include -| #include -| -| #include -| #include -| -| int -| main(c, v) -| int c; -| char **v; -| { -| int w; -| -| setlocale(LC_ALL, "en_US.UTF-8"); -| w = wcwidth (0x0301); -| exit (w == 0); /* exit 0 if wcwidth broken */ -| } -| -configure:15511: result: no -configure:15524: checking for locale_charset -configure:15524: gcc -o conftest -g -O2 conftest.c >&5 -/usr/bin/ld: /tmp/ccTqxsYX.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:376: undefined reference to `locale_charset' -collect2: error: ld returned 1 exit status -configure:15524: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| /* end confdefs.h. */ -| /* Define locale_charset to an innocuous variant, in case declares locale_charset. -| For example, HP-UX 11i declares gettimeofday. */ -| #define locale_charset innocuous_locale_charset -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char locale_charset (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef locale_charset -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char locale_charset (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_locale_charset || defined __stub___locale_charset -| choke me -| #endif -| -| int -| main () -| { -| return locale_charset (); -| ; -| return 0; -| } -configure:15524: result: no -configure:15540: checking size of wchar_t -configure:15545: gcc -o conftest -g -O2 conftest.c >&5 -configure:15545: $? = 0 -configure:15545: ./conftest -configure:15545: $? = 0 -configure:15559: result: 4 -configure:15573: checking for dlopen in -ldl -configure:15598: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:15598: $? = 0 -configure:15607: result: yes -configure:15621: checking for dlopen -configure:15621: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:15621: $? = 0 -configure:15621: result: yes -configure:15621: checking for dlclose -configure:15621: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:15621: $? = 0 -configure:15621: result: yes -configure:15621: checking for dlsym -configure:15621: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:15621: $? = 0 -configure:15621: result: yes -configure:15632: checking whether sys_siglist is declared -configure:15632: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:361:10: error: 'sys_siglist' undeclared (first use in this function) - 361 | (void) sys_siglist; - | ^~~~~~~~~~~ -conftest.c:361:10: note: each undeclared identifier is reported only once for each function it appears in -configure:15632: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| /* end confdefs.h. */ -| #include -| /* NetBSD declares sys_siglist in unistd.h. */ -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| -| -| int -| main () -| { -| #ifndef sys_siglist -| #ifdef __cplusplus -| (void) sys_siglist; -| #else -| (void) sys_siglist; -| #endif -| #endif -| -| ; -| return 0; -| } -configure:15632: result: no -configure:15926: checking type of array argument to getgroups -configure:15960: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:15960: $? = 0 -configure:15960: ./conftest -configure:15960: $? = 0 -configure:15985: result: gid_t -configure:15993: checking for off_t -configure:15993: gcc -c -g -O2 conftest.c >&5 -configure:15993: $? = 0 -configure:15993: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:385:20: error: expected expression before ')' token - 385 | if (sizeof ((off_t))) - | ^ -configure:15993: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((off_t))) -| return 0; -| ; -| return 0; -| } -configure:15993: result: yes -configure:16004: checking for mode_t -configure:16004: gcc -c -g -O2 conftest.c >&5 -configure:16004: $? = 0 -configure:16004: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:385:21: error: expected expression before ')' token - 385 | if (sizeof ((mode_t))) - | ^ -configure:16004: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((mode_t))) -| return 0; -| ; -| return 0; -| } -configure:16004: result: yes -configure:16015: checking for uid_t in sys/types.h -configure:16034: result: yes -configure:16045: checking for pid_t -configure:16045: gcc -c -g -O2 conftest.c >&5 -configure:16045: $? = 0 -configure:16045: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:385:20: error: expected expression before ')' token - 385 | if (sizeof ((pid_t))) - | ^ -configure:16045: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((pid_t))) -| return 0; -| ; -| return 0; -| } -configure:16045: result: yes -configure:16056: checking for size_t -configure:16056: result: yes -configure:16068: checking for uintptr_t -configure:16068: gcc -c -g -O2 conftest.c >&5 -configure:16068: $? = 0 -configure:16068: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:385:24: error: expected expression before ')' token - 385 | if (sizeof ((uintptr_t))) - | ^ -configure:16068: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((uintptr_t))) -| return 0; -| ; -| return 0; -| } -configure:16068: result: yes -configure:16105: checking for ssize_t -configure:16105: gcc -c -g -O2 conftest.c >&5 -configure:16105: $? = 0 -configure:16105: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:386:22: error: expected expression before ')' token - 386 | if (sizeof ((ssize_t))) - | ^ -configure:16105: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((ssize_t))) -| return 0; -| ; -| return 0; -| } -configure:16105: result: yes -configure:16116: checking for time_t -configure:16116: gcc -c -g -O2 conftest.c >&5 -configure:16116: $? = 0 -configure:16116: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:386:21: error: expected expression before ')' token - 386 | if (sizeof ((time_t))) - | ^ -configure:16116: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((time_t))) -| return 0; -| ; -| return 0; -| } -configure:16116: result: yes -configure:16129: checking for long long -configure:16149: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16149: $? = 0 -configure:16157: result: long long -configure:16165: checking for unsigned long long -configure:16185: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16185: $? = 0 -configure:16193: result: unsigned long long -configure:16201: checking return type of signal handlers -configure:16226: result: void -configure:16234: checking for sig_atomic_t in signal.h -configure:16252: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16252: $? = 0 -configure:16260: result: yes -configure:16282: checking size of char -configure:16287: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16287: $? = 0 -configure:16287: ./conftest -configure:16287: $? = 0 -configure:16301: result: 1 -configure:16315: checking size of short -configure:16320: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16320: $? = 0 -configure:16320: ./conftest -configure:16320: $? = 0 -configure:16334: result: 2 -configure:16348: checking size of int -configure:16353: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16353: $? = 0 -configure:16353: ./conftest -configure:16353: $? = 0 -configure:16367: result: 4 -configure:16381: checking size of long -configure:16386: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16386: $? = 0 -configure:16386: ./conftest -configure:16386: $? = 0 -configure:16400: result: 8 -configure:16414: checking size of char * -configure:16419: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16419: $? = 0 -configure:16419: ./conftest -configure:16419: $? = 0 -configure:16433: result: 8 -configure:16447: checking size of double -configure:16452: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16452: $? = 0 -configure:16452: ./conftest -configure:16452: $? = 0 -configure:16466: result: 8 -configure:16480: checking size of long long -configure:16485: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16485: $? = 0 -configure:16485: ./conftest -configure:16485: $? = 0 -configure:16499: result: 8 -configure:16510: checking for u_int -configure:16510: gcc -c -g -O2 conftest.c >&5 -configure:16510: $? = 0 -configure:16510: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:396:20: error: expected expression before ')' token - 396 | if (sizeof ((u_int))) - | ^ -configure:16510: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((u_int))) -| return 0; -| ; -| return 0; -| } -configure:16510: result: yes -configure:16521: checking for u_long -configure:16521: gcc -c -g -O2 conftest.c >&5 -configure:16521: $? = 0 -configure:16521: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:396:21: error: expected expression before ')' token - 396 | if (sizeof ((u_long))) - | ^ -configure:16521: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof ((u_long))) -| return 0; -| ; -| return 0; -| } -configure:16521: result: yes -configure:16535: checking for bits16_t -configure:16535: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:396:13: error: 'bits16_t' undeclared (first use in this function) - 396 | if (sizeof (bits16_t)) - | ^~~~~~~~ -conftest.c:396:13: note: each undeclared identifier is reported only once for each function it appears in -configure:16535: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof (bits16_t)) -| return 0; -| ; -| return 0; -| } -configure:16535: result: no -configure:16574: checking for u_bits16_t -configure:16574: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:397:13: error: 'u_bits16_t' undeclared (first use in this function); did you mean 'bits16_t'? - 397 | if (sizeof (u_bits16_t)) - | ^~~~~~~~~~ - | bits16_t -conftest.c:397:13: note: each undeclared identifier is reported only once for each function it appears in -configure:16574: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof (u_bits16_t)) -| return 0; -| ; -| return 0; -| } -configure:16574: result: no -configure:16613: checking for bits32_t -configure:16613: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:398:13: error: 'bits32_t' undeclared (first use in this function); did you mean 'bits16_t'? - 398 | if (sizeof (bits32_t)) - | ^~~~~~~~ - | bits16_t -conftest.c:398:13: note: each undeclared identifier is reported only once for each function it appears in -configure:16613: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof (bits32_t)) -| return 0; -| ; -| return 0; -| } -configure:16613: result: no -configure:16652: checking for u_bits32_t -configure:16652: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:399:13: error: 'u_bits32_t' undeclared (first use in this function); did you mean 'bits32_t'? - 399 | if (sizeof (u_bits32_t)) - | ^~~~~~~~~~ - | bits32_t -conftest.c:399:13: note: each undeclared identifier is reported only once for each function it appears in -configure:16652: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof (u_bits32_t)) -| return 0; -| ; -| return 0; -| } -configure:16652: result: no -configure:16691: checking for bits64_t -configure:16691: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:400:13: error: 'bits64_t' undeclared (first use in this function); did you mean 'bits32_t'? - 400 | if (sizeof (bits64_t)) - | ^~~~~~~~ - | bits32_t -conftest.c:400:13: note: each undeclared identifier is reported only once for each function it appears in -configure:16691: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| /* end confdefs.h. */ -| #include -| #ifdef HAVE_SYS_TYPES_H -| # include -| #endif -| #ifdef HAVE_SYS_STAT_H -| # include -| #endif -| #ifdef STDC_HEADERS -| # include -| # include -| #else -| # ifdef HAVE_STDLIB_H -| # include -| # endif -| #endif -| #ifdef HAVE_STRING_H -| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H -| # include -| # endif -| # include -| #endif -| #ifdef HAVE_STRINGS_H -| # include -| #endif -| #ifdef HAVE_INTTYPES_H -| # include -| #endif -| #ifdef HAVE_STDINT_H -| # include -| #endif -| #ifdef HAVE_UNISTD_H -| # include -| #endif -| int -| main () -| { -| if (sizeof (bits64_t)) -| return 0; -| ; -| return 0; -| } -configure:16691: result: no -configure:16767: checking for ptrdiff_t -configure:16767: result: yes -configure:16805: checking whether stat file-mode macros are broken -configure:16832: gcc -c -g -O2 conftest.c >&5 -configure:16832: $? = 0 -configure:16839: result: no -configure:16848: checking whether #! works in shell scripts -configure:16865: result: yes -configure:16912: checking whether the ctype macros accept non-ascii characters -configure:16959: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:16959: $? = 0 -configure:16959: ./conftest -configure:16959: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| /* end confdefs.h. */ -| -| #ifdef HAVE_LOCALE_H -| #include -| #endif -| #include -| #include -| #include -| -| int -| main(c, v) -| int c; -| char *v[]; -| { -| char *deflocale; -| unsigned char x; -| int r1, r2; -| -| #ifdef HAVE_SETLOCALE -| /* We take a shot here. If that locale is not known, try the -| system default. We try this one because '\342' (226) is -| known to be a printable character in that locale. */ -| deflocale = setlocale(LC_ALL, "en_US.ISO8859-1"); -| if (deflocale == 0) -| deflocale = setlocale(LC_ALL, ""); -| #endif -| -| x = '\342'; -| r1 = isprint(x); -| x -= 128; -| r2 = isprint(x); -| exit (r1 == 0 || r2 == 0); -| } -| -configure:16970: result: no -configure:16977: checking if dup2 fails to clear the close-on-exec flag -configure:17009: gcc -o conftest -g -O2 conftest.c -ldl >&5 -conftest.c: In function 'main': -conftest.c:377:9: warning: implicit declaration of function 'dup2' [-Wimplicit-function-declaration] - 377 | fd2 = dup2(fd1, 1); - | ^~~~ -configure:17009: $? = 0 -configure:17009: ./conftest -configure:17009: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| /* end confdefs.h. */ -| -| #include -| #include -| #include -| int -| main() -| { -| int fd1, fd2, fl; -| fd1 = open("/dev/null", 2); -| if (fcntl(fd1, 2, 1) < 0) -| exit(1); -| fd2 = dup2(fd1, 1); -| if (fd2 < 0) -| exit(2); -| fl = fcntl(fd2, 1, 0); -| /* fl will be 1 if dup2 did not reset the close-on-exec flag. */ -| exit(fl != 1); -| } -| -configure:17021: result: no -configure:17029: checking whether pgrps need synchronization -configure:17096: gcc -o conftest -g -O2 conftest.c -ldl >&5 -conftest.c: In function 'main': -conftest.c:407:13: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result] - 407 | write(fds[1], &ok, 1); - | ^~~~~~~~~~~~~~~~~~~~~ -configure:17096: $? = 0 -configure:17096: ./conftest -configure:17096: $? = 0 -configure:17108: result: yes -configure:17116: checking for type of signal functions -configure:17139: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:17139: $? = 0 -configure:17197: result: posix -configure:17211: checking whether AUDIT_USER_TTY is declared -configure:17211: result: yes -configure:17224: checking for sys_errlist and sys_nerr -configure:17242: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:17242: $? = 0 -configure:17250: result: yes -configure:17258: checking for sys_siglist in system C library -configure:17287: gcc -o conftest -g -O2 conftest.c -ldl >&5 -/usr/bin/ld: /tmp/ccX0Qqzt.o: warning: relocation against `sys_siglist' in read-only section `.text.startup' -/usr/bin/ld: /tmp/ccX0Qqzt.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:384: undefined reference to `sys_siglist' -/usr/bin/ld: warning: creating DT_TEXTREL in a PIE -collect2: error: ld returned 1 exit status -configure:17287: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| /* end confdefs.h. */ -| -| #include -| #include -| #ifdef HAVE_UNISTD_H -| #include -| #endif -| #include -| #if !HAVE_DECL_SYS_SIGLIST -| extern char *sys_siglist[]; -| #endif -| int -| main() -| { -| char *msg = sys_siglist[2]; -| exit(msg == 0); -| } -configure:17298: result: no -configure:17305: checking for _sys_siglist in signal.h or unistd.h -configure:17326: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:379:14: error: '_sys_siglist' undeclared (first use in this function) - 379 | char *msg = _sys_siglist[2]; - | ^~~~~~~~~~~~ -conftest.c:379:14: note: each undeclared identifier is reported only once for each function it appears in -configure:17326: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| /* end confdefs.h. */ -| -| #include -| #include -| #ifdef HAVE_UNISTD_H -| #include -| #endif -| int -| main () -| { -| char *msg = _sys_siglist[2]; -| ; -| return 0; -| } -configure:17333: result: no -configure:17341: checking for _sys_siglist in system C library -configure:17370: gcc -o conftest -g -O2 conftest.c -ldl >&5 -/usr/bin/ld: /tmp/ccgbsdWA.o: warning: relocation against `_sys_siglist' in read-only section `.text.startup' -/usr/bin/ld: /tmp/ccgbsdWA.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:384: undefined reference to `_sys_siglist' -/usr/bin/ld: warning: creating DT_TEXTREL in a PIE -collect2: error: ld returned 1 exit status -configure:17370: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| /* end confdefs.h. */ -| -| #include -| #include -| #ifdef HAVE_UNISTD_H -| #include -| #endif -| #include -| #ifndef UNDER_SYS_SIGLIST_DECLARED -| extern char *_sys_siglist[]; -| #endif -| int -| main() -| { -| char *msg = (char *)_sys_siglist[2]; -| exit(msg == 0); -| } -configure:17381: result: no -configure:17389: checking whether signal handlers are of type void -configure:17413: gcc -c -g -O2 conftest.c >&5 -configure:17413: $? = 0 -configure:17420: result: yes -configure:17429: checking for clock_t -configure:17460: result: yes -configure:17472: checking for sigset_t -configure:17503: result: yes -configure:17515: checking for sig_atomic_t -configure:17546: result: yes -configure:17558: checking for quad_t -configure:17589: result: yes -configure:17604: checking for intmax_t -configure:17635: result: yes -configure:17647: checking for uintmax_t -configure:17678: result: yes -configure:17691: checking for socklen_t -configure:17722: result: yes -configure:17736: checking for size and type of struct rlimit fields -configure:17753: gcc -c -g -O2 conftest.c >&5 -configure:17753: $? = 0 -configure:17794: result: rlim_t -configure:17809: checking size of intmax_t -configure:17814: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:17814: $? = 0 -configure:17814: ./conftest -configure:17814: $? = 0 -configure:17828: result: 8 -configure:17840: checking for struct termios.c_line -configure:17840: gcc -c -g -O2 conftest.c >&5 -configure:17840: $? = 0 -configure:17840: result: yes -configure:17852: checking for struct termio.c_line -configure:17852: gcc -c -g -O2 conftest.c >&5 -configure:17852: $? = 0 -configure:17852: result: yes -configure:17864: checking for struct dirent.d_ino -configure:17902: gcc -c -g -O2 conftest.c >&5 -configure:17902: $? = 0 -configure:17910: result: yes -configure:17918: checking for struct dirent.d_fileno -configure:17956: gcc -c -g -O2 conftest.c >&5 -configure:17956: $? = 0 -configure:17964: result: yes -configure:17972: checking for struct dirent.d_namlen -configure:18010: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:404:31: error: 'struct dirent' has no member named 'd_namlen'; did you mean 'd_name'? - 404 | struct dirent d; int z; z = d.d_namlen; - | ^~~~~~~~ - | d_name -configure:18010: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| #define VOID_SIGHANDLER 1 -| #define HAVE_QUAD_T 1 -| #define HAVE_SOCKLEN_T 1 -| #define RLIMTYPE rlim_t -| #define SIZEOF_INTMAX_T 8 -| #define TERMIOS_LDISC 1 -| #define TERMIO_LDISC 1 -| #define HAVE_STRUCT_DIRENT_D_INO 1 -| #define HAVE_STRUCT_DIRENT_D_FILENO 1 -| /* end confdefs.h. */ -| -| #include -| #include -| #ifdef HAVE_UNISTD_H -| # include -| #endif /* HAVE_UNISTD_H */ -| #if defined(HAVE_DIRENT_H) -| # include -| #else -| # define dirent direct -| # ifdef HAVE_SYS_NDIR_H -| # include -| # endif /* SYSNDIR */ -| # ifdef HAVE_SYS_DIR_H -| # include -| # endif /* SYSDIR */ -| # ifdef HAVE_NDIR_H -| # include -| # endif -| #endif /* HAVE_DIRENT_H */ -| -| int -| main () -| { -| -| struct dirent d; int z; z = d.d_namlen; -| -| ; -| return 0; -| } -configure:18018: result: no -configure:18025: checking for struct winsize in sys/ioctl.h and termios.h -configure:18042: gcc -c -g -O2 conftest.c >&5 -configure:18042: $? = 0 -configure:18069: result: sys/ioctl.h -configure:18083: checking for struct timeval in sys/time.h and time.h -configure:18104: gcc -c -g -O2 conftest.c >&5 -configure:18104: $? = 0 -configure:18113: result: yes -configure:18120: checking for struct stat.st_blocks -configure:18120: gcc -c -g -O2 conftest.c >&5 -configure:18120: $? = 0 -configure:18120: result: yes -configure:18130: checking whether struct tm is in sys/time.h or time.h -configure:18150: gcc -c -g -O2 conftest.c >&5 -configure:18150: $? = 0 -configure:18157: result: time.h -configure:18165: checking for struct tm.tm_zone -configure:18165: gcc -c -g -O2 conftest.c >&5 -configure:18165: $? = 0 -configure:18165: result: yes -configure:18232: checking for struct timezone in sys/time.h and time.h -configure:18266: result: yes -configure:18274: checking for offset of exit status in return status from wait -configure:18323: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:18323: $? = 0 -configure:18323: ./conftest -configure:18323: $? = 8 -configure: program exited with status 8 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| #define VOID_SIGHANDLER 1 -| #define HAVE_QUAD_T 1 -| #define HAVE_SOCKLEN_T 1 -| #define RLIMTYPE rlim_t -| #define SIZEOF_INTMAX_T 8 -| #define TERMIOS_LDISC 1 -| #define TERMIO_LDISC 1 -| #define HAVE_STRUCT_DIRENT_D_INO 1 -| #define HAVE_STRUCT_DIRENT_D_FILENO 1 -| #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 -| #define HAVE_TIMEVAL 1 -| #define HAVE_STRUCT_STAT_ST_BLOCKS 1 -| #define HAVE_STRUCT_TM_TM_ZONE 1 -| #define HAVE_TM_ZONE 1 -| #define HAVE_STRUCT_TIMEZONE 1 -| /* end confdefs.h. */ -| -| #include -| #include -| -| #include -| -| int -| main(c, v) -| int c; -| char **v; -| { -| pid_t pid, p; -| int s, i, n; -| -| s = 0; -| pid = fork(); -| if (pid == 0) -| exit (42); -| -| /* wait for the process */ -| p = wait(&s); -| if (p != pid) -| exit (255); -| -| /* crack s */ -| for (i = 0; i < (sizeof(s) * 8); i++) -| { -| n = (s >> i) & 0xff; -| if (n == 42) -| exit (i); -| } -| -| exit (254); -| } -| -configure:18339: result: 8 -configure:18350: checking for struct timespec in -configure:18367: gcc -c -g -O2 conftest.c >&5 -configure:18367: $? = 0 -configure:18374: result: yes -configure:18465: checking for struct stat.st_atim.tv_nsec -configure:18465: gcc -c -g -O2 conftest.c >&5 -configure:18465: $? = 0 -configure:18465: result: yes -configure:18474: checking whether struct stat.st_atim is of type struct timespec -configure:18501: gcc -c -g -O2 conftest.c >&5 -configure:18501: $? = 0 -configure:18508: result: yes -configure:18559: checking for sbrk -configure:18575: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:18575: $? = 0 -configure:18584: result: yes -configure:18587: checking for working sbrk -configure:18614: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:18614: $? = 0 -configure:18614: ./conftest -configure:18614: $? = 0 -configure:18624: result: yes -configure:18637: checking for the existence of strsignal -configure:18655: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:18655: $? = 0 -configure:18664: result: yes -configure:18671: checking if opendir() opens non-directories -configure:18729: gcc -o conftest -g -O2 conftest.c -ldl >&5 -conftest.c: In function 'main': -conftest.c:429:1: warning: ignoring return value of 'write' declared with attribute 'warn_unused_result' [-Wunused-result] - 429 | write(fd, "\n", 1); - | ^~~~~~~~~~~~~~~~~~ -configure:18729: $? = 0 -configure:18729: ./conftest -configure:18729: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| #define VOID_SIGHANDLER 1 -| #define HAVE_QUAD_T 1 -| #define HAVE_SOCKLEN_T 1 -| #define RLIMTYPE rlim_t -| #define SIZEOF_INTMAX_T 8 -| #define TERMIOS_LDISC 1 -| #define TERMIO_LDISC 1 -| #define HAVE_STRUCT_DIRENT_D_INO 1 -| #define HAVE_STRUCT_DIRENT_D_FILENO 1 -| #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 -| #define HAVE_TIMEVAL 1 -| #define HAVE_STRUCT_STAT_ST_BLOCKS 1 -| #define HAVE_STRUCT_TM_TM_ZONE 1 -| #define HAVE_TM_ZONE 1 -| #define HAVE_STRUCT_TIMEZONE 1 -| #define WEXITSTATUS_OFFSET 8 -| #define HAVE_STRUCT_TIMESPEC 1 -| #define TIME_H_DEFINES_STRUCT_TIMESPEC 1 -| #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -| #define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 -| #define HAVE_SBRK 1 -| #define HAVE_STRSIGNAL 1 -| /* end confdefs.h. */ -| -| #include -| #include -| #include -| #ifdef HAVE_UNISTD_H -| # include -| #endif /* HAVE_UNISTD_H */ -| #ifdef HAVE_SYS_STAT_H -| #include -| #endif -| #if defined(HAVE_DIRENT_H) -| # include -| #else -| # define dirent direct -| # ifdef HAVE_SYS_NDIR_H -| # include -| # endif /* SYSNDIR */ -| # ifdef HAVE_SYS_DIR_H -| # include -| # endif /* SYSDIR */ -| # ifdef HAVE_NDIR_H -| # include -| # endif -| #endif /* HAVE_DIRENT_H */ -| #include -| int -| main() -| { -| DIR *dir; -| int fd, err; -| err = mkdir("bash-aclocal", 0700); -| if (err < 0) { -| perror("mkdir"); -| exit(1); -| } -| unlink("bash-aclocal/not_a_directory"); -| fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666); -| write(fd, "\n", 1); -| close(fd); -| dir = opendir("bash-aclocal/not_a_directory"); -| unlink("bash-aclocal/not_a_directory"); -| rmdir("bash-aclocal"); -| exit (dir == 0); -| } -configure:18740: result: no -configure:18747: checking whether ulimit can substitute for getdtablesize -configure:18773: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:18773: $? = 0 -configure:18773: ./conftest -configure:18773: $? = 0 -configure:18784: result: yes -configure:18798: checking whether fpurge is declared -configure:18798: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:402:10: error: 'fpurge' undeclared (first use in this function) - 402 | (void) fpurge; - | ^~~~~~ -conftest.c:402:10: note: each undeclared identifier is reported only once for each function it appears in -configure:18798: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| #define VOID_SIGHANDLER 1 -| #define HAVE_QUAD_T 1 -| #define HAVE_SOCKLEN_T 1 -| #define RLIMTYPE rlim_t -| #define SIZEOF_INTMAX_T 8 -| #define TERMIOS_LDISC 1 -| #define TERMIO_LDISC 1 -| #define HAVE_STRUCT_DIRENT_D_INO 1 -| #define HAVE_STRUCT_DIRENT_D_FILENO 1 -| #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 -| #define HAVE_TIMEVAL 1 -| #define HAVE_STRUCT_STAT_ST_BLOCKS 1 -| #define HAVE_STRUCT_TM_TM_ZONE 1 -| #define HAVE_TM_ZONE 1 -| #define HAVE_STRUCT_TIMEZONE 1 -| #define WEXITSTATUS_OFFSET 8 -| #define HAVE_STRUCT_TIMESPEC 1 -| #define TIME_H_DEFINES_STRUCT_TIMESPEC 1 -| #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -| #define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 -| #define HAVE_SBRK 1 -| #define HAVE_STRSIGNAL 1 -| #define ULIMIT_MAXFDS 1 -| /* end confdefs.h. */ -| #include -| -| int -| main () -| { -| #ifndef fpurge -| #ifdef __cplusplus -| (void) fpurge; -| #else -| (void) fpurge; -| #endif -| #endif -| -| ; -| return 0; -| } -configure:18798: result: no -configure:18811: checking to see if getenv can be redefined -configure:18859: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:18859: $? = 0 -configure:18859: ./conftest -configure:18859: $? = 0 -configure:18870: result: yes -configure:18878: checking if getcwd() will dynamically allocate memory with 0 size -configure:18907: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:18907: $? = 0 -configure:18907: ./conftest -configure:18907: $? = 0 -configure:18918: result: yes -configure:18933: checking for presence of POSIX-style sigsetjmp/siglongjmp -configure:18987: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:18987: $? = 0 -configure:18987: ./conftest -configure:18987: $? = 0 -configure:18998: result: present -configure:19006: checking whether or not strcoll and strcmp differ -configure:19059: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19059: $? = 0 -configure:19059: ./conftest -configure:19059: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| #define VOID_SIGHANDLER 1 -| #define HAVE_QUAD_T 1 -| #define HAVE_SOCKLEN_T 1 -| #define RLIMTYPE rlim_t -| #define SIZEOF_INTMAX_T 8 -| #define TERMIOS_LDISC 1 -| #define TERMIO_LDISC 1 -| #define HAVE_STRUCT_DIRENT_D_INO 1 -| #define HAVE_STRUCT_DIRENT_D_FILENO 1 -| #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 -| #define HAVE_TIMEVAL 1 -| #define HAVE_STRUCT_STAT_ST_BLOCKS 1 -| #define HAVE_STRUCT_TM_TM_ZONE 1 -| #define HAVE_TM_ZONE 1 -| #define HAVE_STRUCT_TIMEZONE 1 -| #define WEXITSTATUS_OFFSET 8 -| #define HAVE_STRUCT_TIMESPEC 1 -| #define TIME_H_DEFINES_STRUCT_TIMESPEC 1 -| #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -| #define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 -| #define HAVE_SBRK 1 -| #define HAVE_STRSIGNAL 1 -| #define ULIMIT_MAXFDS 1 -| #define HAVE_DECL_FPURGE 0 -| #define CAN_REDEFINE_GETENV 1 -| #define HAVE_POSIX_SIGSETJMP 1 -| /* end confdefs.h. */ -| -| #include -| #if defined (HAVE_LOCALE_H) -| #include -| #endif -| #include -| #include -| -| int -| main(c, v) -| int c; -| char *v[]; -| { -| int r1, r2; -| char *deflocale, *defcoll; -| -| #ifdef HAVE_SETLOCALE -| deflocale = setlocale(LC_ALL, ""); -| defcoll = setlocale(LC_COLLATE, ""); -| #endif -| -| #ifdef HAVE_STRCOLL -| /* These two values are taken from tests/glob-test. */ -| r1 = strcoll("abd", "aXd"); -| #else -| r1 = 0; -| #endif -| r2 = strcmp("abd", "aXd"); -| -| /* These two should both be greater than 0. It is permissible for -| a system to return different values, as long as the sign is the -| same. */ -| -| /* Exit with 1 (failure) if these two values are both > 0, since -| this tests whether strcoll(3) is broken with respect to strcmp(3) -| in the default locale. */ -| exit (r1 > 0 && r2 > 0); -| } -| -configure:19070: result: no -configure:19082: checking for standard-conformant snprintf -configure:19108: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19108: $? = 0 -configure:19108: ./conftest -configure:19108: $? = 0 -configure:19118: result: yes -configure:19135: checking for standard-conformant vsnprintf -configure:19188: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19188: $? = 0 -configure:19188: ./conftest -configure:19188: $? = 0 -configure:19198: result: yes -configure:19216: checking for standard-conformant putenv declaration -configure:19247: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19247: $? = 0 -configure:19256: result: yes -configure:19271: checking for standard-conformant unsetenv declaration -configure:19302: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19302: $? = 0 -configure:19311: result: yes -configure:19323: checking for printf floating point output in hex notation -configure:19352: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19352: $? = 0 -configure:19352: ./conftest -configure:19352: $? = 0 -configure:19363: result: yes -configure:19371: checking whether fnmatch can be used to check bracket equivalence classes -configure:19407: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19407: $? = 0 -configure:19407: ./conftest -configure:19407: $? = 0 -configure:19418: result: yes -configure:19434: checking if signal handlers must be reinstalled when invoked -configure:19494: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19494: $? = 0 -configure:19494: ./conftest -configure:19494: $? = 0 -configure:19505: result: no -configure:19513: checking for presence of necessary job control definitions -configure:19570: gcc -c -g -O2 conftest.c >&5 -configure:19570: $? = 0 -configure:19579: result: present -configure:19586: checking for presence of named pipes -configure:19641: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19641: $? = 0 -configure:19641: ./conftest -configure:19641: $? = 0 -configure:19652: result: present -configure:19660: checking whether termios.h defines TIOCGWINSZ -configure:19683: result: no -configure:19687: checking whether sys/ioctl.h defines TIOCGWINSZ -configure:19710: result: yes -configure:19720: checking for TIOCSTAT in sys/ioctl.h -configure:19737: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:406:9: error: 'TIOCSTAT' undeclared (first use in this function); did you mean 'TIOCSTI'? - 406 | int x = TIOCSTAT; - | ^~~~~~~~ - | TIOCSTI -conftest.c:406:9: note: each undeclared identifier is reported only once for each function it appears in -configure:19737: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| #define VOID_SIGHANDLER 1 -| #define HAVE_QUAD_T 1 -| #define HAVE_SOCKLEN_T 1 -| #define RLIMTYPE rlim_t -| #define SIZEOF_INTMAX_T 8 -| #define TERMIOS_LDISC 1 -| #define TERMIO_LDISC 1 -| #define HAVE_STRUCT_DIRENT_D_INO 1 -| #define HAVE_STRUCT_DIRENT_D_FILENO 1 -| #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 -| #define HAVE_TIMEVAL 1 -| #define HAVE_STRUCT_STAT_ST_BLOCKS 1 -| #define HAVE_STRUCT_TM_TM_ZONE 1 -| #define HAVE_TM_ZONE 1 -| #define HAVE_STRUCT_TIMEZONE 1 -| #define WEXITSTATUS_OFFSET 8 -| #define HAVE_STRUCT_TIMESPEC 1 -| #define TIME_H_DEFINES_STRUCT_TIMESPEC 1 -| #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -| #define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 -| #define HAVE_SBRK 1 -| #define HAVE_STRSIGNAL 1 -| #define ULIMIT_MAXFDS 1 -| #define HAVE_DECL_FPURGE 0 -| #define CAN_REDEFINE_GETENV 1 -| #define HAVE_POSIX_SIGSETJMP 1 -| #define HAVE_STD_PUTENV 1 -| #define HAVE_STD_UNSETENV 1 -| #define HAVE_PRINTF_A_FORMAT 1 -| #define FNMATCH_EQUIV_FALLBACK 1 -| #define GWINSZ_IN_SYS_IOCTL 1 -| /* end confdefs.h. */ -| #include -| #include -| int -| main () -| { -| int x = TIOCSTAT; -| ; -| return 0; -| } -configure:19745: result: no -configure:19752: checking for FIONREAD in sys/ioctl.h -configure:19769: gcc -c -g -O2 conftest.c >&5 -configure:19769: $? = 0 -configure:19777: result: yes -configure:19786: checking whether WCONTINUED flag to waitpid is unavailable or available but broken -configure:19822: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19822: $? = 0 -configure:19822: ./conftest -configure:19822: $? = 0 -configure:19833: result: no -configure:19841: checking for speed_t in sys/types.h -configure:19857: gcc -c -g -O2 conftest.c >&5 -conftest.c: In function 'main': -conftest.c:406:1: error: unknown type name 'speed_t' - 406 | speed_t x; - | ^~~~~~~ -configure:19857: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| #define VOID_SIGHANDLER 1 -| #define HAVE_QUAD_T 1 -| #define HAVE_SOCKLEN_T 1 -| #define RLIMTYPE rlim_t -| #define SIZEOF_INTMAX_T 8 -| #define TERMIOS_LDISC 1 -| #define TERMIO_LDISC 1 -| #define HAVE_STRUCT_DIRENT_D_INO 1 -| #define HAVE_STRUCT_DIRENT_D_FILENO 1 -| #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 -| #define HAVE_TIMEVAL 1 -| #define HAVE_STRUCT_STAT_ST_BLOCKS 1 -| #define HAVE_STRUCT_TM_TM_ZONE 1 -| #define HAVE_TM_ZONE 1 -| #define HAVE_STRUCT_TIMEZONE 1 -| #define WEXITSTATUS_OFFSET 8 -| #define HAVE_STRUCT_TIMESPEC 1 -| #define TIME_H_DEFINES_STRUCT_TIMESPEC 1 -| #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -| #define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 -| #define HAVE_SBRK 1 -| #define HAVE_STRSIGNAL 1 -| #define ULIMIT_MAXFDS 1 -| #define HAVE_DECL_FPURGE 0 -| #define CAN_REDEFINE_GETENV 1 -| #define HAVE_POSIX_SIGSETJMP 1 -| #define HAVE_STD_PUTENV 1 -| #define HAVE_STD_UNSETENV 1 -| #define HAVE_PRINTF_A_FORMAT 1 -| #define FNMATCH_EQUIV_FALLBACK 1 -| #define GWINSZ_IN_SYS_IOCTL 1 -| #define FIONREAD_IN_SYS_IOCTL 1 -| /* end confdefs.h. */ -| #include -| int -| main () -| { -| speed_t x; -| ; -| return 0; -| } -configure:19865: result: no -configure:19872: checking whether getpw functions are declared in pwd.h -configure:19897: result: yes -configure:19904: checking for unusable real-time signals due to large values -configure:19939: gcc -o conftest -g -O2 conftest.c -ldl >&5 -configure:19939: $? = 0 -configure:19939: ./conftest -configure:19939: $? = 1 -configure: program exited with status 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| #define VOID_SIGHANDLER 1 -| #define HAVE_QUAD_T 1 -| #define HAVE_SOCKLEN_T 1 -| #define RLIMTYPE rlim_t -| #define SIZEOF_INTMAX_T 8 -| #define TERMIOS_LDISC 1 -| #define TERMIO_LDISC 1 -| #define HAVE_STRUCT_DIRENT_D_INO 1 -| #define HAVE_STRUCT_DIRENT_D_FILENO 1 -| #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 -| #define HAVE_TIMEVAL 1 -| #define HAVE_STRUCT_STAT_ST_BLOCKS 1 -| #define HAVE_STRUCT_TM_TM_ZONE 1 -| #define HAVE_TM_ZONE 1 -| #define HAVE_STRUCT_TIMEZONE 1 -| #define WEXITSTATUS_OFFSET 8 -| #define HAVE_STRUCT_TIMESPEC 1 -| #define TIME_H_DEFINES_STRUCT_TIMESPEC 1 -| #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -| #define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 -| #define HAVE_SBRK 1 -| #define HAVE_STRSIGNAL 1 -| #define ULIMIT_MAXFDS 1 -| #define HAVE_DECL_FPURGE 0 -| #define CAN_REDEFINE_GETENV 1 -| #define HAVE_POSIX_SIGSETJMP 1 -| #define HAVE_STD_PUTENV 1 -| #define HAVE_STD_UNSETENV 1 -| #define HAVE_PRINTF_A_FORMAT 1 -| #define FNMATCH_EQUIV_FALLBACK 1 -| #define GWINSZ_IN_SYS_IOCTL 1 -| #define FIONREAD_IN_SYS_IOCTL 1 -| #define HAVE_GETPW_DECLS 1 -| /* end confdefs.h. */ -| -| #include -| #include -| #include -| -| #ifndef NSIG -| # define NSIG 64 -| #endif -| -| int -| main () -| { -| int n_sigs = 2 * NSIG; -| #ifdef SIGRTMIN -| int rtmin = SIGRTMIN; -| #else -| int rtmin = 0; -| #endif -| -| exit(rtmin < n_sigs); -| } -configure:19950: result: no -configure:20049: checking for tgetent -configure:20049: gcc -o conftest -g -O2 conftest.c -ldl >&5 -/usr/bin/ld: /tmp/ccGlkjwy.o: in function `main': -/home/tong/src/bash/bash-5.1/conftest.c:437: undefined reference to `tgetent' -collect2: error: ld returned 1 exit status -configure:20049: $? = 1 -configure: failed program was: -| /* confdefs.h */ -| #define PACKAGE_NAME "rash" -| #define PACKAGE_TARNAME "rash" -| #define PACKAGE_VERSION "0.1-release" -| #define PACKAGE_STRING "rash 0.1-release" -| #define PACKAGE_BUGREPORT "bug-rash@gnu.org" -| #define PACKAGE_URL "" -| #define USING_BASH_MALLOC 1 -| #define ALIAS 1 -| #define PUSHD_AND_POPD 1 -| #define RESTRICTED_SHELL 1 -| #define PROCESS_SUBSTITUTION 1 -| #define PROMPT_STRING_DECODE 1 -| #define SELECT_COMMAND 1 -| #define HELP_BUILTIN 1 -| #define ARRAY_VARS 1 -| #define DPAREN_ARITHMETIC 1 -| #define BRACE_EXPANSION 1 -| #define COMMAND_TIMING 1 -| #define EXTENDED_GLOB 1 -| #define EXTGLOB_DEFAULT 0 -| #define COND_COMMAND 1 -| #define COND_REGEXP 1 -| #define COPROCESS_SUPPORT 1 -| #define ARITH_FOR_COMMAND 1 -| #define NETWORK_REDIRECTIONS 1 -| #define PROGRAMMABLE_COMPLETION 1 -| #define DEBUGGER 1 -| #define CASEMOD_ATTRS 1 -| #define CASEMOD_EXPANSIONS 1 -| #define GLOBASCII_DEFAULT 1 -| #define FUNCTION_IMPORT 1 -| #define MEMSCRAMBLE 1 -| #define STDC_HEADERS 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_UNISTD_H 1 -| #define __EXTENSIONS__ 1 -| #define _ALL_SOURCE 1 -| #define _GNU_SOURCE 1 -| #define _POSIX_PTHREAD_SEMANTICS 1 -| #define _TANDEM_SOURCE 1 -| #define READLINE 1 -| #define HISTORY 1 -| #define BANG_HISTORY 1 -| #define _GNU_SOURCE 1 -| #define HAVE_STRINGIZE 1 -| #define HAVE_LONG_DOUBLE_WIDER 1 -| #define HAVE_LONG_DOUBLE 1 -| #define PROTOTYPES 1 -| #define __PROTOTYPES 1 -| #define restrict __restrict -| #define HAVE_VISIBILITY 1 -| #define HAVE_STDINT_H_WITH_UINTMAX 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define INTDIV0_RAISES_SIGFPE 1 -| #define HAVE_INTTYPES_H_WITH_UINTMAX 1 -| #define HAVE_UNSIGNED_LONG_LONG_INT 1 -| #define HAVE_UINTMAX_T 1 -| #define HAVE_INTTYPES_H 1 -| #define USE_POSIX_THREADS 1 -| #define USE_POSIX_THREADS_WEAK 1 -| #define HAVE_PTHREAD_RWLOCK 1 -| #define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -| #define HAVE_ICONV 1 -| #define ICONV_CONST -| #define HAVE_BUILTIN_EXPECT 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_GETCWD 1 -| #define HAVE_GETEGID 1 -| #define HAVE_GETEUID 1 -| #define HAVE_GETGID 1 -| #define HAVE_GETUID 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRDUP 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_TSEARCH 1 -| #define HAVE_ARGZ_COUNT 1 -| #define HAVE_ARGZ_STRINGIFY 1 -| #define HAVE_ARGZ_NEXT 1 -| #define HAVE___FSETLOCKING 1 -| #define HAVE_LOCALECONV 1 -| #define HAVE_DECL_FEOF_UNLOCKED 1 -| #define HAVE_DECL_FGETS_UNLOCKED 1 -| #define HAVE_LONG_LONG_INT 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WINT_T 1 -| #define HAVE_INTMAX_T 1 -| #define HAVE_POSIX_PRINTF 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_SYMLINK 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_ALARM 1 -| #define HAVE___FPURGE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_VSNPRINTF 1 -| #define HAVE_WORKING_O_NOATIME 1 -| #define HAVE_WORKING_O_NOFOLLOW 1 -| #define HAVE_WORKING_USELOCALE 1 -| #define FLEXIBLE_ARRAY_MEMBER /**/ -| #define HAVE_FEATURES_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_FWPRINTF 1 -| #define HAVE_NEWLOCALE 1 -| #define HAVE_PUTENV 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SNPRINTF 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_USELOCALE 1 -| #define HAVE_WCSLEN 1 -| #define HAVE_WCSNLEN 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_DECL__SNPRINTF 0 -| #define HAVE_DECL__SNWPRINTF 0 -| #define HAVE_DECL_GETC_UNLOCKED 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_LC_MESSAGES 1 -| #define ENABLE_NLS 1 -| #define HAVE_GETTEXT 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_DIRENT_H 1 -| #define TIME_WITH_SYS_TIME 1 -| #define MAJOR_IN_SYSMACROS 1 -| #define HAVE_INTTYPES_H 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_STDLIB_H 1 -| #define HAVE_STDARG_H 1 -| #define HAVE_LIMITS_H 1 -| #define HAVE_STRING_H 1 -| #define HAVE_MEMORY_H 1 -| #define HAVE_LOCALE_H 1 -| #define HAVE_TERMCAP_H 1 -| #define HAVE_TERMIO_H 1 -| #define HAVE_TERMIOS_H 1 -| #define HAVE_DLFCN_H 1 -| #define HAVE_STDBOOL_H 1 -| #define HAVE_STDDEF_H 1 -| #define HAVE_STDINT_H 1 -| #define HAVE_NETDB_H 1 -| #define HAVE_PWD_H 1 -| #define HAVE_GRP_H 1 -| #define HAVE_STRINGS_H 1 -| #define HAVE_REGEX_H 1 -| #define HAVE_SYSLOG_H 1 -| #define HAVE_ULIMIT_H 1 -| #define HAVE_SYS_SELECT_H 1 -| #define HAVE_SYS_FILE_H 1 -| #define HAVE_SYS_IOCTL_H 1 -| #define HAVE_SYS_MMAN_H 1 -| #define HAVE_SYS_PARAM_H 1 -| #define HAVE_SYS_RANDOM_H 1 -| #define HAVE_SYS_SOCKET_H 1 -| #define HAVE_SYS_STAT_H 1 -| #define HAVE_SYS_TIME_H 1 -| #define HAVE_SYS_TIMES_H 1 -| #define HAVE_SYS_TYPES_H 1 -| #define HAVE_SYS_WAIT_H 1 -| #define HAVE_NETINET_IN_H 1 -| #define HAVE_ARPA_INET_H 1 -| #define HAVE_SYS_RESOURCE_H 1 -| #define HAVE_ALLOCA_H 1 -| #define HAVE_ALLOCA 1 -| #define HAVE_UNISTD_H 1 -| #define HAVE_CHOWN 1 -| #define GETPGRP_VOID 1 -| #define HAVE_VPRINTF 1 -| #define HAVE_STRCOLL 1 -| #define RETSIGTYPE void -| #define HAVE_WAIT3 1 -| #define HAVE_MKFIFO 1 -| #define HAVE_DUP2 1 -| #define HAVE_EACCESS 1 -| #define HAVE_FCNTL 1 -| #define HAVE_GETDTABLESIZE 1 -| #define HAVE_GETENTROPY 1 -| #define HAVE_GETGROUPS 1 -| #define HAVE_GETHOSTNAME 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_GETPEERNAME 1 -| #define HAVE_GETRANDOM 1 -| #define HAVE_GETRLIMIT 1 -| #define HAVE_GETRUSAGE 1 -| #define HAVE_GETTIMEOFDAY 1 -| #define HAVE_KILL 1 -| #define HAVE_KILLPG 1 -| #define HAVE_LSTAT 1 -| #define HAVE_PSELECT 1 -| #define HAVE_READLINK 1 -| #define HAVE_SELECT 1 -| #define HAVE_SETITIMER 1 -| #define HAVE_TCGETPGRP 1 -| #define HAVE_UNAME 1 -| #define HAVE_ULIMIT 1 -| #define HAVE_WAITPID 1 -| #define HAVE_PREAD 1 -| #define HAVE_RENAME 1 -| #define HAVE_BCOPY 1 -| #define HAVE_BZERO 1 -| #define HAVE_CONFSTR 1 -| #define HAVE_FACCESSAT 1 -| #define HAVE_FNMATCH 1 -| #define HAVE_GETADDRINFO 1 -| #define HAVE_GETHOSTBYNAME 1 -| #define HAVE_GETSERVBYNAME 1 -| #define HAVE_GETSERVENT 1 -| #define HAVE_INET_ATON 1 -| #define HAVE_IMAXDIV 1 -| #define HAVE_MEMMOVE 1 -| #define HAVE_PATHCONF 1 -| #define HAVE_PUTENV 1 -| #define HAVE_RAISE 1 -| #define HAVE_RANDOM 1 -| #define HAVE_REGCOMP 1 -| #define HAVE_REGEXEC 1 -| #define HAVE_SETENV 1 -| #define HAVE_SETLINEBUF 1 -| #define HAVE_SETLOCALE 1 -| #define HAVE_SETVBUF 1 -| #define HAVE_SIGINTERRUPT 1 -| #define HAVE_STRCHR 1 -| #define HAVE_SYSCONF 1 -| #define HAVE_SYSLOG 1 -| #define HAVE_TCGETATTR 1 -| #define HAVE_TIMES 1 -| #define HAVE_TTYNAME 1 -| #define HAVE_TZSET 1 -| #define HAVE_UNSETENV 1 -| #define HAVE_VASPRINTF 1 -| #define HAVE_ASPRINTF 1 -| #define HAVE_ISASCII 1 -| #define HAVE_ISBLANK 1 -| #define HAVE_ISGRAPH 1 -| #define HAVE_ISPRINT 1 -| #define HAVE_ISSPACE 1 -| #define HAVE_ISXDIGIT 1 -| #define HAVE_GETPWENT 1 -| #define HAVE_GETPWNAM 1 -| #define HAVE_GETPWUID 1 -| #define HAVE_MKSTEMP 1 -| #define HAVE_MKDTEMP 1 -| #define HAVE_GETCWD 1 -| #define HAVE_MEMSET 1 -| #define HAVE_STRCASECMP 1 -| #define HAVE_STRCASESTR 1 -| #define HAVE_STRERROR 1 -| #define HAVE_STRFTIME 1 -| #define HAVE_STRNLEN 1 -| #define HAVE_STRPBRK 1 -| #define HAVE_STRSTR 1 -| #define HAVE_STRTOD 1 -| #define HAVE_STRTOL 1 -| #define HAVE_STRTOUL 1 -| #define HAVE_STRTOLL 1 -| #define HAVE_STRTOULL 1 -| #define HAVE_STRTOIMAX 1 -| #define HAVE_STRTOUMAX 1 -| #define HAVE_DPRINTF 1 -| #define HAVE_STRCHRNUL 1 -| #define HAVE_STRDUP 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_DECL_CONFSTR 1 -| #define HAVE_DECL_PRINTF 1 -| #define HAVE_DECL_SBRK 1 -| #define HAVE_DECL_SETREGID 1 -| #define HAVE_DECL_STRCPY 1 -| #define HAVE_DECL_STRSIGNAL 1 -| #define HAVE_SETRESUID 1 -| #define HAVE_SETRESGID 1 -| #define HAVE_DECL_STRTOLD 1 -| #define HAVE_DECL_STRTOIMAX 1 -| #define HAVE_DECL_STRTOL 1 -| #define HAVE_DECL_STRTOLL 1 -| #define HAVE_DECL_STRTOUL 1 -| #define HAVE_DECL_STRTOULL 1 -| #define HAVE_DECL_STRTOUMAX 1 -| #define HAVE_ARGZ_H 1 -| #define HAVE_ERRNO_H 1 -| #define HAVE_FCNTL_H 1 -| #define HAVE_MALLOC_H 1 -| #define HAVE_STDIO_EXT_H 1 -| #define HAVE_GETPAGESIZE 1 -| #define HAVE_MMAP 1 -| #define HAVE___ARGZ_COUNT 1 -| #define HAVE___ARGZ_NEXT 1 -| #define HAVE___ARGZ_STRINGIFY 1 -| #define HAVE_DCGETTEXT 1 -| #define HAVE_MEMPCPY 1 -| #define HAVE_MUNMAP 1 -| #define HAVE_MREMAP 1 -| #define HAVE_STPCPY 1 -| #define HAVE_STRCSPN 1 -| #define HAVE_WCTYPE_H 1 -| #define HAVE_WCHAR_H 1 -| #define HAVE_LANGINFO_H 1 -| #define HAVE_MBRLEN 1 -| #define HAVE_MBSNRTOWCS 1 -| #define HAVE_MBSRTOWCS 1 -| #define HAVE_WCRTOMB 1 -| #define HAVE_WCSCOLL 1 -| #define HAVE_WCSDUP 1 -| #define HAVE_WCWIDTH 1 -| #define HAVE_WCTYPE 1 -| #define HAVE_WCSWIDTH 1 -| #define HAVE_MBRTOWC 1 -| #define HAVE_MBSTATE_T 1 -| #define HAVE_ISWLOWER 1 -| #define HAVE_ISWUPPER 1 -| #define HAVE_TOWLOWER 1 -| #define HAVE_TOWUPPER 1 -| #define HAVE_ISWCTYPE 1 -| #define HAVE_LANGINFO_CODESET 1 -| #define HAVE_WCHAR_T 1 -| #define HAVE_WCTYPE_T 1 -| #define HAVE_WINT_T 1 -| #define SIZEOF_WCHAR_T 4 -| #define HAVE_LIBDL 1 -| #define HAVE_DLOPEN 1 -| #define HAVE_DLCLOSE 1 -| #define HAVE_DLSYM 1 -| #define HAVE_DECL_SYS_SIGLIST 0 -| #define GETGROUPS_T gid_t -| #define HAVE_UINTPTR_T 1 -| #define HAVE_LONG_LONG 1 -| #define HAVE_UNSIGNED_LONG_LONG 1 -| #define RETSIGTYPE void -| #define SIZEOF_CHAR 1 -| #define SIZEOF_SHORT 2 -| #define SIZEOF_INT 4 -| #define SIZEOF_LONG 8 -| #define SIZEOF_CHAR_P 8 -| #define SIZEOF_DOUBLE 8 -| #define SIZEOF_LONG_LONG 8 -| #define bits16_t short -| #define u_bits16_t unsigned short -| #define bits32_t int -| #define u_bits32_t unsigned int -| #define bits64_t char * -| #define HAVE_HASH_BANG_EXEC 1 -| #define PGRP_PIPE 1 -| #define HAVE_POSIX_SIGNALS 1 -| #define HAVE_DECL_AUDIT_USER_TTY 1 -| #define HAVE_SYS_ERRLIST 1 -| #define VOID_SIGHANDLER 1 -| #define HAVE_QUAD_T 1 -| #define HAVE_SOCKLEN_T 1 -| #define RLIMTYPE rlim_t -| #define SIZEOF_INTMAX_T 8 -| #define TERMIOS_LDISC 1 -| #define TERMIO_LDISC 1 -| #define HAVE_STRUCT_DIRENT_D_INO 1 -| #define HAVE_STRUCT_DIRENT_D_FILENO 1 -| #define STRUCT_WINSIZE_IN_SYS_IOCTL 1 -| #define HAVE_TIMEVAL 1 -| #define HAVE_STRUCT_STAT_ST_BLOCKS 1 -| #define HAVE_STRUCT_TM_TM_ZONE 1 -| #define HAVE_TM_ZONE 1 -| #define HAVE_STRUCT_TIMEZONE 1 -| #define WEXITSTATUS_OFFSET 8 -| #define HAVE_STRUCT_TIMESPEC 1 -| #define TIME_H_DEFINES_STRUCT_TIMESPEC 1 -| #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -| #define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 -| #define HAVE_SBRK 1 -| #define HAVE_STRSIGNAL 1 -| #define ULIMIT_MAXFDS 1 -| #define HAVE_DECL_FPURGE 0 -| #define CAN_REDEFINE_GETENV 1 -| #define HAVE_POSIX_SIGSETJMP 1 -| #define HAVE_STD_PUTENV 1 -| #define HAVE_STD_UNSETENV 1 -| #define HAVE_PRINTF_A_FORMAT 1 -| #define FNMATCH_EQUIV_FALLBACK 1 -| #define GWINSZ_IN_SYS_IOCTL 1 -| #define FIONREAD_IN_SYS_IOCTL 1 -| #define HAVE_GETPW_DECLS 1 -| /* end confdefs.h. */ -| /* Define tgetent to an innocuous variant, in case declares tgetent. -| For example, HP-UX 11i declares gettimeofday. */ -| #define tgetent innocuous_tgetent -| -| /* System header to define __stub macros and hopefully few prototypes, -| which can conflict with char tgetent (); below. -| Prefer to if __STDC__ is defined, since -| exists even on freestanding compilers. */ -| -| #ifdef __STDC__ -| # include -| #else -| # include -| #endif -| -| #undef tgetent -| -| /* Override any GCC internal prototype to avoid an error. -| Use char because int might match the return type of a GCC -| builtin and then its argument prototype would still apply. */ -| #ifdef __cplusplus -| extern "C" -| #endif -| char tgetent (); -| /* The GNU C library defines this for functions which it implements -| to always fail with ENOSYS. Some functions are actually named -| something starting with __ and the normal name is an alias. */ -| #if defined __stub_tgetent || defined __stub___tgetent -| choke me -| #endif -| -| int -| main () -| { -| return tgetent (); -| ; -| return 0; -| } -configure:20049: result: no -configure:20053: checking for tgetent in -ltermcap -configure:20078: gcc -o conftest -g -O2 conftest.c -ltermcap -ldl >&5 -configure:20078: $? = 0 -configure:20087: result: yes -configure:20264: checking which library has the termcap functions -configure:20267: result: using libtermcap -configure:20294: checking whether /dev/fd is available -configure:20318: result: standard -configure:20332: checking whether /dev/stdin stdout stderr are available -configure:20345: result: present -configure:20352: checking for default mail directory -configure:20371: result: /var/mail -configure:20477: checking shared object configuration for loadable builtins -configure:20487: result: supported -configure:20673: creating ./config.status - -## ---------------------- ## -## Running config.status. ## -## ---------------------- ## - -This file was extended by rash config.status 0.1-release, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = - CONFIG_HEADERS = - CONFIG_LINKS = - CONFIG_COMMANDS = - $ ./config.status - -on pc - -config.status:1357: creating Makefile -config.status:1357: creating builtins/Makefile -config.status:1357: creating lib/readline/Makefile -config.status:1357: creating lib/glob/Makefile -config.status:1357: creating lib/intl/Makefile -config.status:1357: creating lib/malloc/Makefile -config.status:1357: creating lib/sh/Makefile -config.status:1357: creating lib/termcap/Makefile -config.status:1357: creating lib/tilde/Makefile -config.status:1357: creating doc/Makefile -config.status:1357: creating support/Makefile -config.status:1357: creating po/Makefile.in -config.status:1357: creating examples/loadables/Makefile -config.status:1357: creating examples/loadables/Makefile.inc -config.status:1357: creating examples/loadables/perl/Makefile -config.status:1357: creating support/rash.pc -config.status:1357: creating support/rashbug.sh -config.status:1357: creating config.h -config.status:1552: executing po-directories commands -config.status:1552: executing default commands - -## ---------------- ## -## Cache variables. ## -## ---------------- ## - -ac_cv_build=x86_64-pc-linux-gnu -ac_cv_c_bigendian=no -ac_cv_c_char_unsigned=no -ac_cv_c_compiler_gnu=yes -ac_cv_c_const=yes -ac_cv_c_flexmember=yes -ac_cv_c_inline=inline -ac_cv_c_long_double=yes -ac_cv_c_restrict=__restrict -ac_cv_c_stringize=yes -ac_cv_c_volatile=yes -ac_cv_env_CC_FOR_BUILD_set= -ac_cv_env_CC_FOR_BUILD_value= -ac_cv_env_CC_set= -ac_cv_env_CC_value= -ac_cv_env_CFLAGS_FOR_BUILD_set= -ac_cv_env_CFLAGS_FOR_BUILD_value= -ac_cv_env_CFLAGS_set= -ac_cv_env_CFLAGS_value= -ac_cv_env_CPPFLAGS_FOR_BUILD_set= -ac_cv_env_CPPFLAGS_FOR_BUILD_value= -ac_cv_env_CPPFLAGS_set= -ac_cv_env_CPPFLAGS_value= -ac_cv_env_CPP_set= -ac_cv_env_CPP_value= -ac_cv_env_DEBUGGER_START_FILE_set= -ac_cv_env_DEBUGGER_START_FILE_value= -ac_cv_env_LDFLAGS_FOR_BUILD_set= -ac_cv_env_LDFLAGS_FOR_BUILD_value= -ac_cv_env_LDFLAGS_set= -ac_cv_env_LDFLAGS_value= -ac_cv_env_LIBS_set= -ac_cv_env_LIBS_value= -ac_cv_env_YACC_set= -ac_cv_env_YACC_value= -ac_cv_env_YFLAGS_set= -ac_cv_env_YFLAGS_value= -ac_cv_env_build_alias_set= -ac_cv_env_build_alias_value= -ac_cv_env_host_alias_set= -ac_cv_env_host_alias_value= -ac_cv_env_target_alias_set= -ac_cv_env_target_alias_value= -ac_cv_func___argz_count=yes -ac_cv_func___argz_next=yes -ac_cv_func___argz_stringify=yes -ac_cv_func___fpurge=yes -ac_cv_func___fsetlocking=yes -ac_cv_func___setostype=no -ac_cv_func__doprnt=no -ac_cv_func_alarm=yes -ac_cv_func_alloca_works=yes -ac_cv_func_arc4random=no -ac_cv_func_argz_count=yes -ac_cv_func_argz_next=yes -ac_cv_func_argz_stringify=yes -ac_cv_func_asprintf=yes -ac_cv_func_bcopy=yes -ac_cv_func_bzero=yes -ac_cv_func_chown_works=yes -ac_cv_func_confstr=yes -ac_cv_func_dcgettext=yes -ac_cv_func_dlclose=yes -ac_cv_func_dlopen=yes -ac_cv_func_dlsym=yes -ac_cv_func_dprintf=yes -ac_cv_func_dup2=yes -ac_cv_func_eaccess=yes -ac_cv_func_faccessat=yes -ac_cv_func_fcntl=yes -ac_cv_func_fnmatch=yes -ac_cv_func_fpurge=no -ac_cv_func_fwprintf=yes -ac_cv_func_getaddrinfo=yes -ac_cv_func_getcwd=yes -ac_cv_func_getdtablesize=yes -ac_cv_func_getegid=yes -ac_cv_func_getentropy=yes -ac_cv_func_geteuid=yes -ac_cv_func_getgid=yes -ac_cv_func_getgroups=yes -ac_cv_func_gethostbyname=yes -ac_cv_func_gethostname=yes -ac_cv_func_getlocalename_l=no -ac_cv_func_getpagesize=yes -ac_cv_func_getpeername=yes -ac_cv_func_getpgrp_void=yes -ac_cv_func_getpwent=yes -ac_cv_func_getpwnam=yes -ac_cv_func_getpwuid=yes -ac_cv_func_getrandom=yes -ac_cv_func_getrlimit=yes -ac_cv_func_getrusage=yes -ac_cv_func_getservbyname=yes -ac_cv_func_getservent=yes -ac_cv_func_gettimeofday=yes -ac_cv_func_getuid=yes -ac_cv_func_imaxdiv=yes -ac_cv_func_inet_aton=yes -ac_cv_func_isascii=yes -ac_cv_func_isblank=yes -ac_cv_func_isgraph=yes -ac_cv_func_isprint=yes -ac_cv_func_isspace=yes -ac_cv_func_iswctype=yes -ac_cv_func_iswlower=yes -ac_cv_func_iswupper=yes -ac_cv_func_isxdigit=yes -ac_cv_func_kill=yes -ac_cv_func_killpg=yes -ac_cv_func_locale_charset=no -ac_cv_func_localeconv=yes -ac_cv_func_lstat=yes -ac_cv_func_mbrlen=yes -ac_cv_func_mbrtowc=yes -ac_cv_func_mbscasecmp=no -ac_cv_func_mbschr=no -ac_cv_func_mbscmp=no -ac_cv_func_mbsnrtowcs=yes -ac_cv_func_mbsrtowcs=yes -ac_cv_func_memmove=yes -ac_cv_func_mempcpy=yes -ac_cv_func_memset=yes -ac_cv_func_mkdtemp=yes -ac_cv_func_mkfifo=yes -ac_cv_func_mkstemp=yes -ac_cv_func_mmap_fixed_mapped=yes -ac_cv_func_mremap=yes -ac_cv_func_munmap=yes -ac_cv_func_newlocale=yes -ac_cv_func_pathconf=yes -ac_cv_func_pread=yes -ac_cv_func_pselect=yes -ac_cv_func_putenv=yes -ac_cv_func_raise=yes -ac_cv_func_random=yes -ac_cv_func_readlink=yes -ac_cv_func_regcomp=yes -ac_cv_func_regexec=yes -ac_cv_func_rename=yes -ac_cv_func_sbrk=yes -ac_cv_func_select=yes -ac_cv_func_setdtablesize=no -ac_cv_func_setenv=yes -ac_cv_func_setitimer=yes -ac_cv_func_setlinebuf=yes -ac_cv_func_setlocale=yes -ac_cv_func_setresgid=yes -ac_cv_func_setresuid=yes -ac_cv_func_setvbuf=yes -ac_cv_func_setvbuf_reversed=no -ac_cv_func_siginterrupt=yes -ac_cv_func_snprintf=yes -ac_cv_func_stpcpy=yes -ac_cv_func_strcasecmp=yes -ac_cv_func_strcasestr=yes -ac_cv_func_strchr=yes -ac_cv_func_strchrnul=yes -ac_cv_func_strcoll_works=yes -ac_cv_func_strcspn=yes -ac_cv_func_strdup=yes -ac_cv_func_strerror=yes -ac_cv_func_strftime=yes -ac_cv_func_strnlen=yes -ac_cv_func_strpbrk=yes -ac_cv_func_strstr=yes -ac_cv_func_strtod=yes -ac_cv_func_strtoimax=yes -ac_cv_func_strtol=yes -ac_cv_func_strtoll=yes -ac_cv_func_strtoul=yes -ac_cv_func_strtoull=yes -ac_cv_func_strtoumax=yes -ac_cv_func_symlink=yes -ac_cv_func_sysconf=yes -ac_cv_func_syslog=yes -ac_cv_func_tcgetattr=yes -ac_cv_func_tcgetpgrp=yes -ac_cv_func_tgetent=no -ac_cv_func_times=yes -ac_cv_func_towlower=yes -ac_cv_func_towupper=yes -ac_cv_func_tsearch=yes -ac_cv_func_ttyname=yes -ac_cv_func_tzset=yes -ac_cv_func_ulimit=yes -ac_cv_func_uname=yes -ac_cv_func_unsetenv=yes -ac_cv_func_uselocale=yes -ac_cv_func_vasprintf=yes -ac_cv_func_vprintf=yes -ac_cv_func_vsnprintf=yes -ac_cv_func_wait3=yes -ac_cv_func_waitpid=yes -ac_cv_func_wcrtomb=yes -ac_cv_func_wcscoll=yes -ac_cv_func_wcsdup=yes -ac_cv_func_wcslen=yes -ac_cv_func_wcsnlen=yes -ac_cv_func_wcswidth=yes -ac_cv_func_wctype=yes -ac_cv_func_wcwidth=yes -ac_cv_func_working_mktime=yes -ac_cv_gnu_library_2=yes -ac_cv_gnu_library_2_1=yes -ac_cv_have_decl_AUDIT_USER_TTY=yes -ac_cv_have_decl__snprintf=no -ac_cv_have_decl__snwprintf=no -ac_cv_have_decl_confstr=yes -ac_cv_have_decl_feof_unlocked=yes -ac_cv_have_decl_fgets_unlocked=yes -ac_cv_have_decl_fpurge=no -ac_cv_have_decl_getc_unlocked=yes -ac_cv_have_decl_printf=yes -ac_cv_have_decl_sbrk=yes -ac_cv_have_decl_setregid=yes -ac_cv_have_decl_strcpy=yes -ac_cv_have_decl_strsignal=yes -ac_cv_have_decl_strtold=yes -ac_cv_have_decl_sys_siglist=no -ac_cv_have_sig_atomic_t=yes -ac_cv_header_argz_h=yes -ac_cv_header_arpa_inet_h=yes -ac_cv_header_dirent_dirent_h=yes -ac_cv_header_dlfcn_h=yes -ac_cv_header_errno_h=yes -ac_cv_header_fcntl_h=yes -ac_cv_header_features_h=yes -ac_cv_header_grp_h=yes -ac_cv_header_inttypes_h=yes -ac_cv_header_langinfo_h=yes -ac_cv_header_libaudit_h=no -ac_cv_header_limits_h=yes -ac_cv_header_locale_h=yes -ac_cv_header_malloc_h=yes -ac_cv_header_mbstr_h=no -ac_cv_header_memory_h=yes -ac_cv_header_minix_config_h=no -ac_cv_header_netdb_h=yes -ac_cv_header_netinet_in_h=yes -ac_cv_header_pthread_h=yes -ac_cv_header_pwd_h=yes -ac_cv_header_regex_h=yes -ac_cv_header_stat_broken=no -ac_cv_header_stdarg_h=yes -ac_cv_header_stdbool_h=yes -ac_cv_header_stdc=yes -ac_cv_header_stddef_h=yes -ac_cv_header_stdint_h=yes -ac_cv_header_stdio_ext_h=yes -ac_cv_header_stdlib_h=yes -ac_cv_header_string_h=yes -ac_cv_header_strings_h=yes -ac_cv_header_sys_file_h=yes -ac_cv_header_sys_ioctl_h=yes -ac_cv_header_sys_mkdev_h=no -ac_cv_header_sys_mman_h=yes -ac_cv_header_sys_param_h=yes -ac_cv_header_sys_pte_h=no -ac_cv_header_sys_ptem_h=no -ac_cv_header_sys_random_h=yes -ac_cv_header_sys_resource_h=yes -ac_cv_header_sys_select_h=yes -ac_cv_header_sys_socket_h=yes -ac_cv_header_sys_stat_h=yes -ac_cv_header_sys_stream_h=no -ac_cv_header_sys_sysmacros_h=yes -ac_cv_header_sys_time_h=yes -ac_cv_header_sys_times_h=yes -ac_cv_header_sys_types_h=yes -ac_cv_header_sys_types_h_makedev=no -ac_cv_header_sys_wait_h=yes -ac_cv_header_syslog_h=yes -ac_cv_header_termcap_h=yes -ac_cv_header_termio_h=yes -ac_cv_header_termios_h=yes -ac_cv_header_time=yes -ac_cv_header_ulimit_h=yes -ac_cv_header_unistd_h=yes -ac_cv_header_varargs_h=no -ac_cv_header_wchar_h=yes -ac_cv_header_wctype_h=yes -ac_cv_header_xlocale_h=no -ac_cv_host=x86_64-pc-linux-gnu -ac_cv_lib_dl_dlopen=yes -ac_cv_lib_pthread_pthread_kill=yes -ac_cv_lib_termcap_tgetent=yes -ac_cv_member_struct_stat_st_atim_tv_nsec=yes -ac_cv_member_struct_stat_st_blocks=yes -ac_cv_member_struct_termio_c_line=yes -ac_cv_member_struct_termios_c_line=yes -ac_cv_member_struct_tm_tm_zone=yes -ac_cv_objext=o -ac_cv_path_EGREP='/usr/bin/grep -E' -ac_cv_path_GMSGFMT=/usr/bin/msgfmt -ac_cv_path_GREP=/usr/bin/grep -ac_cv_path_MSGFMT=/usr/bin/msgfmt -ac_cv_path_MSGMERGE=/usr/bin/msgmerge -ac_cv_path_SED=/usr/bin/sed -ac_cv_path_XGETTEXT=/usr/bin/xgettext -ac_cv_path_install='/usr/bin/install -c' -ac_cv_path_mkdir=/usr/bin/mkdir -ac_cv_prog_CPP='gcc -E' -ac_cv_prog_INTLBISON=bison -ac_cv_prog_YACC='bison -y' -ac_cv_prog_ac_ct_AR=ar -ac_cv_prog_ac_ct_CC=gcc -ac_cv_prog_ac_ct_RANLIB=ranlib -ac_cv_prog_cc_c89= -ac_cv_prog_cc_g=yes -ac_cv_prog_gcc_traditional=no -ac_cv_prog_make_make_set=yes -ac_cv_safe_to_define___extensions__=yes -ac_cv_search_opendir='none required' -ac_cv_search_strerror='none required' -ac_cv_sizeof_char=1 -ac_cv_sizeof_char_p=8 -ac_cv_sizeof_double=8 -ac_cv_sizeof_int=4 -ac_cv_sizeof_intmax_t=8 -ac_cv_sizeof_long=8 -ac_cv_sizeof_long_long=8 -ac_cv_sizeof_short=2 -ac_cv_sizeof_wchar_t=4 -ac_cv_struct_tm=time.h -ac_cv_sys_file_offset_bits=no -ac_cv_sys_interpreter=yes -ac_cv_sys_largefile_CC=no -ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes -ac_cv_sys_tiocgwinsz_in_termios_h=no -ac_cv_type_bits16_t=no -ac_cv_type_bits32_t=no -ac_cv_type_bits64_t=no -ac_cv_type_getgroups=gid_t -ac_cv_type_long_double_wider=yes -ac_cv_type_long_long_int=yes -ac_cv_type_mode_t=yes -ac_cv_type_off_t=yes -ac_cv_type_pid_t=yes -ac_cv_type_pthread_rwlock_t=yes -ac_cv_type_ptrdiff_t=yes -ac_cv_type_signal=void -ac_cv_type_size_t=yes -ac_cv_type_ssize_t=yes -ac_cv_type_time_t=yes -ac_cv_type_u_bits16_t=no -ac_cv_type_u_bits32_t=no -ac_cv_type_u_int=yes -ac_cv_type_u_long=yes -ac_cv_type_uid_t=yes -ac_cv_type_uintptr_t=yes -ac_cv_type_unsigned_long_long_int=yes -ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes -ac_cv_working_alloca_h=yes -acl_cv_hardcode_direct=no -acl_cv_hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' -acl_cv_hardcode_libdir_separator= -acl_cv_hardcode_minus_L=no -acl_cv_libdirstems=lib,lib -acl_cv_libext=a -acl_cv_libname_spec='lib$name' -acl_cv_library_names_spec='$libname$shrext' -acl_cv_path_LD=/usr/bin/ld -acl_cv_prog_gnu_ld=yes -acl_cv_rpath=done -acl_cv_shlibext=so -acl_cv_wl=-Wl, -am_cv_func_iconv=yes -am_cv_func_iconv_works=yes -am_cv_langinfo_codeset=yes -am_cv_lib_iconv=no -am_cv_proto_iconv='extern size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);' -am_cv_proto_iconv_arg1= -bash_cv_decl_strtoimax=yes -bash_cv_decl_strtol=yes -bash_cv_decl_strtoll=yes -bash_cv_decl_strtoul=yes -bash_cv_decl_strtoull=yes -bash_cv_decl_strtoumax=yes -bash_cv_decl_under_sys_siglist=no -bash_cv_dev_fd=standard -bash_cv_dev_stdin=present -bash_cv_dirent_has_d_fileno=yes -bash_cv_dirent_has_d_namlen=no -bash_cv_dirent_has_dino=yes -bash_cv_dup2_broken=no -bash_cv_fionread_in_ioctl=yes -bash_cv_fnmatch_equiv_fallback=yes -bash_cv_fnmatch_equiv_value=1 -bash_cv_func_ctype_nonascii=no -bash_cv_func_sbrk=yes -bash_cv_func_sigsetjmp=present -bash_cv_func_snprintf=yes -bash_cv_func_strcoll_broken=no -bash_cv_func_vsnprintf=yes -bash_cv_getcwd_malloc=yes -bash_cv_getenv_redef=yes -bash_cv_getpw_declared=yes -bash_cv_have_strsignal=yes -bash_cv_job_control_missing=present -bash_cv_langinfo_codeset=yes -bash_cv_mail_dir=/var/mail -bash_cv_must_reinstall_sighandlers=no -bash_cv_opendir_not_robust=no -bash_cv_pgrp_pipe=yes -bash_cv_printf_a_format=yes -bash_cv_signal_vintage=posix -bash_cv_speed_t_in_sys_types=no -bash_cv_std_putenv=yes -bash_cv_std_unsetenv=yes -bash_cv_strtold_broken=no -bash_cv_struct_timeval=yes -bash_cv_struct_timezone=yes -bash_cv_struct_winsize_header=ioctl_h -bash_cv_sys_errlist=yes -bash_cv_sys_named_pipes=present -bash_cv_sys_siglist=no -bash_cv_sys_struct_timespec_in_time_h=yes -bash_cv_termcap_lib=libtermcap -bash_cv_tiocstat_in_ioctl=no -bash_cv_type_clock_t=yes -bash_cv_type_intmax_t=yes -bash_cv_type_long_long='long long' -bash_cv_type_quad_t=yes -bash_cv_type_rlimit=rlim_t -bash_cv_type_sig_atomic_t=yes -bash_cv_type_sigset_t=yes -bash_cv_type_socklen_t=yes -bash_cv_type_uintmax_t=yes -bash_cv_type_unsigned_long_long='unsigned long long' -bash_cv_type_wchar_t=yes -bash_cv_type_wctype_t=yes -bash_cv_type_wint_t=yes -bash_cv_ulimit_maxfds=yes -bash_cv_under_sys_siglist=no -bash_cv_unusable_rtsigs=no -bash_cv_void_sighandler=yes -bash_cv_wcontinued_broken=no -bash_cv_wcwidth_broken=no -bash_cv_wexitstatus_offset=8 -gl_cv_cc_vis_werror=yes -gl_cv_cc_visibility=yes -gl_cv_have_weak=yes -gl_cv_header_inttypes_h=yes -gl_cv_header_stdint_h=yes -gl_cv_header_working_fcntl_h=yes -gl_cv_host_cpu_c_abi_32bit=no -gl_cv_pthread_rwlock_rdlock_prefer_writer=no -gl_cv_size_max=yes -gl_cv_type_wint_t_too_small=no -gt_cv_c_intmax_t=yes -gt_cv_c_wchar_t=yes -gt_cv_c_wint_t=yes -gt_cv_func_CFLocaleCopyCurrent=no -gt_cv_func_CFLocaleCopyPreferredLanguages=no -gt_cv_func_CFPreferencesCopyAppValue=no -gt_cv_func_gnugettext2_libc=yes -gt_cv_func_printf_posix=yes -gt_cv_func_uselocale_works=yes -gt_cv_int_divbyzero_sigfpe=yes -gt_cv_inttypes_pri_broken=no -gt_cv_locale_fake=no -gt_cv_locale_solaris114=no -gt_cv_val_LC_MESSAGES=yes -nls_cv_force_use_gnu_gettext=no -nls_cv_header_intl= -nls_cv_header_libgt= -nls_cv_use_gnu_gettext=no - -## ----------------- ## -## Output variables. ## -## ----------------- ## - -ALLOCA='' -AR='ar' -ARFLAGS='cr' -BASHVERS='0.1' -BUILD_DIR='/home/tong/src/bash/bash-5.1' -BUILD_INCLUDED_LIBINTL='no' -CATOBJEXT='.gmo' -CC='gcc' -CC_FOR_BUILD='$(CC)' -CFLAGS='-g -O2 -Wno-parentheses -Wno-format-security' -CFLAGS_FOR_BUILD='-g -O2 -Wno-parentheses -Wno-format-security' -CFLAG_VISIBILITY='-fvisibility=hidden' -CPP='gcc -E' -CPPFLAGS='' -CPPFLAGS_FOR_BUILD='' -CROSS_COMPILE='' -DATADIRNAME='share' -DEBUG='' -DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc' -DEFS='-DHAVE_CONFIG_H' -ECHO_C='' -ECHO_N='-n' -ECHO_T='' -EGREP='/usr/bin/grep -E' -EXEEXT='' -GENCAT='gencat' -GETTEXT_MACRO_VERSION='0.19' -GLIBC21='yes' -GLIBC2='yes' -GMSGFMT='/usr/bin/msgfmt' -GMSGFMT_015='/usr/bin/msgfmt' -GNULIB_OVERRIDES_WINT_T='0' -GREP='/usr/bin/grep' -HAVE_ASPRINTF='1' -HAVE_NAMELESS_LOCALES='0' -HAVE_NEWLOCALE='1' -HAVE_POSIX_PRINTF='1' -HAVE_SNPRINTF='1' -HAVE_VISIBILITY='1' -HAVE_WPRINTF='0' -HELPDIR='' -HELPDIRDEFINE='' -HELPFILES_TARGET='' -HELPINSTALL='' -HELPSTRINGS='' -HISTORY_DEP='$(HISTORY_LIBRARY)' -HISTORY_LIB='-lhistory' -HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' -INSTALL_DATA='${INSTALL} -m 644' -INSTALL_PROGRAM='${INSTALL}' -INSTALL_SCRIPT='${INSTALL}' -INSTOBJEXT='.mo' -INTLBISON='bison' -INTLLIBS='' -INTLOBJS='' -INTL_DEFAULT_VERBOSITY='1' -INTL_DEP='' -INTL_INC='' -INTL_LIBTOOL_SUFFIX_PREFIX='' -INTL_MACOSX_LIBS='' -JOBS_O='jobs.o' -LDFLAGS='' -LDFLAGS_FOR_BUILD='$(LDFLAGS)' -LIBICONV='' -LIBINTL='' -LIBINTL_H='' -LIBMULTITHREAD='-lpthread' -LIBOBJS=' ${LIBOBJDIR}mbschr$U.o' -LIBPTH='' -LIBPTH_PREFIX='' -LIBS='-ldl ' -LIBS_FOR_BUILD='$(LIBS)' -LIBTHREAD='' -LOCAL_CFLAGS='' -LOCAL_DEFS='-DSHELL' -LOCAL_LDFLAGS='-rdynamic' -LOCAL_LIBS='' -LTLIBICONV='' -LTLIBINTL='' -LTLIBMULTITHREAD='-lpthread' -LTLIBOBJS=' ${LIBOBJDIR}mbschr$U.lo' -LTLIBPTH='' -LTLIBTHREAD='' -MAKE_SHELL='/bin/sh' -MALLOC_DEBUG='' -MALLOC_DEP='$(MALLOC_LIBRARY)' -MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' -MALLOC_LIB='-lmalloc' -MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' -MALLOC_SRC='malloc.c' -MALLOC_TARGET='malloc' -MKDIR_P='/usr/bin/mkdir -p' -MSGFMT='/usr/bin/msgfmt' -MSGFMT_015='/usr/bin/msgfmt' -MSGMERGE='/usr/bin/msgmerge' -OBJEXT='o' -PACKAGE_BUGREPORT='bug-rash@gnu.org' -PACKAGE_NAME='rash' -PACKAGE_STRING='rash 0.1-release' -PACKAGE_TARNAME='rash' -PACKAGE_URL='' -PACKAGE_VERSION='0.1-release' -PATH_SEPARATOR=':' -POSUB='po' -PRI_MACROS_BROKEN='0' -PROFILE_FLAGS='' -PTHREAD_H_DEFINES_STRUCT_TIMESPEC='0' -RANLIB='ranlib' -READLINE_DEP='$(READLINE_LIBRARY)' -READLINE_LIB='-lreadline' -RELSTATUS='release' -RL_INCLUDE='' -RL_INCLUDEDIR='' -RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' -RL_MAJOR='' -RL_MINOR='' -RL_VERSION='' -SED='/usr/bin/sed' -SET_MAKE='' -SHELL='/bin/bash' -SHOBJ_CC='gcc' -SHOBJ_CFLAGS='-fPIC' -SHOBJ_LD='${CC}' -SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' -SHOBJ_LIBS='' -SHOBJ_STATUS='supported' -SHOBJ_XLDFLAGS='' -SIGLIST_O='' -SIGNAMES_H='lsignames.h' -SIGNAMES_O='' -SIZE='size' -STATIC_LD='' -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC='0' -TERMCAP_DEP='' -TERMCAP_LIB='-ltermcap' -TESTSCRIPT='run-all' -TILDE_LIB='-ltilde' -TIME_H_DEFINES_STRUCT_TIMESPEC='1' -USE_INCLUDED_LIBINTL='no' -USE_NLS='yes' -WINDRES='' -WOE32='no' -WOE32DLL='no' -XGETTEXT='/usr/bin/xgettext' -XGETTEXT_015='/usr/bin/xgettext' -XGETTEXT_EXTRA_OPTIONS='' -YACC='bison -y' -YFLAGS='' -ac_ct_CC='gcc' -bindir='${exec_prefix}/bin' -build='x86_64-pc-linux-gnu' -build_alias='' -build_cpu='x86_64' -build_os='linux-gnu' -build_vendor='pc' -datadir='${datarootdir}' -datarootdir='${prefix}/share' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -dvidir='${docdir}' -exec_prefix='${prefix}' -headersdir='$(includedir)/$(PACKAGE_NAME)' -host='x86_64-pc-linux-gnu' -host_alias='' -host_cpu='x86_64' -host_os='linux-gnu' -host_vendor='pc' -htmldir='${docdir}' -incdir='' -includedir='${prefix}/include' -infodir='${datarootdir}/info' -libdir='${exec_prefix}/lib' -libexecdir='${exec_prefix}/libexec' -loadablesdir='${libdir}/bash' -localedir='${datarootdir}/locale' -localstatedir='${prefix}/var' -mandir='${datarootdir}/man' -oldincludedir='/usr/include' -pdfdir='${docdir}' -prefix='/usr/local' -program_transform_name='s,x,x,' -psdir='${docdir}' -sbindir='${exec_prefix}/sbin' -sharedstatedir='${prefix}/com' -sysconfdir='${prefix}/etc' -target_alias='' - -## ----------- ## -## confdefs.h. ## -## ----------- ## - -/* confdefs.h */ -#define PACKAGE_NAME "rash" -#define PACKAGE_TARNAME "rash" -#define PACKAGE_VERSION "0.1-release" -#define PACKAGE_STRING "rash 0.1-release" -#define PACKAGE_BUGREPORT "bug-rash@gnu.org" -#define PACKAGE_URL "" -#define USING_BASH_MALLOC 1 -#define ALIAS 1 -#define PUSHD_AND_POPD 1 -#define RESTRICTED_SHELL 1 -#define PROCESS_SUBSTITUTION 1 -#define PROMPT_STRING_DECODE 1 -#define SELECT_COMMAND 1 -#define HELP_BUILTIN 1 -#define ARRAY_VARS 1 -#define DPAREN_ARITHMETIC 1 -#define BRACE_EXPANSION 1 -#define COMMAND_TIMING 1 -#define EXTENDED_GLOB 1 -#define EXTGLOB_DEFAULT 0 -#define COND_COMMAND 1 -#define COND_REGEXP 1 -#define COPROCESS_SUPPORT 1 -#define ARITH_FOR_COMMAND 1 -#define NETWORK_REDIRECTIONS 1 -#define PROGRAMMABLE_COMPLETION 1 -#define DEBUGGER 1 -#define CASEMOD_ATTRS 1 -#define CASEMOD_EXPANSIONS 1 -#define GLOBASCII_DEFAULT 1 -#define FUNCTION_IMPORT 1 -#define MEMSCRAMBLE 1 -#define STDC_HEADERS 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_UNISTD_H 1 -#define __EXTENSIONS__ 1 -#define _ALL_SOURCE 1 -#define _GNU_SOURCE 1 -#define _POSIX_PTHREAD_SEMANTICS 1 -#define _TANDEM_SOURCE 1 -#define READLINE 1 -#define HISTORY 1 -#define BANG_HISTORY 1 -#define _GNU_SOURCE 1 -#define HAVE_STRINGIZE 1 -#define HAVE_LONG_DOUBLE_WIDER 1 -#define HAVE_LONG_DOUBLE 1 -#define PROTOTYPES 1 -#define __PROTOTYPES 1 -#define restrict __restrict -#define HAVE_VISIBILITY 1 -#define HAVE_STDINT_H_WITH_UINTMAX 1 -#define HAVE_ALLOCA_H 1 -#define HAVE_ALLOCA 1 -#define HAVE_STDLIB_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_SYS_PARAM_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_GETPAGESIZE 1 -#define HAVE_MMAP 1 -#define INTDIV0_RAISES_SIGFPE 1 -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 -#define HAVE_UNSIGNED_LONG_LONG_INT 1 -#define HAVE_UINTMAX_T 1 -#define HAVE_INTTYPES_H 1 -#define USE_POSIX_THREADS 1 -#define USE_POSIX_THREADS_WEAK 1 -#define HAVE_PTHREAD_RWLOCK 1 -#define HAVE_PTHREAD_MUTEX_RECURSIVE 1 -#define HAVE_ICONV 1 -#define ICONV_CONST -#define HAVE_BUILTIN_EXPECT 1 -#define HAVE_ARGZ_H 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_LIMITS_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_SYS_PARAM_H 1 -#define HAVE_GETCWD 1 -#define HAVE_GETEGID 1 -#define HAVE_GETEUID 1 -#define HAVE_GETGID 1 -#define HAVE_GETUID 1 -#define HAVE_MEMPCPY 1 -#define HAVE_MUNMAP 1 -#define HAVE_STPCPY 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRDUP 1 -#define HAVE_STRTOUL 1 -#define HAVE_TSEARCH 1 -#define HAVE_ARGZ_COUNT 1 -#define HAVE_ARGZ_STRINGIFY 1 -#define HAVE_ARGZ_NEXT 1 -#define HAVE___FSETLOCKING 1 -#define HAVE_LOCALECONV 1 -#define HAVE_DECL_FEOF_UNLOCKED 1 -#define HAVE_DECL_FGETS_UNLOCKED 1 -#define HAVE_LONG_LONG_INT 1 -#define HAVE_WCHAR_T 1 -#define HAVE_WINT_T 1 -#define HAVE_INTMAX_T 1 -#define HAVE_POSIX_PRINTF 1 -#define HAVE_STDINT_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_SYMLINK 1 -#define HAVE_USELOCALE 1 -#define HAVE_ALARM 1 -#define HAVE___FPURGE 1 -#define HAVE_SNPRINTF 1 -#define HAVE_VSNPRINTF 1 -#define HAVE_WORKING_O_NOATIME 1 -#define HAVE_WORKING_O_NOFOLLOW 1 -#define HAVE_WORKING_USELOCALE 1 -#define FLEXIBLE_ARRAY_MEMBER /**/ -#define HAVE_FEATURES_H 1 -#define HAVE_STDDEF_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STRING_H 1 -#define HAVE_ASPRINTF 1 -#define HAVE_FWPRINTF 1 -#define HAVE_NEWLOCALE 1 -#define HAVE_PUTENV 1 -#define HAVE_SETENV 1 -#define HAVE_SETLOCALE 1 -#define HAVE_SNPRINTF 1 -#define HAVE_STRNLEN 1 -#define HAVE_USELOCALE 1 -#define HAVE_WCSLEN 1 -#define HAVE_WCSNLEN 1 -#define HAVE_MBRTOWC 1 -#define HAVE_WCRTOMB 1 -#define HAVE_DECL__SNPRINTF 0 -#define HAVE_DECL__SNWPRINTF 0 -#define HAVE_DECL_GETC_UNLOCKED 1 -#define HAVE_LANGINFO_CODESET 1 -#define HAVE_LC_MESSAGES 1 -#define ENABLE_NLS 1 -#define HAVE_GETTEXT 1 -#define HAVE_DCGETTEXT 1 -#define HAVE_DIRENT_H 1 -#define TIME_WITH_SYS_TIME 1 -#define MAJOR_IN_SYSMACROS 1 -#define HAVE_INTTYPES_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STDARG_H 1 -#define HAVE_LIMITS_H 1 -#define HAVE_STRING_H 1 -#define HAVE_MEMORY_H 1 -#define HAVE_LOCALE_H 1 -#define HAVE_TERMCAP_H 1 -#define HAVE_TERMIO_H 1 -#define HAVE_TERMIOS_H 1 -#define HAVE_DLFCN_H 1 -#define HAVE_STDBOOL_H 1 -#define HAVE_STDDEF_H 1 -#define HAVE_STDINT_H 1 -#define HAVE_NETDB_H 1 -#define HAVE_PWD_H 1 -#define HAVE_GRP_H 1 -#define HAVE_STRINGS_H 1 -#define HAVE_REGEX_H 1 -#define HAVE_SYSLOG_H 1 -#define HAVE_ULIMIT_H 1 -#define HAVE_SYS_SELECT_H 1 -#define HAVE_SYS_FILE_H 1 -#define HAVE_SYS_IOCTL_H 1 -#define HAVE_SYS_MMAN_H 1 -#define HAVE_SYS_PARAM_H 1 -#define HAVE_SYS_RANDOM_H 1 -#define HAVE_SYS_SOCKET_H 1 -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIME_H 1 -#define HAVE_SYS_TIMES_H 1 -#define HAVE_SYS_TYPES_H 1 -#define HAVE_SYS_WAIT_H 1 -#define HAVE_NETINET_IN_H 1 -#define HAVE_ARPA_INET_H 1 -#define HAVE_SYS_RESOURCE_H 1 -#define HAVE_ALLOCA_H 1 -#define HAVE_ALLOCA 1 -#define HAVE_UNISTD_H 1 -#define HAVE_CHOWN 1 -#define GETPGRP_VOID 1 -#define HAVE_VPRINTF 1 -#define HAVE_STRCOLL 1 -#define RETSIGTYPE void -#define HAVE_WAIT3 1 -#define HAVE_MKFIFO 1 -#define HAVE_DUP2 1 -#define HAVE_EACCESS 1 -#define HAVE_FCNTL 1 -#define HAVE_GETDTABLESIZE 1 -#define HAVE_GETENTROPY 1 -#define HAVE_GETGROUPS 1 -#define HAVE_GETHOSTNAME 1 -#define HAVE_GETPAGESIZE 1 -#define HAVE_GETPEERNAME 1 -#define HAVE_GETRANDOM 1 -#define HAVE_GETRLIMIT 1 -#define HAVE_GETRUSAGE 1 -#define HAVE_GETTIMEOFDAY 1 -#define HAVE_KILL 1 -#define HAVE_KILLPG 1 -#define HAVE_LSTAT 1 -#define HAVE_PSELECT 1 -#define HAVE_READLINK 1 -#define HAVE_SELECT 1 -#define HAVE_SETITIMER 1 -#define HAVE_TCGETPGRP 1 -#define HAVE_UNAME 1 -#define HAVE_ULIMIT 1 -#define HAVE_WAITPID 1 -#define HAVE_PREAD 1 -#define HAVE_RENAME 1 -#define HAVE_BCOPY 1 -#define HAVE_BZERO 1 -#define HAVE_CONFSTR 1 -#define HAVE_FACCESSAT 1 -#define HAVE_FNMATCH 1 -#define HAVE_GETADDRINFO 1 -#define HAVE_GETHOSTBYNAME 1 -#define HAVE_GETSERVBYNAME 1 -#define HAVE_GETSERVENT 1 -#define HAVE_INET_ATON 1 -#define HAVE_IMAXDIV 1 -#define HAVE_MEMMOVE 1 -#define HAVE_PATHCONF 1 -#define HAVE_PUTENV 1 -#define HAVE_RAISE 1 -#define HAVE_RANDOM 1 -#define HAVE_REGCOMP 1 -#define HAVE_REGEXEC 1 -#define HAVE_SETENV 1 -#define HAVE_SETLINEBUF 1 -#define HAVE_SETLOCALE 1 -#define HAVE_SETVBUF 1 -#define HAVE_SIGINTERRUPT 1 -#define HAVE_STRCHR 1 -#define HAVE_SYSCONF 1 -#define HAVE_SYSLOG 1 -#define HAVE_TCGETATTR 1 -#define HAVE_TIMES 1 -#define HAVE_TTYNAME 1 -#define HAVE_TZSET 1 -#define HAVE_UNSETENV 1 -#define HAVE_VASPRINTF 1 -#define HAVE_ASPRINTF 1 -#define HAVE_ISASCII 1 -#define HAVE_ISBLANK 1 -#define HAVE_ISGRAPH 1 -#define HAVE_ISPRINT 1 -#define HAVE_ISSPACE 1 -#define HAVE_ISXDIGIT 1 -#define HAVE_GETPWENT 1 -#define HAVE_GETPWNAM 1 -#define HAVE_GETPWUID 1 -#define HAVE_MKSTEMP 1 -#define HAVE_MKDTEMP 1 -#define HAVE_GETCWD 1 -#define HAVE_MEMSET 1 -#define HAVE_STRCASECMP 1 -#define HAVE_STRCASESTR 1 -#define HAVE_STRERROR 1 -#define HAVE_STRFTIME 1 -#define HAVE_STRNLEN 1 -#define HAVE_STRPBRK 1 -#define HAVE_STRSTR 1 -#define HAVE_STRTOD 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 -#define HAVE_STRTOLL 1 -#define HAVE_STRTOULL 1 -#define HAVE_STRTOIMAX 1 -#define HAVE_STRTOUMAX 1 -#define HAVE_DPRINTF 1 -#define HAVE_STRCHRNUL 1 -#define HAVE_STRDUP 1 -#define HAVE_DECL_AUDIT_USER_TTY 1 -#define HAVE_DECL_CONFSTR 1 -#define HAVE_DECL_PRINTF 1 -#define HAVE_DECL_SBRK 1 -#define HAVE_DECL_SETREGID 1 -#define HAVE_DECL_STRCPY 1 -#define HAVE_DECL_STRSIGNAL 1 -#define HAVE_SETRESUID 1 -#define HAVE_SETRESGID 1 -#define HAVE_DECL_STRTOLD 1 -#define HAVE_DECL_STRTOIMAX 1 -#define HAVE_DECL_STRTOL 1 -#define HAVE_DECL_STRTOLL 1 -#define HAVE_DECL_STRTOUL 1 -#define HAVE_DECL_STRTOULL 1 -#define HAVE_DECL_STRTOUMAX 1 -#define HAVE_ARGZ_H 1 -#define HAVE_ERRNO_H 1 -#define HAVE_FCNTL_H 1 -#define HAVE_MALLOC_H 1 -#define HAVE_STDIO_EXT_H 1 -#define HAVE_GETPAGESIZE 1 -#define HAVE_MMAP 1 -#define HAVE___ARGZ_COUNT 1 -#define HAVE___ARGZ_NEXT 1 -#define HAVE___ARGZ_STRINGIFY 1 -#define HAVE_DCGETTEXT 1 -#define HAVE_MEMPCPY 1 -#define HAVE_MUNMAP 1 -#define HAVE_MREMAP 1 -#define HAVE_STPCPY 1 -#define HAVE_STRCSPN 1 -#define HAVE_WCTYPE_H 1 -#define HAVE_WCHAR_H 1 -#define HAVE_LANGINFO_H 1 -#define HAVE_MBRLEN 1 -#define HAVE_MBSNRTOWCS 1 -#define HAVE_MBSRTOWCS 1 -#define HAVE_WCRTOMB 1 -#define HAVE_WCSCOLL 1 -#define HAVE_WCSDUP 1 -#define HAVE_WCWIDTH 1 -#define HAVE_WCTYPE 1 -#define HAVE_WCSWIDTH 1 -#define HAVE_MBRTOWC 1 -#define HAVE_MBSTATE_T 1 -#define HAVE_ISWLOWER 1 -#define HAVE_ISWUPPER 1 -#define HAVE_TOWLOWER 1 -#define HAVE_TOWUPPER 1 -#define HAVE_ISWCTYPE 1 -#define HAVE_LANGINFO_CODESET 1 -#define HAVE_WCHAR_T 1 -#define HAVE_WCTYPE_T 1 -#define HAVE_WINT_T 1 -#define SIZEOF_WCHAR_T 4 -#define HAVE_LIBDL 1 -#define HAVE_DLOPEN 1 -#define HAVE_DLCLOSE 1 -#define HAVE_DLSYM 1 -#define HAVE_DECL_SYS_SIGLIST 0 -#define GETGROUPS_T gid_t -#define HAVE_UINTPTR_T 1 -#define HAVE_LONG_LONG 1 -#define HAVE_UNSIGNED_LONG_LONG 1 -#define RETSIGTYPE void -#define SIZEOF_CHAR 1 -#define SIZEOF_SHORT 2 -#define SIZEOF_INT 4 -#define SIZEOF_LONG 8 -#define SIZEOF_CHAR_P 8 -#define SIZEOF_DOUBLE 8 -#define SIZEOF_LONG_LONG 8 -#define bits16_t short -#define u_bits16_t unsigned short -#define bits32_t int -#define u_bits32_t unsigned int -#define bits64_t char * -#define HAVE_HASH_BANG_EXEC 1 -#define PGRP_PIPE 1 -#define HAVE_POSIX_SIGNALS 1 -#define HAVE_DECL_AUDIT_USER_TTY 1 -#define HAVE_SYS_ERRLIST 1 -#define VOID_SIGHANDLER 1 -#define HAVE_QUAD_T 1 -#define HAVE_SOCKLEN_T 1 -#define RLIMTYPE rlim_t -#define SIZEOF_INTMAX_T 8 -#define TERMIOS_LDISC 1 -#define TERMIO_LDISC 1 -#define HAVE_STRUCT_DIRENT_D_INO 1 -#define HAVE_STRUCT_DIRENT_D_FILENO 1 -#define STRUCT_WINSIZE_IN_SYS_IOCTL 1 -#define HAVE_TIMEVAL 1 -#define HAVE_STRUCT_STAT_ST_BLOCKS 1 -#define HAVE_STRUCT_TM_TM_ZONE 1 -#define HAVE_TM_ZONE 1 -#define HAVE_STRUCT_TIMEZONE 1 -#define WEXITSTATUS_OFFSET 8 -#define HAVE_STRUCT_TIMESPEC 1 -#define TIME_H_DEFINES_STRUCT_TIMESPEC 1 -#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 -#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1 -#define HAVE_SBRK 1 -#define HAVE_STRSIGNAL 1 -#define ULIMIT_MAXFDS 1 -#define HAVE_DECL_FPURGE 0 -#define CAN_REDEFINE_GETENV 1 -#define HAVE_POSIX_SIGSETJMP 1 -#define HAVE_STD_PUTENV 1 -#define HAVE_STD_UNSETENV 1 -#define HAVE_PRINTF_A_FORMAT 1 -#define FNMATCH_EQUIV_FALLBACK 1 -#define GWINSZ_IN_SYS_IOCTL 1 -#define FIONREAD_IN_SYS_IOCTL 1 -#define HAVE_GETPW_DECLS 1 -#define HAVE_DEV_FD 1 -#define DEV_FD_PREFIX "/dev/fd/" -#define HAVE_DEV_STDIN 1 -#define DEFAULT_MAIL_DIRECTORY "/var/mail" -#define JOB_CONTROL 1 -#define PGRP_PIPE 1 - -configure: exit 0 diff --git a/bash-5.1/config.status b/bash-5.1/config.status deleted file mode 100755 index 2cb79aa8a626b84b07abfc4c1e4a75cf74c6f496..0000000000000000000000000000000000000000 --- a/bash-5.1/config.status +++ /dev/null @@ -1,1679 +0,0 @@ -#! /bin/bash -# Generated by configure. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=${CONFIG_SHELL-/bin/bash} -export SHELL -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# as_fn_executable_p FILE -# ----------------------- -# Test if FILE is an executable regular file. -as_fn_executable_p () -{ - test -f "$1" && test -x "$1" -} # as_fn_executable_p -as_test_x='test -x' -as_executable_p=as_fn_executable_p - -# Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -# Save the log message, to keep $0 and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by rash $as_me 0.1-release, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -# Files that config.status was made for. -config_files=" Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/Makefile.inc examples/loadables/perl/Makefile support/rash.pc support/rashbug.sh" -config_headers=" config.h" -config_commands=" po-directories default" - -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to ." - -ac_cs_config="" -ac_cs_version="\ -rash config.status 0.1-release -configured by ./configure, generated by GNU Autoconf 2.69, - with options \"$ac_cs_config\" - -Copyright (C) 2012 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='/home/tong/src/bash/bash-5.1' -srcdir='.' -INSTALL='/usr/bin/install -c' -MKDIR_P='/usr/bin/mkdir -p' -test -n "$AWK" || AWK=awk -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -fi - -if $ac_cs_recheck; then - set X /bin/bash './configure' $ac_configure_extra_args --no-create --no-recursion - shift - $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6 - CONFIG_SHELL='/bin/bash' - export CONFIG_SHELL - exec "$@" -fi - -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -# -# INIT-COMMANDS -# -# Capture the value of obsolete ALL_LINGUAS because we need it to compute - # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. - OBSOLETE_ALL_LINGUAS="" - # Capture the value of LINGUAS because we need it to compute CATALOGS. - LINGUAS="%UNSET%" - - - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;; - "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;; - "lib/glob/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;; - "lib/intl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;; - "lib/malloc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;; - "lib/sh/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;; - "lib/termcap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;; - "lib/tilde/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;; - "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; - "examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;; - "examples/loadables/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;; - "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;; - "support/rash.pc") CONFIG_FILES="$CONFIG_FILES support/rash.pc" ;; - "support/rashbug.sh") CONFIG_FILES="$CONFIG_FILES support/rashbug.sh" ;; - "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -cat >>"$ac_tmp/subs1.awk" <<\_ACAWK && -S["LTLIBOBJS"]=" ${LIBOBJDIR}mbschr$U.lo" -S["LOCAL_DEFS"]="-DSHELL" -S["LOCAL_LDFLAGS"]="-rdynamic" -S["LOCAL_CFLAGS"]="" -S["LOCAL_LIBS"]="" -S["MALLOC_DEBUG"]="" -S["DEBUG"]="" -S["RELSTATUS"]="release" -S["BASHVERS"]="0.1" -S["headersdir"]="$(includedir)/$(PACKAGE_NAME)" -S["loadablesdir"]="${libdir}/bash" -S["BUILD_DIR"]="/home/tong/src/bash/bash-5.1" -S["incdir"]="" -S["PROFILE_FLAGS"]="" -S["SHOBJ_STATUS"]="supported" -S["SHOBJ_LIBS"]="" -S["SHOBJ_XLDFLAGS"]="" -S["SHOBJ_LDFLAGS"]="-shared -Wl,-soname,$@" -S["SHOBJ_LD"]="${CC}" -S["SHOBJ_CFLAGS"]="-fPIC" -S["SHOBJ_CC"]="gcc" -S["JOBS_O"]="jobs.o" -S["TERMCAP_DEP"]="" -S["TERMCAP_LIB"]="-ltermcap" -S["SIGLIST_O"]="" -S["PTHREAD_H_DEFINES_STRUCT_TIMESPEC"]="0" -S["SYS_TIME_H_DEFINES_STRUCT_TIMESPEC"]="0" -S["TIME_H_DEFINES_STRUCT_TIMESPEC"]="1" -S["LIBINTL_H"]="" -S["INTL_INC"]="" -S["INTL_DEP"]="" -S["LIBOBJS"]=" ${LIBOBJDIR}mbschr$U.o" -S["POSUB"]="po" -S["LTLIBINTL"]="" -S["LIBINTL"]="" -S["INTLLIBS"]="" -S["INTL_LIBTOOL_SUFFIX_PREFIX"]="" -S["INTLOBJS"]="" -S["GENCAT"]="gencat" -S["INSTOBJEXT"]=".mo" -S["DATADIRNAME"]="share" -S["CATOBJEXT"]=".gmo" -S["USE_INCLUDED_LIBINTL"]="no" -S["BUILD_INCLUDED_LIBINTL"]="no" -S["WINDRES"]="" -S["WOE32"]="no" -S["WOE32DLL"]="no" -S["HAVE_NAMELESS_LOCALES"]="0" -S["HAVE_WPRINTF"]="0" -S["HAVE_NEWLOCALE"]="1" -S["HAVE_SNPRINTF"]="1" -S["HAVE_ASPRINTF"]="1" -S["HAVE_POSIX_PRINTF"]="1" -S["INTL_DEFAULT_VERBOSITY"]="1" -S["ARFLAGS"]="cr" -S["INTL_MACOSX_LIBS"]="" -S["GLIBC21"]="yes" -S["GNULIB_OVERRIDES_WINT_T"]="0" -S["INTLBISON"]="bison" -S["LTLIBICONV"]="" -S["LIBICONV"]="" -S["LTLIBMULTITHREAD"]="-lpthread" -S["LIBMULTITHREAD"]="-lpthread" -S["LTLIBTHREAD"]="" -S["LIBTHREAD"]="" -S["LIBPTH_PREFIX"]="" -S["LTLIBPTH"]="" -S["LIBPTH"]="" -S["PRI_MACROS_BROKEN"]="0" -S["ALLOCA"]="" -S["HAVE_VISIBILITY"]="1" -S["CFLAG_VISIBILITY"]="-fvisibility=hidden" -S["GLIBC2"]="yes" -S["XGETTEXT_EXTRA_OPTIONS"]="" -S["MSGMERGE"]="/usr/bin/msgmerge" -S["XGETTEXT_015"]="/usr/bin/xgettext" -S["XGETTEXT"]="/usr/bin/xgettext" -S["GMSGFMT_015"]="/usr/bin/msgfmt" -S["MSGFMT_015"]="/usr/bin/msgfmt" -S["GMSGFMT"]="/usr/bin/msgfmt" -S["MSGFMT"]="/usr/bin/msgfmt" -S["GETTEXT_MACRO_VERSION"]="0.19" -S["USE_NLS"]="yes" -S["SED"]="/usr/bin/sed" -S["MKDIR_P"]="/usr/bin/mkdir -p" -S["SIZE"]="size" -S["MAKE_SHELL"]="/bin/sh" -S["SET_MAKE"]="" -S["YFLAGS"]="" -S["YACC"]="bison -y" -S["RANLIB"]="ranlib" -S["AR"]="ar" -S["INSTALL_DATA"]="${INSTALL} -m 644" -S["INSTALL_SCRIPT"]="${INSTALL}" -S["INSTALL_PROGRAM"]="${INSTALL}" -S["TILDE_LIB"]="-ltilde" -S["HIST_LIBDIR"]="$(dot)/$(LIBSUBDIR)/readline" -S["HISTORY_DEP"]="$(HISTORY_LIBRARY)" -S["HISTORY_LIB"]="-lhistory" -S["RL_INCLUDE"]="" -S["RL_INCLUDEDIR"]="" -S["RL_LIBDIR"]="$(dot)/$(LIBSUBDIR)/readline" -S["READLINE_DEP"]="$(READLINE_LIBRARY)" -S["READLINE_LIB"]="-lreadline" -S["RL_MINOR"]="" -S["RL_MAJOR"]="" -S["RL_VERSION"]="" -S["LIBS_FOR_BUILD"]="$(LIBS)" -S["STATIC_LD"]="" -S["SIGNAMES_O"]="" -S["SIGNAMES_H"]="lsignames.h" -S["CROSS_COMPILE"]="" -S["EGREP"]="/usr/bin/grep -E" -S["GREP"]="/usr/bin/grep" -S["CPP"]="gcc -E" -S["OBJEXT"]="o" -S["EXEEXT"]="" -S["ac_ct_CC"]="gcc" -S["CPPFLAGS"]="" -S["LDFLAGS"]="" -S["CFLAGS"]="-g -O2 -Wno-parentheses -Wno-format-security" -S["CC"]="gcc" -S["HELPSTRINGS"]="" -S["HELPFILES_TARGET"]="" -S["HELPINSTALL"]="" -S["HELPDIRDEFINE"]="" -S["HELPDIR"]="" -S["MALLOC_DEP"]="$(MALLOC_LIBRARY)" -S["MALLOC_LDFLAGS"]="-L$(ALLOC_LIBDIR)" -S["MALLOC_LIBRARY"]="$(ALLOC_LIBDIR)/libmalloc.a" -S["MALLOC_LIB"]="-lmalloc" -S["MALLOC_SRC"]="malloc.c" -S["MALLOC_TARGET"]="malloc" -S["TESTSCRIPT"]="run-all" -S["CPPFLAGS_FOR_BUILD"]="" -S["LDFLAGS_FOR_BUILD"]="$(LDFLAGS)" -S["CFLAGS_FOR_BUILD"]="-g -O2 -Wno-parentheses -Wno-format-security" -S["CC_FOR_BUILD"]="$(CC)" -S["DEBUGGER_START_FILE"]="${datadir}/bashdb/bashdb-main.inc" -S["host_os"]="linux-gnu" -S["host_vendor"]="pc" -S["host_cpu"]="x86_64" -S["host"]="x86_64-pc-linux-gnu" -S["build_os"]="linux-gnu" -S["build_vendor"]="pc" -S["build_cpu"]="x86_64" -S["build"]="x86_64-pc-linux-gnu" -S["target_alias"]="" -S["host_alias"]="" -S["build_alias"]="" -S["LIBS"]="-ldl " -S["ECHO_T"]="" -S["ECHO_N"]="-n" -S["ECHO_C"]="" -S["DEFS"]="-DHAVE_CONFIG_H" -S["mandir"]="${datarootdir}/man" -S["localedir"]="${datarootdir}/locale" -S["libdir"]="${exec_prefix}/lib" -S["psdir"]="${docdir}" -S["pdfdir"]="${docdir}" -S["dvidir"]="${docdir}" -S["htmldir"]="${docdir}" -S["infodir"]="${datarootdir}/info" -S["docdir"]="${datarootdir}/doc/${PACKAGE_TARNAME}" -S["oldincludedir"]="/usr/include" -S["includedir"]="${prefix}/include" -S["localstatedir"]="${prefix}/var" -S["sharedstatedir"]="${prefix}/com" -S["sysconfdir"]="${prefix}/etc" -S["datadir"]="${datarootdir}" -S["datarootdir"]="${prefix}/share" -S["libexecdir"]="${exec_prefix}/libexec" -S["sbindir"]="${exec_prefix}/sbin" -S["bindir"]="${exec_prefix}/bin" -S["program_transform_name"]="s,x,x," -S["prefix"]="/usr/local" -S["exec_prefix"]="${prefix}" -S["PACKAGE_URL"]="" -S["PACKAGE_BUGREPORT"]="bug-rash@gnu.org" -S["PACKAGE_STRING"]="rash 0.1-release" -S["PACKAGE_VERSION"]="0.1-release" -S["PACKAGE_TARNAME"]="rash" -S["PACKAGE_NAME"]="rash" -S["PATH_SEPARATOR"]=":" -S["SHELL"]="/bin/bash" -_ACAWK -cat >>"$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -D["PACKAGE_NAME"]=" \"rash\"" -D["PACKAGE_TARNAME"]=" \"rash\"" -D["PACKAGE_VERSION"]=" \"0.1-release\"" -D["PACKAGE_STRING"]=" \"rash 0.1-release\"" -D["PACKAGE_BUGREPORT"]=" \"bug-rash@gnu.org\"" -D["PACKAGE_URL"]=" \"\"" -D["USING_BASH_MALLOC"]=" 1" -D["ALIAS"]=" 1" -D["PUSHD_AND_POPD"]=" 1" -D["RESTRICTED_SHELL"]=" 1" -D["PROCESS_SUBSTITUTION"]=" 1" -D["PROMPT_STRING_DECODE"]=" 1" -D["SELECT_COMMAND"]=" 1" -D["HELP_BUILTIN"]=" 1" -D["ARRAY_VARS"]=" 1" -D["DPAREN_ARITHMETIC"]=" 1" -D["BRACE_EXPANSION"]=" 1" -D["COMMAND_TIMING"]=" 1" -D["EXTENDED_GLOB"]=" 1" -D["EXTGLOB_DEFAULT"]=" 0" -D["COND_COMMAND"]=" 1" -D["COND_REGEXP"]=" 1" -D["COPROCESS_SUPPORT"]=" 1" -D["ARITH_FOR_COMMAND"]=" 1" -D["NETWORK_REDIRECTIONS"]=" 1" -D["PROGRAMMABLE_COMPLETION"]=" 1" -D["DEBUGGER"]=" 1" -D["CASEMOD_ATTRS"]=" 1" -D["CASEMOD_EXPANSIONS"]=" 1" -D["GLOBASCII_DEFAULT"]=" 1" -D["FUNCTION_IMPORT"]=" 1" -D["MEMSCRAMBLE"]=" 1" -D["STDC_HEADERS"]=" 1" -D["HAVE_SYS_TYPES_H"]=" 1" -D["HAVE_SYS_STAT_H"]=" 1" -D["HAVE_STDLIB_H"]=" 1" -D["HAVE_STRING_H"]=" 1" -D["HAVE_MEMORY_H"]=" 1" -D["HAVE_STRINGS_H"]=" 1" -D["HAVE_INTTYPES_H"]=" 1" -D["HAVE_STDINT_H"]=" 1" -D["HAVE_UNISTD_H"]=" 1" -D["__EXTENSIONS__"]=" 1" -D["_ALL_SOURCE"]=" 1" -D["_GNU_SOURCE"]=" 1" -D["_POSIX_PTHREAD_SEMANTICS"]=" 1" -D["_TANDEM_SOURCE"]=" 1" -D["READLINE"]=" 1" -D["HISTORY"]=" 1" -D["BANG_HISTORY"]=" 1" -D["_GNU_SOURCE"]=" 1" -D["HAVE_STRINGIZE"]=" 1" -D["HAVE_LONG_DOUBLE_WIDER"]=" 1" -D["HAVE_LONG_DOUBLE"]=" 1" -D["PROTOTYPES"]=" 1" -D["__PROTOTYPES"]=" 1" -D["restrict"]=" __restrict" -D["HAVE_VISIBILITY"]=" 1" -D["HAVE_STDINT_H_WITH_UINTMAX"]=" 1" -D["HAVE_ALLOCA_H"]=" 1" -D["HAVE_ALLOCA"]=" 1" -D["HAVE_STDLIB_H"]=" 1" -D["HAVE_UNISTD_H"]=" 1" -D["HAVE_SYS_PARAM_H"]=" 1" -D["HAVE_SYS_TIME_H"]=" 1" -D["HAVE_GETPAGESIZE"]=" 1" -D["HAVE_MMAP"]=" 1" -D["INTDIV0_RAISES_SIGFPE"]=" 1" -D["HAVE_INTTYPES_H_WITH_UINTMAX"]=" 1" -D["HAVE_UNSIGNED_LONG_LONG_INT"]=" 1" -D["HAVE_UINTMAX_T"]=" 1" -D["HAVE_INTTYPES_H"]=" 1" -D["USE_POSIX_THREADS"]=" 1" -D["USE_POSIX_THREADS_WEAK"]=" 1" -D["HAVE_PTHREAD_RWLOCK"]=" 1" -D["HAVE_PTHREAD_MUTEX_RECURSIVE"]=" 1" -D["HAVE_ICONV"]=" 1" -D["ICONV_CONST"]=" " -D["HAVE_BUILTIN_EXPECT"]=" 1" -D["HAVE_ARGZ_H"]=" 1" -D["HAVE_INTTYPES_H"]=" 1" -D["HAVE_LIMITS_H"]=" 1" -D["HAVE_UNISTD_H"]=" 1" -D["HAVE_SYS_PARAM_H"]=" 1" -D["HAVE_GETCWD"]=" 1" -D["HAVE_GETEGID"]=" 1" -D["HAVE_GETEUID"]=" 1" -D["HAVE_GETGID"]=" 1" -D["HAVE_GETUID"]=" 1" -D["HAVE_MEMPCPY"]=" 1" -D["HAVE_MUNMAP"]=" 1" -D["HAVE_STPCPY"]=" 1" -D["HAVE_STRCASECMP"]=" 1" -D["HAVE_STRDUP"]=" 1" -D["HAVE_STRTOUL"]=" 1" -D["HAVE_TSEARCH"]=" 1" -D["HAVE_ARGZ_COUNT"]=" 1" -D["HAVE_ARGZ_STRINGIFY"]=" 1" -D["HAVE_ARGZ_NEXT"]=" 1" -D["HAVE___FSETLOCKING"]=" 1" -D["HAVE_LOCALECONV"]=" 1" -D["HAVE_DECL_FEOF_UNLOCKED"]=" 1" -D["HAVE_DECL_FGETS_UNLOCKED"]=" 1" -D["HAVE_LONG_LONG_INT"]=" 1" -D["HAVE_WCHAR_T"]=" 1" -D["HAVE_WINT_T"]=" 1" -D["HAVE_INTMAX_T"]=" 1" -D["HAVE_POSIX_PRINTF"]=" 1" -D["HAVE_STDINT_H"]=" 1" -D["HAVE_STDINT_H"]=" 1" -D["HAVE_SYMLINK"]=" 1" -D["HAVE_USELOCALE"]=" 1" -D["HAVE_ALARM"]=" 1" -D["HAVE___FPURGE"]=" 1" -D["HAVE_SNPRINTF"]=" 1" -D["HAVE_VSNPRINTF"]=" 1" -D["HAVE_WORKING_O_NOATIME"]=" 1" -D["HAVE_WORKING_O_NOFOLLOW"]=" 1" -D["HAVE_WORKING_USELOCALE"]=" 1" -D["FLEXIBLE_ARRAY_MEMBER"]=" /**/" -D["HAVE_FEATURES_H"]=" 1" -D["HAVE_STDDEF_H"]=" 1" -D["HAVE_STDLIB_H"]=" 1" -D["HAVE_STRING_H"]=" 1" -D["HAVE_ASPRINTF"]=" 1" -D["HAVE_FWPRINTF"]=" 1" -D["HAVE_NEWLOCALE"]=" 1" -D["HAVE_PUTENV"]=" 1" -D["HAVE_SETENV"]=" 1" -D["HAVE_SETLOCALE"]=" 1" -D["HAVE_SNPRINTF"]=" 1" -D["HAVE_STRNLEN"]=" 1" -D["HAVE_USELOCALE"]=" 1" -D["HAVE_WCSLEN"]=" 1" -D["HAVE_WCSNLEN"]=" 1" -D["HAVE_MBRTOWC"]=" 1" -D["HAVE_WCRTOMB"]=" 1" -D["HAVE_DECL__SNPRINTF"]=" 0" -D["HAVE_DECL__SNWPRINTF"]=" 0" -D["HAVE_DECL_GETC_UNLOCKED"]=" 1" -D["HAVE_LANGINFO_CODESET"]=" 1" -D["HAVE_LC_MESSAGES"]=" 1" -D["ENABLE_NLS"]=" 1" -D["HAVE_GETTEXT"]=" 1" -D["HAVE_DCGETTEXT"]=" 1" -D["HAVE_DIRENT_H"]=" 1" -D["TIME_WITH_SYS_TIME"]=" 1" -D["MAJOR_IN_SYSMACROS"]=" 1" -D["HAVE_INTTYPES_H"]=" 1" -D["HAVE_UNISTD_H"]=" 1" -D["HAVE_STDLIB_H"]=" 1" -D["HAVE_STDARG_H"]=" 1" -D["HAVE_LIMITS_H"]=" 1" -D["HAVE_STRING_H"]=" 1" -D["HAVE_MEMORY_H"]=" 1" -D["HAVE_LOCALE_H"]=" 1" -D["HAVE_TERMCAP_H"]=" 1" -D["HAVE_TERMIO_H"]=" 1" -D["HAVE_TERMIOS_H"]=" 1" -D["HAVE_DLFCN_H"]=" 1" -D["HAVE_STDBOOL_H"]=" 1" -D["HAVE_STDDEF_H"]=" 1" -D["HAVE_STDINT_H"]=" 1" -D["HAVE_NETDB_H"]=" 1" -D["HAVE_PWD_H"]=" 1" -D["HAVE_GRP_H"]=" 1" -D["HAVE_STRINGS_H"]=" 1" -D["HAVE_REGEX_H"]=" 1" -D["HAVE_SYSLOG_H"]=" 1" -D["HAVE_ULIMIT_H"]=" 1" -D["HAVE_SYS_SELECT_H"]=" 1" -D["HAVE_SYS_FILE_H"]=" 1" -D["HAVE_SYS_IOCTL_H"]=" 1" -D["HAVE_SYS_MMAN_H"]=" 1" -D["HAVE_SYS_PARAM_H"]=" 1" -D["HAVE_SYS_RANDOM_H"]=" 1" -D["HAVE_SYS_SOCKET_H"]=" 1" -D["HAVE_SYS_STAT_H"]=" 1" -D["HAVE_SYS_TIME_H"]=" 1" -D["HAVE_SYS_TIMES_H"]=" 1" -D["HAVE_SYS_TYPES_H"]=" 1" -D["HAVE_SYS_WAIT_H"]=" 1" -D["HAVE_NETINET_IN_H"]=" 1" -D["HAVE_ARPA_INET_H"]=" 1" -D["HAVE_SYS_RESOURCE_H"]=" 1" -D["HAVE_ALLOCA_H"]=" 1" -D["HAVE_ALLOCA"]=" 1" -D["HAVE_UNISTD_H"]=" 1" -D["HAVE_CHOWN"]=" 1" -D["GETPGRP_VOID"]=" 1" -D["HAVE_VPRINTF"]=" 1" -D["HAVE_STRCOLL"]=" 1" -D["RETSIGTYPE"]=" void" -D["HAVE_WAIT3"]=" 1" -D["HAVE_MKFIFO"]=" 1" -D["HAVE_DUP2"]=" 1" -D["HAVE_EACCESS"]=" 1" -D["HAVE_FCNTL"]=" 1" -D["HAVE_GETDTABLESIZE"]=" 1" -D["HAVE_GETENTROPY"]=" 1" -D["HAVE_GETGROUPS"]=" 1" -D["HAVE_GETHOSTNAME"]=" 1" -D["HAVE_GETPAGESIZE"]=" 1" -D["HAVE_GETPEERNAME"]=" 1" -D["HAVE_GETRANDOM"]=" 1" -D["HAVE_GETRLIMIT"]=" 1" -D["HAVE_GETRUSAGE"]=" 1" -D["HAVE_GETTIMEOFDAY"]=" 1" -D["HAVE_KILL"]=" 1" -D["HAVE_KILLPG"]=" 1" -D["HAVE_LSTAT"]=" 1" -D["HAVE_PSELECT"]=" 1" -D["HAVE_READLINK"]=" 1" -D["HAVE_SELECT"]=" 1" -D["HAVE_SETITIMER"]=" 1" -D["HAVE_TCGETPGRP"]=" 1" -D["HAVE_UNAME"]=" 1" -D["HAVE_ULIMIT"]=" 1" -D["HAVE_WAITPID"]=" 1" -D["HAVE_PREAD"]=" 1" -D["HAVE_RENAME"]=" 1" -D["HAVE_BCOPY"]=" 1" -D["HAVE_BZERO"]=" 1" -D["HAVE_CONFSTR"]=" 1" -D["HAVE_FACCESSAT"]=" 1" -D["HAVE_FNMATCH"]=" 1" -D["HAVE_GETADDRINFO"]=" 1" -D["HAVE_GETHOSTBYNAME"]=" 1" -D["HAVE_GETSERVBYNAME"]=" 1" -D["HAVE_GETSERVENT"]=" 1" -D["HAVE_INET_ATON"]=" 1" -D["HAVE_IMAXDIV"]=" 1" -D["HAVE_MEMMOVE"]=" 1" -D["HAVE_PATHCONF"]=" 1" -D["HAVE_PUTENV"]=" 1" -D["HAVE_RAISE"]=" 1" -D["HAVE_RANDOM"]=" 1" -D["HAVE_REGCOMP"]=" 1" -D["HAVE_REGEXEC"]=" 1" -D["HAVE_SETENV"]=" 1" -D["HAVE_SETLINEBUF"]=" 1" -D["HAVE_SETLOCALE"]=" 1" -D["HAVE_SETVBUF"]=" 1" -D["HAVE_SIGINTERRUPT"]=" 1" -D["HAVE_STRCHR"]=" 1" -D["HAVE_SYSCONF"]=" 1" -D["HAVE_SYSLOG"]=" 1" -D["HAVE_TCGETATTR"]=" 1" -D["HAVE_TIMES"]=" 1" -D["HAVE_TTYNAME"]=" 1" -D["HAVE_TZSET"]=" 1" -D["HAVE_UNSETENV"]=" 1" -D["HAVE_VASPRINTF"]=" 1" -D["HAVE_ASPRINTF"]=" 1" -D["HAVE_ISASCII"]=" 1" -D["HAVE_ISBLANK"]=" 1" -D["HAVE_ISGRAPH"]=" 1" -D["HAVE_ISPRINT"]=" 1" -D["HAVE_ISSPACE"]=" 1" -D["HAVE_ISXDIGIT"]=" 1" -D["HAVE_GETPWENT"]=" 1" -D["HAVE_GETPWNAM"]=" 1" -D["HAVE_GETPWUID"]=" 1" -D["HAVE_MKSTEMP"]=" 1" -D["HAVE_MKDTEMP"]=" 1" -D["HAVE_GETCWD"]=" 1" -D["HAVE_MEMSET"]=" 1" -D["HAVE_STRCASECMP"]=" 1" -D["HAVE_STRCASESTR"]=" 1" -D["HAVE_STRERROR"]=" 1" -D["HAVE_STRFTIME"]=" 1" -D["HAVE_STRNLEN"]=" 1" -D["HAVE_STRPBRK"]=" 1" -D["HAVE_STRSTR"]=" 1" -D["HAVE_STRTOD"]=" 1" -D["HAVE_STRTOL"]=" 1" -D["HAVE_STRTOUL"]=" 1" -D["HAVE_STRTOLL"]=" 1" -D["HAVE_STRTOULL"]=" 1" -D["HAVE_STRTOIMAX"]=" 1" -D["HAVE_STRTOUMAX"]=" 1" -D["HAVE_DPRINTF"]=" 1" -D["HAVE_STRCHRNUL"]=" 1" -D["HAVE_STRDUP"]=" 1" -D["HAVE_DECL_AUDIT_USER_TTY"]=" 1" -D["HAVE_DECL_CONFSTR"]=" 1" -D["HAVE_DECL_PRINTF"]=" 1" -D["HAVE_DECL_SBRK"]=" 1" -D["HAVE_DECL_SETREGID"]=" 1" -D["HAVE_DECL_STRCPY"]=" 1" -D["HAVE_DECL_STRSIGNAL"]=" 1" -D["HAVE_SETRESUID"]=" 1" -D["HAVE_SETRESGID"]=" 1" -D["HAVE_DECL_STRTOLD"]=" 1" -D["HAVE_DECL_STRTOIMAX"]=" 1" -D["HAVE_DECL_STRTOL"]=" 1" -D["HAVE_DECL_STRTOLL"]=" 1" -D["HAVE_DECL_STRTOUL"]=" 1" -D["HAVE_DECL_STRTOULL"]=" 1" -D["HAVE_DECL_STRTOUMAX"]=" 1" -D["HAVE_ARGZ_H"]=" 1" -D["HAVE_ERRNO_H"]=" 1" -D["HAVE_FCNTL_H"]=" 1" -D["HAVE_MALLOC_H"]=" 1" -D["HAVE_STDIO_EXT_H"]=" 1" -D["HAVE_GETPAGESIZE"]=" 1" -D["HAVE_MMAP"]=" 1" -D["HAVE___ARGZ_COUNT"]=" 1" -D["HAVE___ARGZ_NEXT"]=" 1" -D["HAVE___ARGZ_STRINGIFY"]=" 1" -D["HAVE_DCGETTEXT"]=" 1" -D["HAVE_MEMPCPY"]=" 1" -D["HAVE_MUNMAP"]=" 1" -D["HAVE_MREMAP"]=" 1" -D["HAVE_STPCPY"]=" 1" -D["HAVE_STRCSPN"]=" 1" -D["HAVE_WCTYPE_H"]=" 1" -D["HAVE_WCHAR_H"]=" 1" -D["HAVE_LANGINFO_H"]=" 1" -D["HAVE_MBRLEN"]=" 1" -D["HAVE_MBSNRTOWCS"]=" 1" -D["HAVE_MBSRTOWCS"]=" 1" -D["HAVE_WCRTOMB"]=" 1" -D["HAVE_WCSCOLL"]=" 1" -D["HAVE_WCSDUP"]=" 1" -D["HAVE_WCWIDTH"]=" 1" -D["HAVE_WCTYPE"]=" 1" -D["HAVE_WCSWIDTH"]=" 1" -D["HAVE_MBRTOWC"]=" 1" -D["HAVE_MBSTATE_T"]=" 1" -D["HAVE_ISWLOWER"]=" 1" -D["HAVE_ISWUPPER"]=" 1" -D["HAVE_TOWLOWER"]=" 1" -D["HAVE_TOWUPPER"]=" 1" -D["HAVE_ISWCTYPE"]=" 1" -D["HAVE_LANGINFO_CODESET"]=" 1" -D["HAVE_WCHAR_T"]=" 1" -D["HAVE_WCTYPE_T"]=" 1" -D["HAVE_WINT_T"]=" 1" -D["SIZEOF_WCHAR_T"]=" 4" -D["HAVE_LIBDL"]=" 1" -D["HAVE_DLOPEN"]=" 1" -D["HAVE_DLCLOSE"]=" 1" -D["HAVE_DLSYM"]=" 1" -D["HAVE_DECL_SYS_SIGLIST"]=" 0" -D["GETGROUPS_T"]=" gid_t" -D["HAVE_UINTPTR_T"]=" 1" -D["HAVE_LONG_LONG"]=" 1" -D["HAVE_UNSIGNED_LONG_LONG"]=" 1" -D["RETSIGTYPE"]=" void" -D["SIZEOF_CHAR"]=" 1" -D["SIZEOF_SHORT"]=" 2" -D["SIZEOF_INT"]=" 4" -D["SIZEOF_LONG"]=" 8" -D["SIZEOF_CHAR_P"]=" 8" -D["SIZEOF_DOUBLE"]=" 8" -D["SIZEOF_LONG_LONG"]=" 8" -D["bits16_t"]=" short" -D["u_bits16_t"]=" unsigned short" -D["bits32_t"]=" int" -D["u_bits32_t"]=" unsigned int" -D["bits64_t"]=" char *" -D["HAVE_HASH_BANG_EXEC"]=" 1" -D["PGRP_PIPE"]=" 1" -D["HAVE_POSIX_SIGNALS"]=" 1" -D["HAVE_DECL_AUDIT_USER_TTY"]=" 1" -D["HAVE_SYS_ERRLIST"]=" 1" -D["VOID_SIGHANDLER"]=" 1" -D["HAVE_QUAD_T"]=" 1" -D["HAVE_SOCKLEN_T"]=" 1" -D["RLIMTYPE"]=" rlim_t" -D["SIZEOF_INTMAX_T"]=" 8" -D["TERMIOS_LDISC"]=" 1" -D["TERMIO_LDISC"]=" 1" -D["HAVE_STRUCT_DIRENT_D_INO"]=" 1" -D["HAVE_STRUCT_DIRENT_D_FILENO"]=" 1" -D["STRUCT_WINSIZE_IN_SYS_IOCTL"]=" 1" -D["HAVE_TIMEVAL"]=" 1" -D["HAVE_STRUCT_STAT_ST_BLOCKS"]=" 1" -D["HAVE_STRUCT_TM_TM_ZONE"]=" 1" -D["HAVE_TM_ZONE"]=" 1" -D["HAVE_STRUCT_TIMEZONE"]=" 1" -D["WEXITSTATUS_OFFSET"]=" 8" -D["HAVE_STRUCT_TIMESPEC"]=" 1" -D["TIME_H_DEFINES_STRUCT_TIMESPEC"]=" 1" -D["HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC"]=" 1" -D["TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC"]=" 1" -D["HAVE_SBRK"]=" 1" -D["HAVE_STRSIGNAL"]=" 1" -D["ULIMIT_MAXFDS"]=" 1" -D["HAVE_DECL_FPURGE"]=" 0" -D["CAN_REDEFINE_GETENV"]=" 1" -D["HAVE_POSIX_SIGSETJMP"]=" 1" -D["HAVE_STD_PUTENV"]=" 1" -D["HAVE_STD_UNSETENV"]=" 1" -D["HAVE_PRINTF_A_FORMAT"]=" 1" -D["FNMATCH_EQUIV_FALLBACK"]=" 1" -D["GWINSZ_IN_SYS_IOCTL"]=" 1" -D["FIONREAD_IN_SYS_IOCTL"]=" 1" -D["HAVE_GETPW_DECLS"]=" 1" -D["HAVE_DEV_FD"]=" 1" -D["DEV_FD_PREFIX"]=" \"/dev/fd/\"" -D["HAVE_DEV_STDIN"]=" 1" -D["DEFAULT_MAIL_DIRECTORY"]=" \"/var/mail\"" -D["JOB_CONTROL"]=" 1" -D["PGRP_PIPE"]=" 1" - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { - line = $ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} - ac_datarootdir_hack=' - s&@datadir@&${datarootdir}&g - s&@docdir@&${datarootdir}/doc/${PACKAGE_TARNAME}&g - s&@infodir@&${datarootdir}/info&g - s&@localedir@&${datarootdir}/locale&g - s&@mandir@&${datarootdir}/man&g - s&\${datarootdir}&${prefix}/share&g' ;; -esac -ac_sed_extra="/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -} - -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "po-directories":C) - for ac_file in $CONFIG_FILES; do - # Support "outfile[:infile[:infile...]]" - case "$ac_file" in - *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; - esac - # PO directories have a Makefile.in generated from Makefile.in.in. - case "$ac_file" in */Makefile.in) - # Adjust a relative srcdir. - ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` - ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` - # In autoconf-2.13 it is called $ac_given_srcdir. - # In autoconf-2.50 it is called $srcdir. - test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" - case "$ac_given_srcdir" in - .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; - /*) top_srcdir="$ac_given_srcdir" ;; - *) top_srcdir="$ac_dots$ac_given_srcdir" ;; - esac - # Treat a directory as a PO directory if and only if it has a - # POTFILES.in file. This allows packages to have multiple PO - # directories under different names or in different locations. - if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then - rm -f "$ac_dir/POTFILES" - test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - gt_tab=`printf '\t'` - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" - POMAKEFILEDEPS="POTFILES.in" - # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend - # on $ac_dir but don't depend on user-specified configuration - # parameters. - if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then - # The LINGUAS file contains the set of available languages. - if test -n "$OBSOLETE_ALL_LINGUAS"; then - test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" - fi - ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" - else - # The set of available languages was given in configure.in. - ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS - fi - # Compute POFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) - # Compute UPDATEPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) - # Compute DUMMYPOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) - # Compute GMOFILES - # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) - case "$ac_given_srcdir" in - .) srcdirpre= ;; - *) srcdirpre='$(srcdir)/' ;; - esac - POFILES= - UPDATEPOFILES= - DUMMYPOFILES= - GMOFILES= - for lang in $ALL_LINGUAS; do - POFILES="$POFILES $srcdirpre$lang.po" - UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" - DUMMYPOFILES="$DUMMYPOFILES $lang.nop" - GMOFILES="$GMOFILES $srcdirpre$lang.gmo" - done - # CATALOGS depends on both $ac_dir and the user's LINGUAS - # environment variable. - INST_LINGUAS= - if test -n "$ALL_LINGUAS"; then - for presentlang in $ALL_LINGUAS; do - useit=no - if test "%UNSET%" != "$LINGUAS"; then - desiredlanguages="$LINGUAS" - else - desiredlanguages="$ALL_LINGUAS" - fi - for desiredlang in $desiredlanguages; do - # Use the presentlang catalog if desiredlang is - # a. equal to presentlang, or - # b. a variant of presentlang (because in this case, - # presentlang can be used as a fallback for messages - # which are not translated in the desiredlang catalog). - case "$desiredlang" in - "$presentlang"*) useit=yes;; - esac - done - if test $useit = yes; then - INST_LINGUAS="$INST_LINGUAS $presentlang" - fi - done - fi - CATALOGS= - if test -n "$INST_LINGUAS"; then - for lang in $INST_LINGUAS; do - CATALOGS="$CATALOGS $lang.gmo" - done - fi - test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" - sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" - for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do - if test -f "$f"; then - case "$f" in - *.orig | *.bak | *~) ;; - *) cat "$f" >> "$ac_dir/Makefile" ;; - esac - fi - done - fi - ;; - esac - done ;; - "default":C) -# Makefile uses this timestamp file to record whether config.h is up to date. -echo timestamp > stamp-h - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 diff --git a/bash-5.1/doc/Makefile b/bash-5.1/doc/Makefile deleted file mode 100644 index 638fd4450a32a8f25b741f8d2a73daa9b4b272a4..0000000000000000000000000000000000000000 --- a/bash-5.1/doc/Makefile +++ /dev/null @@ -1,340 +0,0 @@ -# This Makefile is for the Bash/documentation directory -*- text -*-. -# -# Copyright (C) 2003-2015 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -PACKAGE = rash -VERSION = 0.1-release - -PACKAGE_BUGREPORT = bug-rash@gnu.org -PACKAGE_NAME = rash -PACKAGE_STRING = rash 0.1-release -PACKAGE_VERSION = 0.1-release - -PACKAGE_TARNAME = rash - -# -SHELL = /bin/sh -RM = rm -f - -topdir = .. -srcdir = . - - -prefix = /usr/local -exec_prefix = ${prefix} - -datarootdir = ${prefix}/share - -infodir = ${datarootdir}/info - -docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} - -# set this to a directory name to have the HTML files installed -htmldir = ${docdir} - -# Support an alternate destination root directory for package building -DESTDIR = - -mandir = ${datarootdir}/man -manpfx = man - -man1ext = .1 -man1dir = $(mandir)/$(manpfx)1 -man3ext = .3 -man3dir = $(mandir)/$(manpfx)3 - -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -SUPPORT_SRCDIR = $(topdir)/support - -# bad style -RL_LIBDIR = $(topdir)/lib/readline - -# unused -TEXINDEX = texindex -TEX = tex - -MAKEINFO = makeinfo -TEXI2DVI = ${SUPPORT_SRCDIR}/texi2dvi -TEXI2HTML = ${SUPPORT_SRCDIR}/texi2html -MAN2HTML = ${BUILD_DIR}/support/man2html -HTMLPOST = ${srcdir}/htmlpost.sh -QUIETPS = #set this to -q to shut up dvips -PAPERSIZE = letter # change to a4 for A4-size paper -PSDPI = 600 # could be 300 if you like -DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky -# experimental; uses external texi2dvi for now; this needs pdftex to be present -TEXI2PDF = texi2dvi --pdf - -TEXINPUTDIR = $(RL_LIBDIR)/doc -SET_TEXINPUTS = TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS - -# These tools might not be available; they're not required -DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE} -PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@ - -MKDIRS = ${SUPPORT_SRCDIR}/mkdirs - -# This should be a program that converts troff to an ascii-readable format -# added the -P -c for benefit of Mac OS X, which insists on adding colors if -# it's not present -NROFF = groff -Tascii -P -c - -# This should be a program that converts troff to postscript -GROFF = groff - -HSUSER = $(RL_LIBDIR)/doc/hsuser.texi -RLUSER = $(RL_LIBDIR)/doc/rluser.texi - -BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/fdl.texi $(srcdir)/version.texi - -.SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html .pdf - -.1.ps: - $(RM) $@ - -${GROFF} -man $< > $@ - -.1.0: - $(RM) $@ - -${NROFF} -man $< > $@ - -.1.html: - $(RM) $@ - -${MAN2HTML} $< | ${HTMLPOST} > $@ - -.ms.ps: - $(RM) $@ - -${GROFF} -ms $< > $@ - -.ms.txt: - $(RM) $@ - -${NROFF} -ms $< > $@ - -.3.ps: - $(RM) $@ - -${GROFF} -man $< > $@ - -.3.0: - $(RM) $@ - -${NROFF} -man $< > $@ - -.3.html: - $(RM) $@ - -${MAN2HTML} $< > $@ - -.ps.pdf: - $(RM) $@ - -${PSPDF} $< - -.dvi.pdf: - $(RM) $@ - -${DVIPDF} $< - -.dvi.ps: - ${RM} $@ - -${DVIPS} $< - -#.texi.pdf: -# $(RM) $@ -# -${TEXI2PDF} $< - -all: ps info dvi text html $(MAN2HTML) -nodvi: ps info text html -everything: all pdf - -PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps -DVIFILES = bashref.dvi bashref.ps -INFOFILES = bashref.info bash.info -MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0 -HTMLFILES = bashref.html bash.html -PDFFILES = bash.pdf bashref.pdf article.pdf rose94.pdf - -ps: ${PSFILES} -dvi: ${DVIFILES} -info: ${INFOFILES} -text: ${MAN0FILES} -html: ${HTMLFILES} -pdf: ${PDFFILES} - -bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER) - ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; } - -bashref.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER) - $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi - -# experimental -bashref.pdf: $(BASHREF_FILES) $(HSUSER) $(RLUSER) - ${SET_TEXINPUTS} $(TEXI2PDF) $(srcdir)/bashref.texi || { ${RM} $@ ; exit 1; } - - -# can also use: -# $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/bashref.texi -bashref.html: $(BASHREF_FILES) $(HSUSER) $(RLUSER) - $(MAKEINFO) --html --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi - -bash.info: $(BASHREF_FILES) $(HSUSER) $(RLUSER) - $(MAKEINFO) --no-split -I$(TEXINPUTDIR) $(srcdir)/bashref.texi -o $@ - -bash.txt: bash.1 -bash.ps: bash.1 -bash.html: bash.1 -bashbug.ps: bashbug.1 -builtins.ps: builtins.1 bash.1 -rbash.ps: rbash.1 bash.1 -bash.0: bash.1 -bashbug.0: bashbug.1 -builtins.0: builtins.1 bash.1 -rbash.0: rbash.1 bash.1 -article.ps: article.ms - -bashref.ps: bashref.dvi - -article.pdf: article.ps -#bashref.pdf: bashref.dvi -# experimental -bashref.pdf: bashref.texi -bash.pdf: bash.ps -rose94.pdf: rose94.ps - -OTHER_DOCS = $(srcdir)/FAQ $(srcdir)/INTRO -OTHER_INSTALLED_DOCS = FAQ INTRO - -$(MAN2HTML): ${topdir}/support/man2html.c - -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html) - -clean: - $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \ - *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o - ${RM} core *.core - -mostlyclean: clean - $(RM) Makefile - -distclean: clean maybe-clean - $(RM) Makefile - -maintainer-clean: clean - ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES} - ${RM} ${CREATED_FAQ} - $(RM) Makefile - -maybe-clean: - -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \ - $(RM) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \ - fi - -installdirs: - -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir) - -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir) - -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(docdir) - -if test -n "$(htmldir)" ; then \ - $(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \ - fi - -install: info installdirs - -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext} - -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext} - -$(INSTALL_DATA) $(OTHER_DOCS) $(DESTDIR)$(docdir) -# uncomment the next lines to install the builtins man page -# sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1 -# -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext} -# -$(RM) $${TMPDIR:-/var/tmp}/builtins.1 - -if test -f bash.info; then d=.; else d=$(srcdir); fi; \ - $(INSTALL_DATA) $$d/bash.info $(DESTDIR)$(infodir)/bash.info -# run install-info if it is present to update the info directory - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ - install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \ - else true; fi -# if htmldir is set, install the html files into that directory - -if test -n "${htmldir}" ; then \ - $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \ - $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \ - fi - -install_builtins: installdirs - sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1 - -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext} - -$(RM) $${TMPDIR:-/var/tmp}/builtins.1 - -install_everything: install install_builtins - -install-html: html - -if test -n "${htmldir}" ; then \ - $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \ - $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \ - fi - -uninstall: - -$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext} - -$(RM) $(DESTDIR)$(man1dir)/bash_builtins${man1ext} - $(RM) $(DESTDIR)$(infodir)/bash.info -# run install-info if it is present to update the info directory - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ - install-info --delete --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \ - else true; fi - -( cd $(DESTDIR)$(docdir) && $(RM) $(OTHER_INSTALLED_DOCS) ) - -if test -n "$(htmldir)" ; then \ - $(RM) $(DESTDIR)$(htmldir)/bash.html ; \ - $(RM) $(DESTDIR)$(htmldir)/bashref.html ; \ - fi - -# for use by chet -CREATED_FAQ = faq.news faq.news2 faq.mail faq.version - -faq: ${CREATED_FAQ} - -faq.version: FAQ.version FAQ - sh mkfaqvers FAQ.version > $@ - -faq.headers.mail: FAQ.headers.mail FAQ - sh mkfaqvers FAQ.headers.mail > $@ - -faq.headers.news: FAQ.headers.news FAQ - sh mkfaqvers FAQ.headers.news > $@ - -faq.headers.news2: FAQ.headers.news2 FAQ - sh mkfaqvers FAQ.headers.news2 > $@ - -faq.news: FAQ faq.headers.news faq.version - $(RM) $@ - cat faq.headers.news faq.version FAQ > $@ - -faq.news2: FAQ faq.headers.news2 faq.version - $(RM) $@ - cat faq.headers.news2 faq.version FAQ > $@ - -faq.mail: FAQ faq.headers.mail faq.version - $(RM) $@ - cat faq.headers.mail faq.version FAQ > $@ - -inst: bashref.texi - $(SHELL) ./mkinstall - cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL - $(RM) INSTALL - -posix: bashref.texi - $(SHELL) ./mkposix - cmp -s POSIX ../POSIX || mv POSIX ../POSIX - $(RM) POSIX - -rbash: bashref.texi - $(SHELL) ./mkrbash - cmp -s RBASH ../RBASH || mv RBASH ../RBASH - $(RM) RBASH - -xdist: everything inst posix rbash diff --git a/bash-5.1/examples/loadables/Makefile b/bash-5.1/examples/loadables/Makefile deleted file mode 100644 index 7e7f007fefb741aa548d780e1a2e3328bb5289d7..0000000000000000000000000000000000000000 --- a/bash-5.1/examples/loadables/Makefile +++ /dev/null @@ -1,324 +0,0 @@ -# -# Simple makefile for the sample loadable builtins -# -# Copyright (C) 1996-2019 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -PACKAGE = rash -VERSION = 0.1-release - -# Include some boilerplate Gnu makefile definitions. -prefix = /usr/local - -exec_prefix = ${prefix} -bindir = ${exec_prefix}/bin -libdir = ${exec_prefix}/lib -infodir = ${datarootdir}/info -includedir = ${prefix}/include - -datarootdir = ${prefix}/share - -loadablesdir = ${libdir}/bash -headersdir = $(includedir)/$(PACKAGE_NAME) - -topdir = ../.. -BUILD_DIR = /home/tong/src/bash/bash-5.1 -srcdir = . - - -# Support an alternate destination root directory for package building -DESTDIR = - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 -INSTALLMODE= -m 0755 - - -CC = gcc -RM = rm -f - -SHELL = /bin/sh - -host_os = linux-gnu -host_cpu = x86_64 -host_vendor = pc - -CFLAGS = -O2 -g -LOCAL_CFLAGS = -DEFS = -DHAVE_CONFIG_H -LOCAL_DEFS = -DSHELL - -CPPFLAGS = - -BASHINCDIR = ${topdir}/include - -SUPPORT_SRC = $(topdir)/support/ - -LIBBUILD = ${BUILD_DIR}/lib - -INTL_LIBSRC = ${topdir}/lib/intl -INTL_BUILDDIR = ${LIBBUILD}/intl -INTL_INC = -LIBINTL_H = - -CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CPPFLAGS) $(CFLAGS) - -# -# These values are generated for configure by ${topdir}/support/shobj-conf. -# If your system is not supported by that script, but includes facilities for -# dynamic loading of shared objects, please update the script and send the -# changes to bash-maintainers@gnu.org. -# -SHOBJ_CC = gcc -SHOBJ_CFLAGS = -fPIC -SHOBJ_LD = ${CC} -SHOBJ_LDFLAGS = -shared -Wl,-soname,$@ -SHOBJ_XLDFLAGS = -SHOBJ_LIBS = -SHOBJ_STATUS = supported - -INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins -I${srcdir} \ - -I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \ - -I$(BUILD_DIR)/builtins $(INTL_INC) - -.c.o: - $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $< - - -ALLPROG = print truefalse sleep finfo logname basename dirname fdflags \ - tty pathchk tee head mkdir rmdir mkfifo mktemp printenv id whoami \ - uname sync push ln unlink realpath strftime mypid setpgid seq rm \ - accept csv cut -OTHERPROG = necho hello cat pushd stat asort - -all: $(SHOBJ_STATUS) - -supported: $(ALLPROG) -others: $(OTHERPROG) - -unsupported: - @echo "Your system (${host_os}) is not supported by the" - @echo "${topdir}/support/shobj-conf script." - @echo "If your operating system provides facilities for dynamic" - @echo "loading of shared objects using the dlopen(3) interface," - @echo "please update the script and re-run configure." - @echo "Please send the changes you made to bash-maintainers@gnu.org" - @echo "for inclusion in future bash releases." - -everything: supported others - -print: print.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ print.o $(SHOBJ_LIBS) - -necho: necho.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ necho.o $(SHOBJ_LIBS) - -hello: hello.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ hello.o $(SHOBJ_LIBS) - -truefalse: truefalse.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ truefalse.o $(SHOBJ_LIBS) - -accept: accept.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ accept.o $(SHOBJ_LIBS) - -sleep: sleep.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sleep.o $(SHOBJ_LIBS) - -finfo: finfo.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ finfo.o $(SHOBJ_LIBS) - -cat: cat.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cat.o $(SHOBJ_LIBS) - -rm: rm.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ rm.o $(SHOBJ_LIBS) - -fdflags: fdflags.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ fdflags.o $(SHOBJ_LIBS) - -seq: seq.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ seq.o $(SHOBJ_LIBS) - -logname: logname.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ logname.o $(SHOBJ_LIBS) - -basename: basename.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ basename.o $(SHOBJ_LIBS) - -dirname: dirname.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ dirname.o $(SHOBJ_LIBS) - -tty: tty.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ tty.o $(SHOBJ_LIBS) - -pathchk: pathchk.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pathchk.o $(SHOBJ_LIBS) - -tee: tee.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ tee.o $(SHOBJ_LIBS) - -mkdir: mkdir.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mkdir.o $(SHOBJ_LIBS) - -rmdir: rmdir.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ rmdir.o $(SHOBJ_LIBS) - -mkfifo: mkfifo.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mkfifo.o $(SHOBJ_LIBS) - -mktemp: mktemp.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mktemp.o $(SHOBJ_LIBS) - -head: head.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ head.o $(SHOBJ_LIBS) - -printenv: printenv.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ printenv.o $(SHOBJ_LIBS) - -id: id.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ id.o $(SHOBJ_LIBS) - -whoami: whoami.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ whoami.o $(SHOBJ_LIBS) - -uname: uname.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ uname.o $(SHOBJ_LIBS) - -sync: sync.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sync.o $(SHOBJ_LIBS) - -push: push.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ push.o $(SHOBJ_LIBS) - -ln: ln.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ ln.o $(SHOBJ_LIBS) - -unlink: unlink.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ unlink.o $(SHOBJ_LIBS) - -realpath: realpath.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ realpath.o $(SHOBJ_LIBS) - -csv: csv.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ csv.o $(SHOBJ_LIBS) - -cut: cut.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS) - -strftime: strftime.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ strftime.o $(SHOBJ_LIBS) - -mypid: mypid.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mypid.o $(SHOBJ_LIBS) - -setpgid: setpgid.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ setpgid.o $(SHOBJ_LIBS) - -stat: stat.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ stat.o $(SHOBJ_LIBS) - -asort: asort.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ asort.o $(SHOBJ_LIBS) - -# pushd is a special case. We use the same source that the builtin version -# uses, with special compilation options. -# -pushd.c: ${topdir}/builtins/pushd.def - $(RM) $@ - ${BUILD_DIR}/builtins/mkbuiltins -D ${topdir}/builtins ${topdir}/builtins/pushd.def - -pushd.o: pushd.c - $(RM) $@ - $(SHOBJ_CC) -DHAVE_CONFIG_H -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INC) -c -o $@ $< - -pushd: pushd.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pushd.o $(SHOBJ_LIBS) - -clean: - $(RM) $(ALLPROG) $(OTHERPROG) *.o - -( cd perl && ${MAKE} ${MFLAGS} $@ ) - -mostlyclean: clean - -( cd perl && ${MAKE} ${MFLAGS} $@ ) - -distclean maintainer-clean: clean - $(RM) Makefile Makefile.inc pushd.c - -( cd perl && ${MAKE} ${MFLAGS} $@ ) - -installdirs: - @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(loadablesdir) - -install-dev: installdirs - @$(INSTALL_DATA) Makefile.inc $(DESTDIR)$(loadablesdir)/Makefile.inc - @$(INSTALL_DATA) $(srcdir)/loadables.h $(DESTDIR)$(loadablesdir)/loadables.h - @( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" install-headers) - -install-supported: all installdirs install-dev - @echo installing example loadable builtins in $(DESTDIR)${loadablesdir} - @for prog in ${ALLPROG}; do \ - echo $$prog ; \ - $(INSTALL_PROGRAM) $(INSTALLMODE) $$prog $(DESTDIR)$(loadablesdir)/$$prog ;\ - done - -uninstall-dev: - -$(RM) $(DESTDIR)$(loadablesdir)/Makefile.inc $(DESTDIR)$(loadablesdir)/loadables.h - -( cd $(BUILD_DIR) && ${MAKE} ${MFLAGS} DESTDIR="$(DESTDIR)" uninstall-headers) - -uninstall-supported: uninstall-dev - -( cd $(DESTDIR)${loadablesdir} && $(RM) ${ALLPROG} ) - -install-unsupported: -uninstall-unsupported: - -install: install-$(SHOBJ_STATUS) -uninstall: uninstall-$(SHOBJ_STATUS) - -print.o: print.c -truefalse.o: truefalse.c -accept.o: accept.c -sleep.o: sleep.c -finfo.o: finfo.c -logname.o: logname.c -basename.o: basename.c -dirname.o: dirname.c -tty.o: tty.c -pathchk.o: pathchk.c -tee.o: tee.c -head.o: head.c -rmdir.o: rmdir.c -necho.o: necho.c -hello.o: hello.c -cat.o: cat.c -csv.o: csv.c -cut.o: cut.c -printenv.o: printenv.c -id.o: id.c -whoami.o: whoami.c -uname.o: uname.c -sync.o: sync.c -push.o: push.c -mkdir.o: mkdir.c -mktemp.o: mktemp.c -realpath.o: realpath.c -strftime.o: strftime.c -setpgid.o: setpgid.c -stat.o: stat.c -fdflags.o: fdflags.c -seq.o: seq.c -asort.o: asort.c diff --git a/bash-5.1/examples/loadables/Makefile.inc b/bash-5.1/examples/loadables/Makefile.inc deleted file mode 100644 index ea62e4017e1bff479715ddf3dd343569dfec8063..0000000000000000000000000000000000000000 --- a/bash-5.1/examples/loadables/Makefile.inc +++ /dev/null @@ -1,108 +0,0 @@ -# -# Sample makefile for bash loadable builtin development -# -# Copyright (C) 2015 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -PACKAGE = rash -VERSION = 0.1-release - -PACKAGE_NAME = rash -PACKAGE_VERSION = 0.1-release - -# Include some boilerplate Gnu makefile definitions. -prefix = /usr/local - -exec_prefix = ${prefix} -bindir = ${exec_prefix}/bin -libdir = ${exec_prefix}/lib -infodir = ${datarootdir}/info -includedir = ${prefix}/include - -datarootdir = ${prefix}/share - -loadablesdir = ${libdir}/bash -headersdir = $(includedir)/$(PACKAGE_NAME) - -topdir = ../.. -BUILD_DIR = /home/tong/src/bash/bash-5.1 -srcdir = . - - -# Support an alternate destination root directory for package building -DESTDIR = - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_SCRIPT = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 -INSTALLMODE= -m 0755 - - -CC = gcc -RM = rm -f - -SHELL = /bin/sh - -host_os = linux-gnu -host_cpu = x86_64 -host_vendor = pc - -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -LOCAL_CFLAGS = -DEFS = -DHAVE_CONFIG_H -LOCAL_DEFS = -DSHELL - -CPPFLAGS = - -BASHINCDIR = ${topdir}/include - -SUPPORT_SRC = $(topdir)/support/ - -LIBBUILD = ${BUILD_DIR}/lib - -INTL_LIBSRC = ${topdir}/lib/intl -INTL_BUILDDIR = ${LIBBUILD}/intl -INTL_INC = -LIBINTL_H = - -CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS) - -# -# These values are generated for configure by ${topdir}/support/shobj-conf. -# If your system is not supported by that script, but includes facilities for -# dynamic loading of shared objects, please update the script and send the -# changes to bash-maintainers@gnu.org. -# -SHOBJ_CC = gcc -SHOBJ_CFLAGS = -fPIC -SHOBJ_LD = ${CC} -SHOBJ_LDFLAGS = -shared -Wl,-soname,$@ -SHOBJ_XLDFLAGS = -SHOBJ_LIBS = -SHOBJ_STATUS = supported - -INC = -I$(headersdir) -I$(headersdir)/include -I$(headersdir)/builtins - -.c.o: - $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $< - -all: example - -example: example.o - $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ example.o $(SHOBJ_LIBS) - -example.o: example.c diff --git a/bash-5.1/examples/loadables/perl/Makefile b/bash-5.1/examples/loadables/perl/Makefile deleted file mode 100644 index 0ec335f1aefcf3e153bfad5fa1db9db15490fdba..0000000000000000000000000000000000000000 --- a/bash-5.1/examples/loadables/perl/Makefile +++ /dev/null @@ -1,99 +0,0 @@ -# -# Makefile for builtin perl interpreter -# -# -# Copyright (C) 1998 Free Software Foundation, Inc. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# - -# Include some boilerplate Gnu makefile definitions. -prefix = /usr/local -exec_prefix = ${prefix} - -bindir = ${exec_prefix}/bin -libdir = ${exec_prefix}/lib -infodir = ${datarootdir}/info -includedir = ${prefix}/include - -datarootdir = ${prefix}/share - -topdir = ../../.. -BUILD_DIR = /home/tong/src/bash/bash-5.1 -srcdir = . - - - -CC = gcc -RM = rm -f - -SHELL = /bin/sh - -PERL5 = perl5 - -CFLAGS = -O2 -g - -# -# These values are generated for configure by ${topdir}/support/shobj-conf. -# If your system is not supported by that script, but includes facilities for -# dynamic loading of shared objects, please update the script and send the -# changes to bash-maintainers@gnu.org. -# -SHOBJ_CC = gcc -SHOBJ_CFLAGS = -fPIC -SHOBJ_LD = ${CC} -SHOBJ_LDFLAGS = -shared -Wl,-soname,$@ -SHOBJ_XLDFLAGS = -SHOBJ_LIBS = -SHOBJ_STATUS = supported - -# Values used for compiling the perl files -PERL_LDOPTS = `${PERL5} -MExtUtils::Embed -e ldopts` -PERL_CFLAGS = ${CCFLAGS} `${PERL5} -MExtUtils::Embed -e ccopts` - -SRC = bperl.c iperl.c perlxsi.c -OBJ = bperl.o iperl.o perlxsi.o - -BUILTIN = bperl5 - -INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \ - -I$(topdir)/include -I$(BUILD_DIR) -I$(BUILD_DIR)/lib \ - -I$(BUILD_DIR)/builtins - - -${BUILTIN}: ${OBJ} - ${RM} $@ - ${SHOBJ_LD} ${SHOBJ_LDFLAGS} ${SHOBJ_XLDFLAGS} -o $@ ${OBJ} ${PERL_LDOPTS} ${SHOBJ_LIBS} - -bperl.o: bperl.c - ${RM} $@ - $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CFLAGS) $(INC) -c -o $@ ${srcdir}/bperl.c - -iperl.o: iperl.c - ${RM} $@ - $(SHOBJ_CC) ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ ${srcdir}/iperl.c - -perlxsi.c: - ${PERL5} -MExtUtils::Embed -e xsinit -- -o $@ - -perlxsi.o: perlxsi.c - ${RM} $@ - ${SHOBJ_CC} ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ perlxsi.c - -clean mostlyclean: - ${RM} ${OBJ} - ${RM} ${BUILTIN} - -distclean maintainer-clean: clean - ${RM} perlxsi.c diff --git a/bash-5.1/gen.sh b/bash-5.1/gen.sh new file mode 100755 index 0000000000000000000000000000000000000000..5e6dbd5b676c1c3f512d596d9eaed8cd029ab467 --- /dev/null +++ b/bash-5.1/gen.sh @@ -0,0 +1,32 @@ +export utshell_dir=/home/huan/gerrit/bash; +export euler_dir=/home/huan/gerrit/utshell; +export count=0`tail -1 ${euler_dir}/record.txt`; +echo $euler_dir +echo $utshell_dir +while read line ; do +let count=count+1; +echo $line|awk -F'$' '{ +print "echo cd " ENVIRON["euler_dir"] ";"; +print "cd " ENVIRON["euler_dir"] ";"; +print "echo git checkout -b bv" ENVIRON["count"] ";"; +print "git checkout -b bv" ENVIRON["count"] ";"; +print "cd " ENVIRON["utshell_dir"] ";"; +print "echo cd " ENVIRON["utshell_dir"] ";"; +print "git reset --hard ",$1," ; "; +print "echo git reset --hard ",$1," ; "; +print "cp -r " ENVIRON["utshell_dir"] "//* " ENVIRON["euler_dir"] ";" +print "echo cp -r " ENVIRON["utshell_dir"] "//* " ENVIRON["euler_dir"] ";" +print "cd " ENVIRON["euler_dir"]; +print "echo cd " ENVIRON["euler_dir"] ";" +print "echo " ENVIRON["count"] " >> record.txt"; +print "echo echo " $1 " to record.txt ; "; +print "git add .;" +print "echo git add .;" +print "git commit -m \"" $2 "\""; +print "echo git commit -m " $2," ;"; +print "git push origin bv" ENVIRON["count"] ; +print "echo git push origin bv" ENVIRON["count"] ";"; +print "cd " ENVIRON["utshell_dir"]; +print "echo cd " ENVIRON["utshell_dir"] ";" +print "read "; +}' ; done < ../1 >./x.sh diff --git a/bash-5.1/lib/glob/Makefile b/bash-5.1/lib/glob/Makefile deleted file mode 100644 index 7fc78b7756b51e04b6ffbb89a044899239479805..0000000000000000000000000000000000000000 --- a/bash-5.1/lib/glob/Makefile +++ /dev/null @@ -1,168 +0,0 @@ -## -*- text -*- #################################################### -# # -# Makefile for the GNU Glob Library. # -# # -#################################################################### -# -# Copyright (C) 1996-2009 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -srcdir = . - -topdir = ../.. -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -CC = gcc -RANLIB = ranlib -AR = ar -ARFLAGS = cr -RM = rm -f -CP = cp -MV = mv - -SHELL = /bin/sh - -PROFILE_FLAGS = - -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -LOCAL_CFLAGS = -CPPFLAGS = -LDFLAGS = -rdynamic - -DEFS = -DHAVE_CONFIG_H -LOCAL_DEFS = -DSHELL - -BASHINCDIR = ${topdir}/include - -INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib - -CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) ${INCLUDES} $(CPPFLAGS) \ - $(LOCAL_CFLAGS) $(CFLAGS) ${ADDON_CFLAGS} - -# Here is a rule for making .o files from .c files that doesn't force -# the type of the machine (like -sun3) into the flags. -.c.o: - $(RM) $@ - $(CC) -c $(CCFLAGS) $< - -# The name of the library target. -LIBRARY_NAME = libglob.a - -# The C code source files for this library. -CSOURCES = $(srcdir)/glob.c $(srcdir)/strmatch.c $(srcdir)/smatch.c \ - $(srcdir)/xmbsrtowcs.c - -# The header files for this library. -HSOURCES = $(srcdir)/strmatch.h - -OBJECTS = glob.o strmatch.o smatch.o xmbsrtowcs.o gmisc.o - -# The texinfo files which document this library. -DOCSOURCE = doc/glob.texi -DOCOBJECT = doc/glob.dvi -DOCSUPPORT = doc/Makefile -DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) - -SUPPORT = Makefile ChangeLog $(DOCSUPPORT) - -SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE) - -THINGS_TO_TAR = $(SOURCES) $(SUPPORT) - -###################################################################### - -all: $(LIBRARY_NAME) - -$(LIBRARY_NAME): $(OBJECTS) - $(RM) -f $@ - $(AR) $(ARFLAGS) $@ $(OBJECTS) - -test -n "$(RANLIB)" && $(RANLIB) $@ - -what-tar: - @for file in $(THINGS_TO_TAR); do \ - echo $(selfdir)$$file; \ - done - -documentation: force - -(cd doc; $(MAKE) $(MFLAGS)) -force: - -# The rule for 'includes' is written funny so that the if statement -# always returns TRUE unless there really was an error installing the -# include files. -install: - -clean: - rm -f $(OBJECTS) $(LIBRARY_NAME) - -(cd doc && $(MAKE) $(MFLAGS) $@ ) - -realclean distclean maintainer-clean: clean - -( cd doc && $(MAKE) $(MFLAGS) $@ ) - $(RM) -f Makefile - -mostlyclean: clean - -( cd doc && $(MAKE) $(MFLAGS) $@ ) - -${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile - -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h ) - -###################################################################### -# # -# Dependencies for the object files which make up this library. # -# # -###################################################################### - -smatch.o: strmatch.h -smatch.o: $(BUILD_DIR)/config.h -smatch.o: $(BASHINCDIR)/chartypes.h -smatch.o: $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h -smatch.o: $(BASHINCDIR)/shmbutil.h -smatch.o: $(topdir)/xmalloc.h - -strmatch.o: strmatch.h -strmatch.o: $(BUILD_DIR)/config.h -strmatch.o: $(BASHINCDIR)/stdc.h - -glob.o: $(BUILD_DIR)/config.h -glob.o: $(topdir)/shell.h $(BUILD_DIR)/pathnames.h -glob.o: $(topdir)/bashtypes.h $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h -glob.o: $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/memalloc.h -glob.o: strmatch.h glob.h -glob.o: $(BASHINCDIR)/shmbutil.h -glob.o: $(topdir)/xmalloc.h - -gmisc.o: $(BUILD_DIR)/config.h -gmisc.o: $(topdir)/bashtypes.h $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h -gmisc.o: $(BASHINCDIR)/shmbutil.h - -xmbsrtowcs.o: ${BUILD_DIR}/config.h -xmbsrtowcs.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -xmbsrtowcs.o: ${BASHINCDIR}/shmbutil.h - -# Rules for deficient makes, like SunOS and Solaris -glob.o: glob.c -gmisc.o: gmisc.c -strmatch.o: strmatch.c -smatch.o: smatch.c -xmbsrtowcs.o: xmbsrtowcs.c - -# dependencies for C files that include other C files -glob.o: glob_loop.c -gmisc.o: gm_loop.c -smatch.o: sm_loop.c diff --git a/bash-5.1/lib/intl/Makefile b/bash-5.1/lib/intl/Makefile deleted file mode 100644 index 79f747a96b7092f1792b7ebd92d1bc01ac7101bd..0000000000000000000000000000000000000000 --- a/bash-5.1/lib/intl/Makefile +++ /dev/null @@ -1,472 +0,0 @@ -# Makefile for directory with message catalog handling library of GNU gettext -# Copyright (C) 1995-1998, 2000-2003, 2008,2009 Free Software Foundation, Inc. -# - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -PACKAGE = rash -VERSION = 0.1-release - -SHELL = /bin/sh - -srcdir = . -top_srcdir = ../.. -top_builddir = /home/tong/src/bash/bash-5.1 - - -prefix = /usr/local -exec_prefix = ${prefix} -transform = s,x,x, - -datarootdir = ${prefix}/share - -libdir = ${exec_prefix}/lib -includedir = ${prefix}/include -datadir = ${datarootdir} -localedir = ${datarootdir}/locale - -gettextsrcdir = $(datadir)/gettext/intl -aliaspath = $(localedir) -subdir = intl - - - -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -MKINSTALLDIRS = @MKINSTALLDIRS@ -mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) - -l = - -AR = ar -CC = gcc -LIBTOOL = @LIBTOOL@ -RANLIB = ranlib -YACC = bison -y -d -YFLAGS = --name-prefix=__gettext - -ARFLAGS = cr - -LOCAL_DEFS = -DSHELL - -DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \ --DLIBDIR=\"$(prefix)/libdata\" -DIN_LIBINTL \ --DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \ --Dset_relocation_prefix=libintl_set_relocation_prefix \ --Drelocate=libintl_relocate \ --DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H ${LOCAL_DEFS} -CPPFLAGS = -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -LDFLAGS = -LIBS = -ldl - -COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) - -HEADERS = \ - gmo.h \ - gettextP.h \ - hash-string.h \ - loadinfo.h \ - plural-exp.h \ - eval-plural.h \ - localcharset.h \ - relocatable.h \ - os2compat.h \ - libgnuintl.h.in -SOURCES = \ - bindtextdom.c \ - dcgettext.c \ - dgettext.c \ - gettext.c \ - finddomain.c \ - loadmsgcat.c \ - localealias.c \ - textdomain.c \ - l10nflist.c \ - explodename.c \ - dcigettext.c \ - dcngettext.c \ - dngettext.c \ - ngettext.c \ - plural.y \ - plural-exp.c \ - localcharset.c \ - relocatable.c \ - localename.c \ - log.c \ - osdep.c \ - os2compat.c \ - intl-compat.c -OBJECTS = \ - bindtextdom.$lo \ - dcgettext.$lo \ - dgettext.$lo \ - gettext.$lo \ - finddomain.$lo \ - loadmsgcat.$lo \ - localealias.$lo \ - textdomain.$lo \ - l10nflist.$lo \ - explodename.$lo \ - dcigettext.$lo \ - dcngettext.$lo \ - dngettext.$lo \ - ngettext.$lo \ - plural.$lo \ - plural-exp.$lo \ - localcharset.$lo \ - relocatable.$lo \ - localename.$lo \ - log.$lo \ - osdep.$lo \ - intl-compat.$lo -DISTFILES.common = Makefile.in \ -config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES) -DISTFILES.generated = plural.c -DISTFILES.normal = VERSION -DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \ -Makefile.vms libgnuintl.h.msvc-shared README.woe32 Makefile.msvc -DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \ -COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h - -all: all-no -all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed -all-no: all-no-no -all-no-yes: libgnuintl.$la -all-no-no: - -libintl.a libgnuintl.a: $(OBJECTS) - rm -f $@ - $(AR) $(ARFLAGS) $@ $(OBJECTS) - $(RANLIB) $@ - -libintl.la libgnuintl.la: $(OBJECTS) - $(LIBTOOL) --mode=link \ - $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \ - $(OBJECTS) $(LIBS) \ - -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \ - -rpath $(libdir) \ - -no-undefined - -# Libtool's library version information for libintl. -# Before making a gettext release, the gettext maintainer must change this -# according to the libtool documentation, section "Library interface versions". -# Maintainers of other packages that include the intl directory must *not* -# change these values. -LTV_CURRENT=5 -LTV_REVISION=0 -LTV_AGE=3 - -.SUFFIXES: -.SUFFIXES: .c .y .o .lo .sin .sed - -.c.o: - $(COMPILE) $< - -.y.c: - $(YACC) $(YFLAGS) --output $@ $< - rm -f $*.h - -bindtextdom.lo: $(srcdir)/bindtextdom.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c -dcgettext.lo: $(srcdir)/dcgettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c -dgettext.lo: $(srcdir)/dgettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c -gettext.lo: $(srcdir)/gettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c -finddomain.lo: $(srcdir)/finddomain.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c -loadmsgcat.lo: $(srcdir)/loadmsgcat.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c -localealias.lo: $(srcdir)/localealias.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c -textdomain.lo: $(srcdir)/textdomain.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c -l10nflist.lo: $(srcdir)/l10nflist.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c -explodename.lo: $(srcdir)/explodename.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c -dcigettext.lo: $(srcdir)/dcigettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c -dcngettext.lo: $(srcdir)/dcngettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c -dngettext.lo: $(srcdir)/dngettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c -ngettext.lo: $(srcdir)/ngettext.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c -plural.lo: $(srcdir)/plural.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c -plural-exp.lo: $(srcdir)/plural-exp.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c -localcharset.lo: $(srcdir)/localcharset.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c -relocatable.lo: $(srcdir)/relocatable.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c -localename.lo: $(srcdir)/localename.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c -log.lo: $(srcdir)/log.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c -osdep.lo: $(srcdir)/osdep.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c -intl-compat.lo: $(srcdir)/intl-compat.c - $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c - -ref-add.sed: $(srcdir)/ref-add.sin - sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed - mv t-ref-add.sed ref-add.sed -ref-del.sed: $(srcdir)/ref-del.sin - sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed - mv t-ref-del.sed ref-del.sed - -INCLUDES = -I. -I$(srcdir) -I${top_builddir} -I${top_srcdir} - -libgnuintl.h: $(srcdir)/libgnuintl.h.in - cp $(srcdir)/libgnuintl.h.in libgnuintl.h - -libintl.h: libgnuintl.h - cmp libgnuintl.h libintl.h || cp libgnuintl.h libintl.h - -charset.alias: $(srcdir)/config.charset - $(SHELL) $(srcdir)/config.charset 'x86_64-pc-linux-gnu' > t-$@ - mv t-$@ $@ - -check: all - -# We must not install the libintl.h/libintl.a files if we are on a -# system which has the GNU gettext() function in its C library or in a -# separate library. -# If you want to use the one which comes with this version of the -# package, you have to use `configure --with-included-gettext'. -install: install-exec install-data -install-exec: all - if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ - && test 'no' = yes; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ - $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \ - $(LIBTOOL) --mode=install \ - $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \ - if test "@RELOCATABLE@" = yes; then \ - dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \ - if test -n "$dependencies"; then \ - rm -f $(DESTDIR)$(libdir)/libintl.la; \ - fi; \ - fi; \ - else \ - : ; \ - fi - if test "$(PACKAGE)" = "gettext-tools" \ - && test 'no' = no; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir); \ - $(LIBTOOL) --mode=install \ - $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \ - rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ - $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \ - $(LIBTOOL) --mode=uninstall \ - rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \ - else \ - : ; \ - fi - if test 'no' = yes; then \ - $(mkinstalldirs) $(DESTDIR)$(localedir); \ - test -f $(DESTDIR)$(localedir)/locale.alias \ - && orig=$(DESTDIR)$(localedir)/locale.alias \ - || orig=$(srcdir)/locale.alias; \ - temp=$(DESTDIR)$(localedir)/t-locale.alias; \ - dest=$(DESTDIR)$(localedir)/locale.alias; \ - sed -f ref-add.sed $$orig > $$temp; \ - $(INSTALL_DATA) $$temp $$dest; \ - rm -f $$temp; \ - else \ - : ; \ - fi -install-data: all - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ - $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \ - $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \ - dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \ - for file in $$dists; do \ - $(INSTALL_DATA) $(srcdir)/$$file \ - $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \ - dists="$(DISTFILES.generated)"; \ - for file in $$dists; do \ - if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ - $(INSTALL_DATA) $$dir/$$file \ - $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - dists="$(DISTFILES.obsolete)"; \ - for file in $$dists; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi - -install-strip: install - -installdirs: - if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ - && test 'no' = yes; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \ - else \ - : ; \ - fi - if test "$(PACKAGE)" = "gettext-tools" \ - && test 'no' = no; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir); \ - else \ - : ; \ - fi - if test 'no' = yes; then \ - test yes != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \ - $(mkinstalldirs) $(DESTDIR)$(localedir); \ - else \ - : ; \ - fi - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ - else \ - : ; \ - fi - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: - if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \ - && test 'no' = yes; then \ - rm -f $(DESTDIR)$(includedir)/libintl.h; \ - $(LIBTOOL) --mode=uninstall \ - rm -f $(DESTDIR)$(libdir)/libintl.$la; \ - else \ - : ; \ - fi - if test "$(PACKAGE)" = "gettext-tools" \ - && test 'no' = no; then \ - rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \ - else \ - : ; \ - fi - if test 'no' = yes; then \ - if test -f $(DESTDIR)$(prefix)/libdata/charset.alias; then \ - temp=$(DESTDIR)$(prefix)/libdata/t-charset.alias; \ - dest=$(DESTDIR)$(prefix)/libdata/charset.alias; \ - sed -f ref-del.sed $$dest > $$temp; \ - if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ - rm -f $$dest; \ - else \ - $(INSTALL_DATA) $$temp $$dest; \ - fi; \ - rm -f $$temp; \ - fi; \ - if test -f $(DESTDIR)$(localedir)/locale.alias; then \ - temp=$(DESTDIR)$(localedir)/t-locale.alias; \ - dest=$(DESTDIR)$(localedir)/locale.alias; \ - sed -f ref-del.sed $$dest > $$temp; \ - if grep '^# Packages using this file: $$' $$temp > /dev/null; then \ - rm -f $$dest; \ - else \ - $(INSTALL_DATA) $$temp $$dest; \ - fi; \ - rm -f $$temp; \ - fi; \ - else \ - : ; \ - fi - if test "$(PACKAGE)" = "gettext-tools"; then \ - for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi - -info dvi ps pdf html: - -$(OBJECTS): ${top_builddir}/config.h libgnuintl.h -bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h -dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h -explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h -dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h -dcigettext.$lo: $(srcdir)/eval-plural.h -localcharset.$lo: $(srcdir)/localcharset.h -localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h - -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) - -ctags: CTAGS - -CTAGS: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES) - -id: ID - -ID: $(HEADERS) $(SOURCES) - here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) - - -mostlyclean: - rm -f *.a *.la *.o *.obj *.lo core core.* - rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed - rm -f -r .libs _libs - -clean: mostlyclean - -distclean: clean - rm -f Makefile ID TAGS - if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \ - rm -f ChangeLog.inst $(DISTFILES.normal); \ - else \ - : ; \ - fi - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - - -# GNU gettext needs not contain the file `VERSION' but contains some -# other files which should not be distributed in other packages. -distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: Makefile - if test "$(PACKAGE)" = "gettext-tools"; then \ - : ; \ - else \ - if test "$(PACKAGE)" = "gettext-runtime"; then \ - additional="$(DISTFILES.gettext)"; \ - else \ - additional="$(DISTFILES.normal)"; \ - fi; \ - $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \ - for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \ - if test -f $$file; then dir=.; else dir=$(srcdir); fi; \ - cp -p $$dir/$$file $(distdir); \ - done; \ - fi - -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status -# This would be more efficient, but doesn't work any more with autoconf-2.57, -# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used. -# cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/bash-5.1/lib/malloc/Makefile b/bash-5.1/lib/malloc/Makefile deleted file mode 100644 index 266d42d41fae217375d503e74b1e7499ae633027..0000000000000000000000000000000000000000 --- a/bash-5.1/lib/malloc/Makefile +++ /dev/null @@ -1,138 +0,0 @@ -# Skeleton Makefile for the GNU malloc code -# -# Copyright (C) 1996-2009 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -srcdir = . - -topdir = ../.. -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -CC = gcc -RANLIB = ranlib -AR = ar -ARFLAGS = cr -RM = rm -f -CP = cp -MV = mv - -SHELL = /bin/sh - -PROFILE_FLAGS = - -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -LOCAL_CFLAGS = -CPPFLAGS = -LDFLAGS = - -DEFS = -DHAVE_CONFIG_H -LOCAL_DEFS = -DSHELL - -LIBBUILD = ${BUILD_DIR}/lib - -BASHINCDIR = ${topdir}/include - -INTL_LIBSRC = ${topdir}/lib/intl -INTL_BUILDDIR = ${LIBBUILD}/intl -INTL_INC = -LIBINTL_H = - -INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib $(INTL_INC) - -CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \ - $(CFLAGS) $(MALLOC_CFLAGS) $(CPPFLAGS) - -.c.o: - $(CC) $(CCFLAGS) -c $< - -.s.o: - $(CC) $(CCFLAGS) -c $< - -MALLOC_SOURCE = malloc.c -STUB_SOURCE = stub.c - -ALLOCA_SOURCE = alloca.c -ALLOCA_OBJECT = alloca.o - -MALLOC_SRC = malloc.c -MALLOC = @MALLOC@ -ALLOCA = - -MALLOC_OBJS = malloc.o $(ALLOCA) trace.o stats.o table.o watch.o -STUB_OBJS = $(ALLOCA) stub.o - -.PHONY: malloc stubmalloc - -all: malloc - -malloc: ${MALLOC_OBJS} - ${RM} libmalloc.a - ${AR} ${ARFLAGS} libmalloc.a ${MALLOC_OBJS} - -test -n "$(RANLIB)" && $(RANLIB) libmalloc.a - -stubmalloc: ${STUB_OBJS} - ${RM} libmalloc.a - ${AR} ${ARFLAGS} libmalloc.a ${STUB_OBJS} - -test -n "$(RANLIB)" && $(RANLIB) libmalloc.a - -alloca: ${ALLOCA} - ${RM} libmalloc.a - ${AR} ${ARFLAGS} libmalloc.a ${ALLOCA} - -test -n "$(RANLIB)" && $(RANLIB) libmalloc.a - -alloca.o: $(srcdir)/$(ALLOCA_SOURCE) - $(CC) $(CCFLAGS) -c $(srcdir)/$(ALLOCA_SOURCE) - @- if test "$(ALLOCA_OBJECT)" != alloca.o ; then \ - mv $(ALLOCA_OBJECT) alloca.o >/dev/null 2>&1 ; \ - fi - -mostlyclean clean: - $(RM) *.o libmalloc.a - -distclean realclean maintainer-clean: clean - $(RM) Makefile - -alloca.o: $(BUILD_DIR)/config.h -malloc.o: $(BUILD_DIR)/config.h $(topdir)/bashtypes.h getpagesize.h -xmalloc.o: $(BUILD_DIR)/config.h $(BASHINCDIR)/ansi_stdlib.h -trace.o: ${BUILD_DIR}/config.h -stats.o: ${BUILD_DIR}/config.h -table.o: ${BUILD_DIR}/config.h -watch.o: ${BUILD_DIR}/config.h - -malloc.o: ${srcdir}/imalloc.h ${srcdir}/mstats.h -malloc.o: ${srcdir}/table.h ${srcdir}/watch.h -stats.o: ${srcdir}/imalloc.h ${srcdir}/mstats.h -trace.o: ${srcdir}/imalloc.h -table.o: ${srcdir}/imalloc.h ${srcdir}/table.h -watch.o: ${srcdir}/imalloc.h ${srcdir}/watch.h - -malloc.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h -stats.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h -trace.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h -table.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h -watch.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h - -# Rules for deficient makes, like SunOS and Solaris -stub.o: stub.c -malloc.o: malloc.c -table.o: table.c -trace.o: trace.c -stats.o: stats.c -watch.o: watch.c diff --git a/bash-5.1/lib/readline/Makefile b/bash-5.1/lib/readline/Makefile deleted file mode 100644 index 3ab51b61a0444d82d0a02ce50af1b8a55787827f..0000000000000000000000000000000000000000 --- a/bash-5.1/lib/readline/Makefile +++ /dev/null @@ -1,396 +0,0 @@ -## -*- text -*- ############################################################# -# # -# Makefile for the Bash versions of the GNU Readline and History Libraries. # -# # -############################################################################# - -# Copyright (C) 1994-2012 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -PACKAGE = rash -VERSION = 0.1-release - -PACKAGE_BUGREPORT = bug-rash@gnu.org -PACKAGE_NAME = rash -PACKAGE_STRING = rash 0.1-release -PACKAGE_VERSION = 0.1-release - -srcdir = . - -topdir = ../.. -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -datarootdir = ${prefix}/share - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -CC = gcc -RANLIB = ranlib -AR = ar -ARFLAGS = cr -RM = rm -f -CP = cp -MV = mv - -SHELL = /bin/sh - -# Programs to make tags files. -ETAGS = etags -tw -CTAGS = ctags -tw - -DEBUG = - -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -LOCAL_CFLAGS = ${DEBUG} -CPPFLAGS = -LDFLAGS = - -DEFS = -DHAVE_CONFIG_H -LOCAL_DEFS = -DSHELL - -INCLUDES = -I. -I$(BUILD_DIR) -I$(topdir) -I$(topdir)/lib - -CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(APP_CFLAGS) $(CPPFLAGS) ${INCLUDES} \ - $(LOCAL_CFLAGS) $(CFLAGS) ${ADDON_CFLAGS} - -.c.o: - ${RM} $@ - $(CC) -c $(CCFLAGS) $< - -# The name of the main library target. -LIBRARY_NAME = libreadline.a - -# The C code source files for this library. -CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \ - $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \ - $(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \ - $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \ - $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \ - $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \ - $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \ - $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \ - $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ - $(srcdir)/shell.c $(srcdir)/tilde.c $(srcdir)/savestring.c \ - $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \ - $(srcdir)/colors.c $(srcdir)/parse-colors.c \ - $(srcdir)/mbutil.c $(srcdir)/xfree.c - -# The header files for this library. -HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ - posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \ - ansi_stdlib.h rlstdc.h tcap.h xmalloc.h rlprivate.h rlshell.h \ - rltypedefs.h rlmbutil.h colors.h parse-colors.h - -HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o savestring.o \ - mbutil.o -TILDEOBJ = tilde.o -COLORSOBJ = colors.o parse-colors.o -OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ - rltty.o complete.o bind.o isearch.o display.o signals.o \ - util.o kill.o undo.o macro.o input.o callback.o terminal.o \ - text.o nls.o misc.o $(HISTOBJ) $(TILDEOBJ) $(COLORSOBJ) \ - xmalloc.o xfree.o compat.o - -# The texinfo files which document this library. -DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo -DOCOBJECT = doc/readline.dvi -DOCSUPPORT = doc/Makefile -DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) - -SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]* - -SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE) - -THINGS_TO_TAR = $(SOURCES) $(SUPPORT) - -INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \ - rlstdc.h rlconf.h rltypedefs.h - -########################################################################## - -all: libreadline.a libhistory.a - -libreadline.a: $(OBJECTS) - $(RM) $@ - $(AR) $(ARFLAGS) $@ $(OBJECTS) - -test -n "$(RANLIB)" && $(RANLIB) $@ - -libhistory.a: $(HISTOBJ) xmalloc.o xfree.o - $(RM) $@ - $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o xfree.o - -test -n "$(RANLIB)" && $(RANLIB) $@ - -documentation: force - test -d doc || mkdir doc - -( cd doc && $(MAKE) $(MFLAGS) ) - -# Since tilde.c is shared between readline and bash, make sure we compile -# it with the right flags when it's built as part of readline -tilde.o: tilde.c - rm -f $@ - $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c - -force: - -install: - @echo "This version of the readline library should not be installed." - -uninstall: - @echo "This version of the readline library should not be installed." - -TAGS: force - $(ETAGS) $(CSOURCES) $(HSOURCES) - -tags: force - $(CTAGS) $(CSOURCES) $(HSOURCES) - -clean: force - $(RM) $(OBJECTS) *.a - -( cd doc && $(MAKE) $(MFLAGS) $@ ) - -mostlyclean: clean - -( cd doc && $(MAKE) $(MFLAGS) $@ ) - -distclean maintainer-clean: clean - -( cd doc && $(MAKE) $(MFLAGS) $@ ) - $(RM) Makefile - $(RM) TAGS tags - -# Dependencies -bind.o: ansi_stdlib.h posixstat.h -bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -bind.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -bind.o: history.h rlstdc.h -callback.o: rlconf.h ansi_stdlib.h -callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h -compat.o: ${BUILD_DIR}/config.h -compat.o: rlstdc.h rltypedefs.h -complete.o: ansi_stdlib.h posixdir.h posixstat.h -complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h -complete.o: colors.h -display.o: ansi_stdlib.h posixstat.h -display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -display.o: tcap.h -display.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -display.o: history.h rlstdc.h -funmap.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -funmap.o: rlconf.h ansi_stdlib.h rlstdc.h -funmap.o: ${BUILD_DIR}/config.h -histexpand.o: ansi_stdlib.h -histexpand.o: history.h histlib.h rlstdc.h -histexpand.o: ${BUILD_DIR}/config.h -histfile.o: ansi_stdlib.h -histfile.o: history.h histlib.h rlstdc.h -histfile.o: ${BUILD_DIR}/config.h -history.o: ansi_stdlib.h -history.o: history.h histlib.h rlstdc.h -history.o: ${BUILD_DIR}/config.h -histsearch.o: ansi_stdlib.h -histsearch.o: history.h histlib.h rlstdc.h -histsearch.o: ${BUILD_DIR}/config.h -input.o: ansi_stdlib.h -input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -input.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h -isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -isearch.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -isearch.o: ansi_stdlib.h history.h rlstdc.h -keymaps.o: emacs_keymap.c vi_keymap.c -keymaps.o: keymaps.h rltypedefs.h chardefs.h rlconf.h ansi_stdlib.h -keymaps.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -keymaps.o: ${BUILD_DIR}/config.h rlstdc.h -kill.o: ansi_stdlib.h -kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -kill.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -kill.o: history.h rlstdc.h -macro.o: ansi_stdlib.h -macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -macro.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -macro.o: history.h rlstdc.h -mbutil.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h rlmbutil.h -mbutil.o: readline.h keymaps.h rltypedefs.h chardefs.h rlstdc.h -misc.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -misc.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -misc.o: history.h rlstdc.h ansi_stdlib.h -nls.o: ansi_stdlib.h -nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -nls.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -nls.o: history.h rlstdc.h -parens.o: rlconf.h -parens.o: ${BUILD_DIR}/config.h -parens.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h -readline.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -readline.o: history.h rlstdc.h -readline.o: posixstat.h ansi_stdlib.h posixjmp.h -rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -rltty.o: rltty.h -rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h -savestring.o: ${BUILD_DIR}/config.h -search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -search.o: ansi_stdlib.h history.h rlstdc.h -shell.o: ${BUILD_DIR}/config.h ansi_stdlib.h -signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -signals.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -signals.o: history.h rlstdc.h -terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -terminal.o: tcap.h -terminal.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -terminal.o: history.h rlstdc.h -text.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -text.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -text.o: history.h rlstdc.h ansi_stdlib.h -rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -tilde.o: ansi_stdlib.h -tilde.o: ${BUILD_DIR}/config.h -tilde.o: tilde.h -undo.o: ansi_stdlib.h -undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -undo.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -undo.o: history.h rlstdc.h xmalloc.h -util.o: posixjmp.h ansi_stdlib.h -util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -util.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h -vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h -vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h -vi_mode.o: history.h ansi_stdlib.h rlstdc.h -xmalloc.o: ${BUILD_DIR}/config.h ansi_stdlib.h -xfree.o: ${BUILD_DIR}/config.h ansi_stdlib.h - -colors.o: ${BUILD_DIR}/config.h colors.h -colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h -colors.o: rlconf.h -colors.o: ansi_stdlib.h posixstat.h -parse-colors.o: ${BUILD_DIR}/config.h colors.h parse-colors.h -parse-colors.o: rldefs.h rlconf.h -parse-colors.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h - -bind.o: rlshell.h -histfile.o: rlshell.h -nls.o: rlshell.h -readline.o: rlshell.h -shell.o: rlshell.h -terminal.o: rlshell.h -histexpand.o: rlshell.h - -bind.o: rlprivate.h -callback.o: rlprivate.h -complete.o: rlprivate.h -display.o: rlprivate.h -input.o: rlprivate.h -isearch.o: rlprivate.h -kill.o: rlprivate.h -macro.o: rlprivate.h -mbutil.o: rlprivate.h -misc.o: rlprivate.h -nls.o: rlprivate.h -parens.o: rlprivate.h -readline.o: rlprivate.h -rltty.o: rlprivate.h -search.o: rlprivate.h -signals.o: rlprivate.h -terminal.o: rlprivate.h -text.o: rlprivate.h -undo.o: rlprivate.h -util.o: rlprivate.h -vi_mode.o: rlprivate.h -colors.o: rlprivate.h -parse-colors.o: rlprivate.h - -bind.o: xmalloc.h -complete.o: xmalloc.h -display.o: xmalloc.h -funmap.o: xmalloc.h -histexpand.o: xmalloc.h -histfile.o: xmalloc.h -history.o: xmalloc.h -input.o: xmalloc.h -isearch.o: xmalloc.h -keymaps.o: xmalloc.h -kill.o: xmalloc.h -macro.o: xmalloc.h -mbutil.o: xmalloc.h -misc.o: xmalloc.h -readline.o: xmalloc.h -savestring.o: xmalloc.h -search.o: xmalloc.h -shell.o: xmalloc.h -terminal.o: xmalloc.h -text.o: xmalloc.h -tilde.o: xmalloc.h -undo.o: xmalloc.h -util.o: xmalloc.h -vi_mode.o: xmalloc.h -xfree.o: xmalloc.h -xmalloc.o: xmalloc.h -colors.o: xmalloc.h -parse-colors.o: xmalloc.h - -complete.o: rlmbutil.h -display.o: rlmbutil.h -histexpand.o: rlmbutil.h -input.o: rlmbutil.h -isearch.o: rlmbutil.h -mbutil.o: rlmbutil.h -misc.o: rlmbutil.h -readline.o: rlmbutil.h -search.o: rlmbutil.h -text.o: rlmbutil.h -vi_mode.o: rlmbutil.h -colors.o: rlmbutil.h -parse-colors.o: rlmbutil.h - -# Rules for deficient makes, like SunOS and Solaris -bind.o: bind.c -callback.o: callback.c -compat.o: compat.c -complete.o: complete.c -display.o: display.c -funmap.o: funmap.c -input.o: input.c -isearch.o: isearch.c -keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c -kill.o: kill.c -macro.o: macro.c -mbutil.o: mbutil.c -misc.o: misc.c -nls.o: nls.c -parens.o: parens.c -readline.o: readline.c -rltty.o: rltty.c -savestring.o: savestring.c -search.o: search.c -shell.o: shell.c -signals.o: signals.c -terminal.o: terminal.c -text.o: text.c -tilde.o: tilde.c -undo.o: undo.c -util.o: util.c -vi_mode.o: vi_mode.c -xfree.o: xfree.c -xmalloc.o: xmalloc.c - -colors.o: colors.c -parse-colors.o: parse-colors.c - -histexpand.o: histexpand.c -histfile.o: histfile.c -history.o: history.c -histsearch.o: histsearch.c diff --git a/bash-5.1/lib/sh/Makefile b/bash-5.1/lib/sh/Makefile deleted file mode 100644 index 587f2b017a3607d228405dc367d6b6a00548a1ee..0000000000000000000000000000000000000000 --- a/bash-5.1/lib/sh/Makefile +++ /dev/null @@ -1,639 +0,0 @@ -# -# Makefile for the Bash library -# -# -# Copyright (C) 1998-2020 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -PACKAGE = rash -VERSION = 0.1-release - -PACKAGE_BUGREPORT = bug-rash@gnu.org -PACKAGE_NAME = rash -PACKAGE_STRING = rash 0.1-release -PACKAGE_VERSION = 0.1-release - -srcdir = . - -topdir = ../.. -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -LIBBUILD = ${BUILD_DIR}/lib - -BASHINCDIR = ${topdir}/include - -INTL_LIBSRC = ${topdir}/lib/intl -INTL_BUILDDIR = ${LIBBUILD}/intl -INTL_INC = -LIBINTL_H = - -datarootdir = ${prefix}/share - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -CC = gcc -RANLIB = ranlib -AR = ar -ARFLAGS = cr -RM = rm -f -CP = cp -MV = mv - -SHELL = /bin/sh - -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -LOCAL_CFLAGS = ${DEBUG} -CPPFLAGS = -LDFLAGS = -rdynamic - -PROFILE_FLAGS = - -DEFS = -DHAVE_CONFIG_H -LOCAL_DEFS = -DSHELL - -INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(BASHINCDIR) -I$(srcdir) $(INTL_INC) - -CCFLAGS = ${ADDON_CFLAGS} ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) \ - $(LOCAL_CFLAGS) $(CFLAGS) $(CPPFLAGS) - -GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \ - -Wcast-align -Wstrict-prototypes -Wconversion \ - -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic - -.c.o: - $(CC) -c $(CCFLAGS) $< - -# The name of the library target. -LIBRARY_NAME = libsh.a - -# The C code source files for this library. -CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.c \ - strcasecmp.c strerror.c strtod.c strtol.c strtoul.c \ - vprint.c itos.c rename.c zread.c zwrite.c shtty.c \ - inet_aton.c netconn.c netopen.c strpbrk.c timeval.c makepath.c \ - pathcanon.c pathphys.c tmpfile.c stringlist.c stringvec.c spell.c \ - shquote.c strtrans.c strcasestr.c snprintf.c mailstat.c \ - fmtulong.c fmtullong.c fmtumax.c shmatch.c strnlen.c \ - strtoll.c strtoull.c strtoimax.c strtoumax.c memset.c strstr.c \ - mktime.c strftime.c mbschr.c zcatfd.c zmapfd.c winsize.c eaccess.c \ - wcsdup.c fpurge.c zgetline.c mbscmp.c uconvert.c ufuncs.c \ - casemod.c dprintf.c input_avail.c mbscasecmp.c fnxform.c \ - strchrnul.c unicode.c wcswidth.c wcsnwidth.c shmbchar.c strdup.c \ - utf8.c random.c gettimeofday.c - -# The header files for this library. -HSOURCES = - -# The object files contained in $(LIBRARY_NAME) -LIBOBJS = ${LIBOBJDIR}mbschr$U.o -OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o strnlen.o \ - itos.o zread.o zwrite.o shtty.o shmatch.o eaccess.o \ - netconn.o netopen.o timeval.o makepath.o pathcanon.o \ - pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o \ - strtrans.o snprintf.o mailstat.o fmtulong.o \ - fmtullong.o fmtumax.o zcatfd.o zmapfd.o winsize.o wcsdup.o \ - fpurge.o zgetline.o mbscmp.o uconvert.o ufuncs.o casemod.o \ - input_avail.o mbscasecmp.o fnxform.o unicode.o shmbchar.o \ - utf8.o random.o gettimeofday.o wcsnwidth.o ${LIBOBJS} - -SUPPORT = Makefile - -all: $(LIBRARY_NAME) - -$(LIBRARY_NAME): $(OBJECTS) - $(RM) $@ - $(AR) $(ARFLAGS) $@ $(OBJECTS) - -test -n "$(RANLIB)" && $(RANLIB) $@ - -force: - -# The rule for 'includes' is written funny so that the if statement -# always returns TRUE unless there really was an error installing the -# include files. -install: - -clean: - $(RM) $(OBJECTS) $(LIBRARY_NAME) - -realclean distclean maintainer-clean: clean - $(RM) Makefile - -mostlyclean: clean - -# Dependencies - -${BUILD_DIR}/version.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile - -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h ) - -${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile - -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h ) - -# rules for losing makes, like SunOS -casemod.o: casemod.c -clktck.o: clktck.c -clock.o: clock.c -eaccess.o: eaccess.c -dprintf.o: dprintf.c -fmtullong.o: fmtullong.c -fmtulong.o: fmtulong.c -fmtumax.o: fmtumax.c -fnxform.o: fnxform.c -fpurge.o: fpurge.c -getcwd.o: getcwd.c -getenv.o: getenv.c -gettimeofday.o: gettimeofday.c -inet_aton.o: inet_aton.c -input_avail.o: input_avail.c -itos.o: itos.c -mailstat.o: mailstat.c -makepath.o: makepath.c -mbscasecmp.o: mbscasecmp.c -mbschr.o: mbschr.c -mbscmp.o: mbscmp.c -memset.o: memset.c -mktime.o: mktime.c -netconn.o: netconn.c -netopen.o: netopen.c -oslib.o: oslib.c -pathcanon.o: pathcanon.c -pathphys.o: pathphys.c -random.o: random.c -rename.o: rename.c -setlinebuf.o: setlinebuf.c -shmatch.o: shmatch.c -shmbchar.o: shmbchar.c -shquote.o: shquote.c -shtty.o: shtty.c -snprintf.o: snprintf.c -spell.o: spell.c -strcasecmp.o: strcasecmp.c -strchrnul.o: strchrnul.c -strerror.o: strerror.c -strftime.o: strftime.c -strcasestr.o: strcasestr.c -stringlist.o: stringlist.c -stringvec.o: stringvec.c -strnlen.o: strnlen.c -strpbrk.o: strpbrk.c -strtod.o: strtod.c -strtoimax.o: strtoimax.c -strtol.o: strtol.c -strtoll.o: strtoll.c -strtoul.o: strtoul.c -strtoull.o: strtoull.c -strtoumax.o: strtoumax.c -strtrans.o: strtrans.c -times.o: times.c -timeval.o: timeval.c -tmpfile.o: tmpfile.c -uconvert.o: uconvert.c -ufuncs.o: ufuncs.c -unicode.o: unicode.c -utf8.o: utf8.c -vprint.o: vprint.c -wcsdup.o: wcsdup.c -wcsnwidth.o: wcsnwidth.c -wcswidth.o: wcswidth.c -winsize.o: winsize.c -zcatfd.o: zcatfd.c -zmapfd.o: zmapfd.c -zgetline.o: zgetline.c -zread.o: zread.c -zwrite.o: zwrite.c - -# dependencies for c files that include other c files -fmtullong.o: fmtulong.c -fmtumax.o: fmtulong.c -strtoll.o: strtol.c -strtoul.o: strtol.c -strtoull.o: strtol.c - -# all files in the library depend on config.h -casemod.o: ${BUILD_DIR}/config.h -clktck.o: ${BUILD_DIR}/config.h -clock.o: ${BUILD_DIR}/config.h -eaccess.o: ${BUILD_DIR}/config.h -dprintf.o: ${BUILD_DIR}/config.h -fmtullong.o: ${BUILD_DIR}/config.h -fmtulong.o: ${BUILD_DIR}/config.h -fmtumax.o: ${BUILD_DIR}/config.h -fnxform.o: ${BUILD_DIR}/config.h -fpurge.o: ${BUILD_DIR}/config.h -getcwd.o: ${BUILD_DIR}/config.h -getenv.o: ${BUILD_DIR}/config.h -gettimeofday.o: ${BUILD_DIR}/config.h -inet_aton.o: ${BUILD_DIR}/config.h -input_avail.o: ${BUILD_DIR}/config.h -itos.o: ${BUILD_DIR}/config.h -mailstat.o: ${BUILD_DIR}/config.h -makepath.o: ${BUILD_DIR}/config.h -mbscasecmp.o: ${BUILD_DIR}/config.h -mbschr.o: ${BUILD_DIR}/config.h -mbscmp.o: ${BUILD_DIR}/config.h -memset.o: ${BUILD_DIR}/config.h -mktime.o: ${BUILD_DIR}/config.h -netconn.o: ${BUILD_DIR}/config.h -netopen.o: ${BUILD_DIR}/config.h -oslib.o: ${BUILD_DIR}/config.h -pathcanon.o: ${BUILD_DIR}/config.h -pathphys.o: ${BUILD_DIR}/config.h -random.o: ${BUILD_DIR}/config.h -rename.o: ${BUILD_DIR}/config.h -setlinebuf.o: ${BUILD_DIR}/config.h -shmatch.o: ${BUILD_DIR}/config.h -shmbchar.o: ${BUILD_DIR}/config.h -shquote.o: ${BUILD_DIR}/config.h -shtty.o: ${BUILD_DIR}/config.h -snprintf.o: ${BUILD_DIR}/config.h -spell.o: ${BUILD_DIR}/config.h -strcasecmp.o: ${BUILD_DIR}/config.h -strchrnul.o: ${BUILD_DIR}/config.h -strerror.o: ${BUILD_DIR}/config.h -strftime.o: ${BUILD_DIR}/config.h -strcasestr.o: ${BUILD_DIR}/config.h -stringlist.o: ${BUILD_DIR}/config.h -stringvec.o: ${BUILD_DIR}/config.h -strnlen.o: ${BUILD_DIR}/config.h -strpbrk.o: ${BUILD_DIR}/config.h -strtod.o: ${BUILD_DIR}/config.h -strtoimax.o: ${BUILD_DIR}/config.h -strtol.o: ${BUILD_DIR}/config.h -strtoll.o: ${BUILD_DIR}/config.h -strtoul.o: ${BUILD_DIR}/config.h -strtoull.o: ${BUILD_DIR}/config.h -strtoumax.o: ${BUILD_DIR}/config.h -strtrans.o: ${BUILD_DIR}/config.h -times.o: ${BUILD_DIR}/config.h -timeval.o: ${BUILD_DIR}/config.h -tmpfile.o: ${BUILD_DIR}/config.h ${topdir}/config-top.h -uconvert.o: ${BUILD_DIR}/config.h -ufuncs.o: ${BUILD_DIR}/config.h -unicode.o: ${BUILD_DIR}/config.h -utf8.o: ${BUILD_DIR}/config.h -vprint.o: ${BUILD_DIR}/config.h -wcsdup.o: ${BUILD_DIR}/config.h -wcsnwidth.o: ${BUILD_DIR}/config.h -wcswidth.o: ${BUILD_DIR}/config.h -winsize.o: ${BUILD_DIR}/config.h -zcatfd.o: ${BUILD_DIR}/config.h -zgetline.o: ${BUILD_DIR}/config.h -zmapfd.o: ${BUILD_DIR}/config.h -zread.o: ${BUILD_DIR}/config.h -zwrite.o: ${BUILD_DIR}/config.h - -clktck.o: ${topdir}/bashtypes.h - -getcwd.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h -getcwd.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/posixdir.h -getcwd.o: ${BASHINCDIR}/memalloc.h ${BASHINCDIR}/ansi_stdlib.h - -getenv.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -getenv.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -getenv.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -getenv.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -getenv.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -getenv.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -getenv.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -getenv.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -#getenv.o: ${BUILD_DIR}/version.h - -inet_aton.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -inet_aton.o: ${BASHINCDIR}/stdc.h - -itos.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -itos.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -itos.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -itos.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -itos.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -itos.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -itos.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -itos.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -#itos.o: ${BUILD_DIR}/version.h - -makepath.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -makepath.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -makepath.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -makepath.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -makepath.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -makepath.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -makepath.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -makepath.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -#makepath.o: ${BUILD_DIR}/version.h - -netconn.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h -netconn.o: ${topdir}/bashtypes.h - -netopen.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h -netopen.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -netopen.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -netopen.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -netopen.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -netopen.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -netopen.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -netopen.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -netopen.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h -#netopen.o: ${BUILD_DIR}/version.h - -oslib.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h -oslib.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -oslib.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -oslib.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -oslib.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -oslib.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -oslib.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -oslib.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -oslib.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h -oslib.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h -#oslib.o: ${BUILD_DIR}/version.h - -pathcanon.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h -pathcanon.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -pathcanon.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -pathcanon.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -pathcanon.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -pathcanon.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -pathcanon.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -pathcanon.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -pathcanon.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h -pathcanon.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h -#pathcanon.o: ${BUILD_DIR}/version.h - -pathphys.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h -pathphys.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -pathphys.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -pathphys.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -pathphys.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -pathphys.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -pathphys.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -pathphys.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -pathphys.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h -pathphys.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h -#pathphys.o: ${BUILD_DIR}/version.h - -random.o: ${topdir}/bashtypes.h ${BASHINCDIR}/stdc.h -random.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -random.o: ${BASHINCDIR}/filecntl.h - -rename.o: ${topdir}/bashtypes.h ${BASHINCDIR}/stdc.h -rename.o: ${BASHINCDIR}/posixstat.h - -setlinebuf.o: ${topdir}/xmalloc.h ${topdir}/bashansi.h -setlinebuf.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/stdc.h - -eaccess.o: ${topdir}/bashtypes.h -eaccess.o: ${BASHINCDIR}/posixstat.h -eaccess.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -eaccess.o: ${BASHINCDIR}/filecntl.h -eaccess.o: ${BASHINCDIR}/stdc.h -eaccess.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -eaccess.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -eaccess.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -eaccess.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -eaccess.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -eaccess.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -eaccess.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -#eaccess.o: ${BUILD_DIR}/version.h - -shmatch.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h -shmatch.o: ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h -shmatch.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -shmatch.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -shmatch.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -shmatch.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -shmatch.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -shmatch.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -shmatch.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h - -shquote.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h -shquote.o: ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h -shquote.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h - -shtty.o: ${BASHINCDIR}/shtty.h -shtty.o: ${BASHINCDIR}/stdc.h - -snprintf.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h ${topdir}/xmalloc.h -snprintf.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h -snprintf.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h -snprintf.o: ${BASHINCDIR}/typemax.h - -spell.o: ${topdir}/bashtypes.h -spell.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/posixdir.h -spell.o: ${BASHINCDIR}/ansi_stdlib.h - -strcasecmp.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h -strcasecmp.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h - -strerror.o: ${topdir}/bashtypes.h -strerror.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -strerror.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -strerror.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -strerror.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -strerror.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -strerror.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -strerror.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -#strerror.o: ${BUILD_DIR}/version.h - -strcasestr.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h -strcasestr.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h - -stringlist.o: ${topdir}/bashansi.h -stringlist.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -stringlist.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -stringlist.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -stringlist.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -stringlist.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -stringlist.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -stringlist.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -#stringlist.o: ${BUILD_DIR}/version.h - -stringvec.o: ${topdir}/bashansi.h ${BASHINCDIR}/chartypes.h -stringvec.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -stringvec.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -stringvec.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -stringvec.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -stringvec.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -stringvec.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -stringvec.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -#stringvec.o: ${BUILD_DIR}/version.h - -strnlen.o: ${BASHINCDIR}/stdc.h - -strpbrk.o: ${BASHINCDIR}/stdc.h - -strtod.o: ${topdir}/bashansi.h -strtod.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h - -strtoimax.o: ${BASHINCDIR}/stdc.h - -strtol.o: ${topdir}/bashansi.h -strtol.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h -strtol.o: ${BASHINCDIR}/typemax.h - -strtoll.o: ${topdir}/bashansi.h -strtoll.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h -strtoll.o: ${BASHINCDIR}/typemax.h - -strtoul.o: ${topdir}/bashansi.h -strtoul.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h -strtoul.o: ${BASHINCDIR}/typemax.h - -strtoull.o: ${topdir}/bashansi.h -strtoull.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h -strtoull.o: ${BASHINCDIR}/typemax.h - -strtoumax.o: ${BASHINCDIR}/stdc.h - -strtrans.o: ${topdir}/bashansi.h -strtrans.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h -strtrans.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -strtrans.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -strtrans.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -strtrans.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -strtrans.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -strtrans.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -strtrans.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h -strtrans.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h -#strtrans.o: ${BUILD_DIR}/version.h - -times.o: ${BASHINCDIR}/systimes.h -times.o: ${BASHINCDIR}/posixtime.h - -timeval.o: ${BASHINCDIR}/posixtime.h -gettimeofday.o: ${BASHINCDIR}/posixtime.h - -tmpfile.o: ${topdir}/bashtypes.h -tmpfile.o: ${BASHINCDIR}/chartypes.h -tmpfile.o: ${BASHINCDIR}/posixstat.h -tmpfile.o: ${BASHINCDIR}/filecntl.h -tmpfile.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -tmpfile.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -tmpfile.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -tmpfile.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -tmpfile.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -tmpfile.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -tmpfile.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h - -uconvert.o: ${topdir}/bashtypes.h -uconvert.o: ${BASHINCDIR}/chartypes.h -uconvert.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h -uconvert.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h -uconvert.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h -uconvert.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h -uconvert.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h -uconvert.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h -uconvert.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h - -ufuncs.o: ${topdir}/bashtypes.h - -clock.o: ${BASHINCDIR}/posixtime.h - -mailstat.o: ${topdir}/bashansi.h -mailstat.o: ${topdir}/bashtypes.h -mailstat.o: ${BASHINCDIR}/ansi_stdlib.h -mailstat.o: ${BASHINCDIR}/posixstat.h -mailstat.o: ${BASHINCDIR}/posixdir.h -mailstat.o: ${BASHINCDIR}/maxpath.h - -fmtulong.o: ${topdir}/bashansi.h -fmtulong.o: ${BASHINCDIR}/ansi_stdlib.h -fmtulong.o: ${BASHINCDIR}/chartypes.h -fmtulong.o: ${BASHINCDIR}/stdc.h -fmtulong.o: ${BASHINCDIR}/typemax.h -fmtulong.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h - -fmtullong.o: ${topdir}/bashansi.h -fmtullong.o: ${BASHINCDIR}/ansi_stdlib.h -fmtullong.o: ${BASHINCDIR}/chartypes.h -fmtullong.o: ${BASHINCDIR}/stdc.h -fmtullong.o: ${BASHINCDIR}/typemax.h -fmtullong.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h - -fmtumax.o: ${topdir}/bashansi.h -fmtumax.o: ${BASHINCDIR}/ansi_stdlib.h -fmtumax.o: ${BASHINCDIR}/chartypes.h -fmtumax.o: ${BASHINCDIR}/stdc.h -fmtumax.o: ${BASHINCDIR}/typemax.h -fmtumax.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h - -wcsdup.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -wcsdup.o: ${BASHINCDIR}/stdc.h -wcsdup.o: ${topdir}/xmalloc.h - -wcsnwidth.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -wcsnwidth.o: ${BASHINCDIR}/stdc.h - -wcswidth.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -wcswidth.o: ${BASHINCDIR}/stdc.h - -mbschr.o: ${topdir}/bashansi.h -mbschr.o: ${BASHINCDIR}/ansi_stdlib.h -mbschr.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h - -zgetline.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -zgetline.o: ${BASHINCDIR}/stdc.h -zgetline.o: ${topdir}/xmalloc.h -zgetline.o: ${topdir}/bashtypes.h - -mbscasecmp.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -mbscasecmp.o: ${BASHINCDIR}/stdc.h -mbscasecmp.o: ${topdir}/xmalloc.h - -mbscmp.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -mbscmp.o: ${BASHINCDIR}/stdc.h -mbscmp.o: ${topdir}/xmalloc.h - -casemod.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -casemod.o: ${BASHINCDIR}/stdc.h -casemod.o: ${topdir}/xmalloc.h -casemod.o: ${topdir}/bashtypes.h -casemod.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h -casemod.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h - -dprintf.o: ${BASHINCDIR}/stdc.h - -input_avail.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -input_avail.o: ${BASHINCDIR}/stdc.h -input_avail.o: ${topdir}/xmalloc.h ${BASHINCDIR}/posixselect.h - -mktime.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -mktime.o: ${BASHINCDIR}/stdc.h - -fnxform.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -fnxform.o: ${BASHINCDIR}/stdc.h -fnxform.o: ${topdir}/bashtypes.h -fnxform.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h - -shmbchar.o: ${BASHINCDIR}/shmbchar.h -shmbchar.o: ${BASHINCDIR}/shmbutil.h - -unicode.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -unicode.o: ${BASHINCDIR}/stdc.h -unicode.o: ${topdir}/xmalloc.h - -utf8.o: ${topdir}/bashansi.h -utf8.o: ${BASHINCDIR}/ansi_stdlib.h -utf8.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/shmbchar.h - -winsize.o: ${BASHINCDIR}/stdc.h -winsize.o: ${topdir}/xmalloc.h -winsize.o: ${topdir}/bashtypes.h - -zmapfd.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h -zmapfd.o: ${BASHINCDIR}/stdc.h -zmapfd.o: ${topdir}/command.h -zmapfd.o: ${topdir}/general.h -zmapfd.o: ${topdir}/bashtypes.h ${BASHINCDIR}/chartypes.h ${topdir}/xmalloc.h diff --git a/bash-5.1/lib/termcap/Makefile b/bash-5.1/lib/termcap/Makefile deleted file mode 100644 index 19fe25217bf3e3f1d171f2d77e38f7f80ef62fff..0000000000000000000000000000000000000000 --- a/bash-5.1/lib/termcap/Makefile +++ /dev/null @@ -1,90 +0,0 @@ -## -*- text -*- #################################################### -# # -# Makefile for termcap replacement libbrary. # -# # -#################################################################### - -# Copyright (C) 1996-2009 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -srcdir = . - -topdir = ../.. -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -libdir = ${exec_prefix}/lib - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -CC = gcc -RANLIB = ranlib -AR = ar -ARFLAGS = cr -RM = rm -f -CP = cp -MV = mv - -SHELL = /bin/sh - -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -CPPFLAGS = -LDFLAGS = - -DEFS = -DHAVE_CONFIG_H - -INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(srcdir) - -CCFLAGS = $(CFLAGS) $(DEFS) $(CPPFLAGS) ${INCLUDES} - -# Here is a rule for making .o files from .c files that doesn't force -# the type of the machine (like -sun3) into the flags. -.c.o: - $(CC) -c $(CCFLAGS) $< - -SOURCES = termcap.c tparam.c -OBJECTS = termcap.o tparam.o - -DOCUMENTATION = termcap.texinfo - -THINGS_TO_TAR = $(SOURCES) $(DOCUMENTATION) - -########################################################################## - -all: libtermcap.a - -libtermcap.a: $(OBJECTS) - $(RM) -f $@ - $(AR) $(ARFLAGS) $@ $(OBJECTS) - -test -n "$(RANLIB)" && $(RANLIB) $@ - -install: - -clean: - $(RM) *.o *.a *.log *.cp *.tp *.vr *.fn *.aux *.pg *.toc - -mostlyclean: clean - -distclean maintainer-clean: clean - $(RM) Makefile - -$(DESTDIR)$(libdir)/libtermcap.a: libtermcap.a - ${INSTALL_DATA} -c -m 644 libtermcap.a $@ - -test -n "$(RANLIB)" && $(RANLIB) -t $@ - -termcap.o: $(BUILD_DIR)/config.h -tparam.o: $(BUILD_DIR)/config.h -version.o: $(BUILD_DIR)/config.h diff --git a/bash-5.1/lib/tilde/Makefile b/bash-5.1/lib/tilde/Makefile deleted file mode 100644 index 7034ba2ced78c3803f074c225731ffcdbc31e88f..0000000000000000000000000000000000000000 --- a/bash-5.1/lib/tilde/Makefile +++ /dev/null @@ -1,126 +0,0 @@ -## -*- text -*- #################################################### -# # -# Makefile for the GNU Tilde Library. # -# # -#################################################################### - -# Copyright (C) 1996-2009 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -srcdir = . - -topdir = ../.. -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -INSTALL = /usr/bin/install -c -INSTALL_PROGRAM = ${INSTALL} -INSTALL_DATA = ${INSTALL} -m 644 - -CC = gcc -RANLIB = ranlib -AR = ar -ARFLAGS = cr -RM = rm -CP = cp -MV = mv - -SHELL = /bin/sh - -PROFILE_FLAGS = - -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -LOCAL_CFLAGS = -CPPFLAGS = -LDFLAGS = -rdynamic - -DEFS = -DHAVE_CONFIG_H -LOCAL_DEFS = -DSHELL - -BASHINCDIR = ${topdir}/include - -INCLUDES = -I. -I../.. -I$(topdir) -I${BASHINCDIR} -I$(topdir)/lib - -CCFLAGS = ${ASAN_CFLAGS} $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) \ - ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS) - -.c.o: - $(CC) -c $(CCFLAGS) $< - -# The name of the library target. -LIBRARY_NAME = libtilde.a - -# The C code source files for this library. -CSOURCES = $(srcdir)/tilde.c - -# The header files for this library. -HSOURCES = $(srcdir)/tilde.h - -OBJECTS = tilde.o - -# The texinfo files which document this library. -DOCSOURCE = doc/tilde.texi -DOCOBJECT = doc/tilde.dvi -DOCSUPPORT = doc/Makefile -DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT) - -SUPPORT = Makefile ChangeLog $(DOCSUPPORT) - -SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE) - -THINGS_TO_TAR = $(SOURCES) $(SUPPORT) - -###################################################################### - -all: $(LIBRARY_NAME) - -$(LIBRARY_NAME): $(OBJECTS) - $(RM) -f $@ - $(AR) $(ARFLAGS) $@ $(OBJECTS) - -test -n "$(RANLIB)" && $(RANLIB) $@ - -documentation: force - -(cd doc; $(MAKE) $(MFLAGS)) - -force: - -# The rule for 'includes' is written funny so that the if statement -# always returns TRUE unless there really was an error installing the -# include files. -install: - $(INSTALL_DATA) -c -m 644 $(LIBRARY_NAME) $(libdir)/$(LIBRARY_NAME) - -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/$(LIBRARY_NAME) - -clean: - $(RM) -f $(OBJECTS) $(LIBRARY_NAME) - -( cd doc && $(MAKE) $(MFLAGS) $@ ) - -realclean distclean maintainer-clean: clean - -( cd doc && $(MAKE) $(MFLAGS) $@ ) - $(RM) -f Makefile - -mostlyclean: clean - -( cd doc && $(MAKE) $(MFLAGS) $@ ) - -###################################################################### -# # -# Dependencies for the object files which make up this library. # -# # -###################################################################### - -tilde.o: tilde.h $(BASHINCDIR)/ansi_stdlib.h -tilde.o: $(BUILD_DIR)/config.h - -# Rules for deficient makes, like SunOS and Solaris -tilde.o: tilde.c diff --git a/bash-5.1/pathexp.c b/bash-5.1/pathexp.c index 3b562b82b732ff4710c34e7d74fcdee02d500267..3c59c876022e481d5a95139278ceaa847bf3b773 100644 --- a/bash-5.1/pathexp.c +++ b/bash-5.1/pathexp.c @@ -639,7 +639,7 @@ setup_ignore_patterns (ivp) this_ignoreval = get_string_value (ivp->varname); - /* If nothing has changed then just exit now. */ + /* If nothing has changed then just exit now. */ //相等就退出,想更新? if ((this_ignoreval && ivp->last_ignoreval && STREQ (this_ignoreval, ivp->last_ignoreval)) || (!this_ignoreval && !ivp->last_ignoreval)) return; @@ -668,11 +668,7 @@ setup_ignore_patterns (ivp) numitems = maxitems = ptr = 0; -#if 0 - while (colon_bit = extract_colon_unit (this_ignoreval, &ptr)) -#else while (colon_bit = split_ignorespec (this_ignoreval, &ptr)) -#endif { if (numitems + 1 >= maxitems) { diff --git a/bash-5.1/po/Makefile b/bash-5.1/po/Makefile deleted file mode 100644 index 19d7f1eb336747fa456317ecc08596ffdb604af1..0000000000000000000000000000000000000000 --- a/bash-5.1/po/Makefile +++ /dev/null @@ -1,535 +0,0 @@ -# Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper -# -# This file can be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU General Public -# License but which still want to provide support for the GNU gettext -# functionality. -# Please note that the actual code of GNU gettext is covered by the GNU -# General Public License and is *not* in the public domain. - -PACKAGE = rash -VERSION = 0.1-release - -SHELL = /bin/sh - - -srcdir = . -top_srcdir = .. - - -topdir = .. -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -prefix = /usr/local -exec_prefix = ${prefix} - -datarootdir = ${prefix}/share -datadir = ${datarootdir} -localedir = ${datarootdir}/locale - -gettextsrcdir = $(datadir)/gettext/po - -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -MKINSTALLDIRS = $(top_srcdir)/support/mkinstalldirs -mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) - -GMSGFMT = /usr/bin/msgfmt -MSGFMT = /usr/bin/msgfmt -XGETTEXT = /usr/bin/xgettext -MSGMERGE = msgmerge -MSGMERGE_UPDATE = /usr/bin/msgmerge --update -MSGINIT = msginit -MSGCONV = msgconv -MSGFILTER = msgfilter - -POFILES = en@quot.po en@boldquot.po af.po bg.po ca.po cs.po da.po de.po el.po eo.po es.po et.po fi.po fr.po ga.po gl.po hr.po hu.po id.po it.po ja.po ko.po lt.po nb.po nl.po pl.po pt.po pt_BR.po ro.po ru.po sk.po sl.po sr.po sv.po tr.po uk.po vi.po zh_CN.po zh_TW.po -GMOFILES = en@quot.gmo en@boldquot.gmo af.gmo bg.gmo ca.gmo cs.gmo da.gmo de.gmo el.gmo eo.gmo es.gmo et.gmo fi.gmo fr.gmo ga.gmo gl.gmo hr.gmo hu.gmo id.gmo it.gmo ja.gmo ko.gmo lt.gmo nb.gmo nl.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sl.gmo sr.gmo sv.gmo tr.gmo uk.gmo vi.gmo zh_CN.gmo zh_TW.gmo -UPDATEPOFILES = en@quot.po-update en@boldquot.po-update af.po-update bg.po-update ca.po-update cs.po-update da.po-update de.po-update el.po-update eo.po-update es.po-update et.po-update fi.po-update fr.po-update ga.po-update gl.po-update hr.po-update hu.po-update id.po-update it.po-update ja.po-update ko.po-update lt.po-update nb.po-update nl.po-update pl.po-update pt.po-update pt_BR.po-update ro.po-update ru.po-update sk.po-update sl.po-update sr.po-update sv.po-update tr.po-update uk.po-update vi.po-update zh_CN.po-update zh_TW.po-update -DUMMYPOFILES = en@quot.nop en@boldquot.nop af.nop bg.nop ca.nop cs.nop da.nop de.nop el.nop eo.nop es.nop et.nop fi.nop fr.nop ga.nop gl.nop hr.nop hu.nop id.nop it.nop ja.nop ko.nop lt.nop nb.nop nl.nop pl.nop pt.nop pt_BR.nop ro.nop ru.nop sk.nop sl.nop sr.nop sv.nop tr.nop uk.nop vi.nop zh_CN.nop zh_TW.nop -DISTFILES.common = Makefile.in.in remove-potcdate.sin \ -$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) -DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ -$(POFILES) $(GMOFILES) \ -$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) - -POTFILES = \ - ../arrayfunc.c \ - ../bashhist.c \ - ../bashline.c \ - ../braces.c \ - ../builtins/alias.def \ - ../builtins/bind.def \ - ../builtins/break.def \ - ../builtins/caller.def \ - ../builtins/cd.def \ - ../builtins/common.c \ - ../builtins/complete.def \ - ../builtins/declare.def \ - ../builtins/enable.def \ - ../builtins/evalfile.c \ - ../builtins/exec.def \ - ../builtins/exit.def \ - ../builtins/fc.def \ - ../builtins/fg_bg.def \ - ../builtins/getopt.c \ - ../builtins/hash.def \ - ../builtins/help.def \ - ../builtins/history.def \ - ../builtins/inlib.def \ - ../builtins/jobs.def \ - ../builtins/kill.def \ - ../builtins/let.def \ - ../builtins/mapfile.def \ - ../builtins/mkbuiltins.c \ - ../builtins/printf.def \ - ../builtins/pushd.def \ - ../builtins/read.def \ - ../builtins/return.def \ - ../builtins/set.def \ - ../builtins/setattr.def \ - ../builtins/shift.def \ - ../builtins/shopt.def \ - ../builtins/source.def \ - ../builtins/suspend.def \ - ../builtins/type.def \ - ../builtins/ulimit.def \ - ../builtins/umask.def \ - ../error.c \ - ../eval.c \ - ../execute_cmd.c \ - ../expr.c \ - ../general.c \ - ../input.c \ - ../jobs.c \ - ../lib/intl/os2compat.c \ - ../lib/malloc/malloc.c \ - ../lib/malloc/stats.c \ - ../lib/malloc/table.c \ - ../lib/malloc/watch.c \ - ../lib/sh/fmtulong.c \ - ../lib/sh/netopen.c \ - ../locale.c \ - ../mailcheck.c \ - ../make_cmd.c \ - ../nojobs.c \ - ../parse.y \ - ../pcomplete.c \ - ../pcomplib.c \ - ../print_cmd.c \ - ../redir.c \ - ../shell.c \ - ../sig.c \ - ../siglist.c \ - ../subst.c \ - ../test.c \ - ../trap.c \ - ../variables.c \ - ../version.c \ - ../version2.c \ - ../xmalloc.c - -CATALOGS = en@quot.gmo en@boldquot.gmo af.gmo bg.gmo ca.gmo cs.gmo da.gmo de.gmo el.gmo eo.gmo es.gmo et.gmo fi.gmo fr.gmo ga.gmo gl.gmo hr.gmo hu.gmo id.gmo it.gmo ja.gmo ko.gmo lt.gmo nb.gmo nl.gmo pl.gmo pt.gmo pt_BR.gmo ro.gmo ru.gmo sk.gmo sl.gmo sr.gmo sv.gmo tr.gmo uk.gmo vi.gmo zh_CN.gmo zh_TW.gmo - -# Makevars gets inserted here. (Don't remove this line!) -# Makefile variables for PO directory in any package using GNU gettext. - -# Usually the message domain is the same as the package name. -DOMAIN = $(PACKAGE) - -# These two variables depend on the location of this directory. -subdir = po -top_builddir = $(BUILD_DIR) - -# These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ -C - -# This is the copyright holder that gets inserted into the header of the -# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding -# package. (Note that the msgstr strings, extracted from the package's -# sources, belong to the copyright holder of the package.) Translators are -# expected to transfer the copyright for their translations to this person -# or entity, or to disclaim their copyright. The empty string stands for -# the public domain; in this case the translators are expected to disclaim -# their copyright. -COPYRIGHT_HOLDER = Free Software Foundation, Inc. - -# This is the email address or URL to which the translators shall report -# bugs in the untranslated strings: -# - Strings which are not entire sentences, see the maintainer guidelines -# in the GNU gettext documentation, section 'Preparing Strings'. -# - Strings which use unclear terms or require additional context to be -# understood. -# - Strings which make invalid assumptions about notation of date, time or -# money. -# - Pluralisation problems. -# - Incorrect English spelling. -# - Incorrect formatting. -# It can be your email address, or a mailing list address where translators -# can write to without being subscribed, or the URL of a web page through -# which the translators can contact you. -MSGID_BUGS_ADDRESS = bug-bash@gnu.org - -# This is the list of locale categories, beyond LC_MESSAGES, for which the -# message catalogs shall be used. It is usually empty. -EXTRA_LOCALE_CATEGORIES = - -.SUFFIXES: -.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update - -.po.mo: - @echo "$(MSGFMT) -c -o $@ $<"; \ - $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ - -.po.gmo: - @lang=`echo $* | sed -e 's,.*/,,'`; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo - -.sin.sed: - sed -e '/^#/d' $< > t-$@ - mv t-$@ $@ - - -all: all-yes - -all-yes: stamp-po -all-no: - -# stamp-po is a timestamp denoting the last time at which the CATALOGS have -# been loosely updated. Its purpose is that when a developer or translator -# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, -# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent -# invocations of "make" will do nothing. This timestamp would not be necessary -# if updating the $(CATALOGS) would always touch them; however, the rule for -# $(POFILES) has been designed to not touch files that don't need to be -# changed. -stamp-po: $(srcdir)/$(DOMAIN).pot - test -z "$(CATALOGS)" || $(MAKE) $(CATALOGS) - @echo "touch stamp-po" - @echo timestamp > stamp-poT - @mv stamp-poT stamp-po - -# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', -# otherwise packages like GCC can not be built if only parts of the source -# have been downloaded. - -# This target rebuilds $(DOMAIN).pot; it is an expensive operation. -# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. -$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed - $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ - --files-from=$(srcdir)/POTFILES.in \ - --copyright-holder='$(COPYRIGHT_HOLDER)' - $(MAKE) $(MFLAGS) builtins.pot-update - test ! -f $(DOMAIN).po || { \ - if test -f $(srcdir)/$(DOMAIN).pot; then \ - sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ - sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ - if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ - rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ - else \ - rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ - mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ - fi; \ - else \ - mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ - fi; \ - } - -# This rule has no dependencies: we don't need to update $(DOMAIN).pot at -# every "make" invocation, only create it when it is missing. -# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. -$(srcdir)/$(DOMAIN).pot: - $(MAKE) $(DOMAIN).pot-update - -# This target rebuilds a PO file if $(DOMAIN).pot has changed. -# Note that a PO file is not touched if it doesn't need to be changed. -$(POFILES): $(srcdir)/$(DOMAIN).pot - @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot - - -install: install-exec install-data -install-exec: -install-data: install-data-yes - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ - for file in $(DISTFILES.common) Makevars.template; do \ - $(INSTALL_DATA) $(srcdir)/$$file \ - $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - for file in Makevars; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi -install-data-no: all -install-data-yes: all - $(mkinstalldirs) $(DESTDIR)$(datadir) - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ - if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ - $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ - echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ - link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ - mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ - for file in *; do \ - if test -f $$file; then \ - ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ - fi; \ - done); \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - else \ - if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ - :; \ - else \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - fi; \ - fi; \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ - ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ - cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ - fi; \ - done; \ - done - -install-strip: install - -installdirs: installdirs-exec installdirs-data -installdirs-exec: -installdirs-data: installdirs-data-yes - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ - else \ - : ; \ - fi -installdirs-data-no: -installdirs-data-yes: - $(mkinstalldirs) $(DESTDIR)$(datadir) - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ - link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ - mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ - for file in *; do \ - if test -f $$file; then \ - ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ - fi; \ - done); \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - else \ - if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ - :; \ - else \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - fi; \ - fi; \ - fi; \ - done; \ - done - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: uninstall-exec uninstall-data -uninstall-exec: -uninstall-data: uninstall-data-yes - if test "$(PACKAGE)" = "gettext-tools"; then \ - for file in $(DISTFILES.common) Makevars.template; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi -uninstall-data-no: -uninstall-data-yes: - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - done; \ - done - -check: all - -info dvi ps pdf html tags TAGS ctags CTAGS ID: - -mostlyclean: - rm -f remove-potcdate.sed - rm -f stamp-poT - rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po - rm -fr *.o - -clean: mostlyclean - -distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo stamp-po - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - rm -f stamp-po $(GMOFILES) - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: - $(MAKE) update-po - @$(MAKE) dist2 -# This is a separate target because 'update-po' must be executed before. -dist2: $(DISTFILES) - dists="$(DISTFILES)"; \ - if test "$(PACKAGE)" = "gettext-tools"; then \ - dists="$$dists Makevars.template"; \ - fi; \ - if test -f $(srcdir)/ChangeLog; then \ - dists="$$dists ChangeLog"; \ - fi; \ - for i in 0 1 2 3 4 5 6 7 8 9; do \ - if test -f $(srcdir)/ChangeLog.$$i; then \ - dists="$$dists ChangeLog.$$i"; \ - fi; \ - done; \ - if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ - for file in $$dists; do \ - if test -f $$file; then \ - cp -p $$file $(distdir); \ - else \ - cp -p $(srcdir)/$$file $(distdir); \ - fi; \ - done - -update-po: Makefile - $(MAKE) $(DOMAIN).pot-update - test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) - $(MAKE) update-gmo - -# General rule for updating PO files. - -.nop.po-update: - @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ - if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ - tmpdir=`pwd`; \ - echo "$$lang:"; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ - cd $(srcdir); \ - if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ - if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "msgmerge for $$lang.po failed!" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi - -$(DUMMYPOFILES): - -update-gmo: Makefile $(GMOFILES) - @: - -Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in LINGUAS $(srcdir)/Rules-builtins - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ - $(SHELL) ./config.status - -force: - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: -# -# Update the strings from the builtins' long docs. Must be called when -# bash.pot exists, in the middle of the bash.pot-update recipe -# -builtins.pot-update: $(top_builddir)/builtins/builtins.c - $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_builddir)/builtins \ - $(XGETTEXT_OPTIONS) --omit-header \ - --copyright-holder='$(COPYRIGHT_HOLDER)' \ - --join-existing \ - builtins.c - -# This rule has no dependencies: we don't need to update builtins.pot at -# every "make" invocation, only create it when it is missing. -# Only "make builtins.pot-update" or "make dist" will force an update. -$(srcdir)/builtins.pot: - $(MAKE) builtins.pot-update - -xdist: - $(MAKE) update-po -# Special Makefile rules for English message catalogs with quotation marks. - -DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot - -.SUFFIXES: .insert-header .po-update-en - -en@quot.po-update: en@quot.po-update-en -en@boldquot.po-update: en@boldquot.po-update-en - -.insert-header.po-update-en: - @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ - if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ - tmpdir=`pwd`; \ - echo "$$lang:"; \ - ll=`echo $$lang | sed -e 's/@.*//'`; \ - LC_ALL=C; export LC_ALL; \ - cd $(srcdir); \ - if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \ - if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "creation of $$lang.po failed!" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi - -en@quot.insert-header: insert-header.sin - sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header - -en@boldquot.insert-header: insert-header.sin - sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header - -mostlyclean: mostlyclean-quot -mostlyclean-quot: - rm -f *.insert-header diff --git a/bash-5.1/po/Makefile.in b/bash-5.1/po/Makefile.in deleted file mode 100644 index ac2a672792057ead38571b92eb95d5e394f0c76c..0000000000000000000000000000000000000000 --- a/bash-5.1/po/Makefile.in +++ /dev/null @@ -1,359 +0,0 @@ -# Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper -# -# This file can be copied and used freely without restrictions. It can -# be used in projects which are not available under the GNU General Public -# License but which still want to provide support for the GNU gettext -# functionality. -# Please note that the actual code of GNU gettext is covered by the GNU -# General Public License and is *not* in the public domain. - -PACKAGE = rash -VERSION = 0.1-release - -SHELL = /bin/sh - - -srcdir = . -top_srcdir = .. - - -topdir = .. -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -prefix = /usr/local -exec_prefix = ${prefix} - -datarootdir = ${prefix}/share -datadir = ${datarootdir} -localedir = ${datarootdir}/locale - -gettextsrcdir = $(datadir)/gettext/po - -INSTALL = /usr/bin/install -c -INSTALL_DATA = ${INSTALL} -m 644 -MKINSTALLDIRS = $(top_srcdir)/support/mkinstalldirs -mkinstalldirs = $(SHELL) $(MKINSTALLDIRS) - -GMSGFMT = /usr/bin/msgfmt -MSGFMT = /usr/bin/msgfmt -XGETTEXT = /usr/bin/xgettext -MSGMERGE = msgmerge -MSGMERGE_UPDATE = /usr/bin/msgmerge --update -MSGINIT = msginit -MSGCONV = msgconv -MSGFILTER = msgfilter - -POFILES = @POFILES@ -GMOFILES = @GMOFILES@ -UPDATEPOFILES = @UPDATEPOFILES@ -DUMMYPOFILES = @DUMMYPOFILES@ -DISTFILES.common = Makefile.in.in remove-potcdate.sin \ -$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3) -DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \ -$(POFILES) $(GMOFILES) \ -$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3) - -POTFILES = \ - -CATALOGS = @CATALOGS@ - -# Makevars gets inserted here. (Don't remove this line!) - -.SUFFIXES: -.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update - -.po.mo: - @echo "$(MSGFMT) -c -o $@ $<"; \ - $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@ - -.po.gmo: - @lang=`echo $* | sed -e 's,.*/,,'`; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo - -.sin.sed: - sed -e '/^#/d' $< > t-$@ - mv t-$@ $@ - - -all: all-yes - -all-yes: stamp-po -all-no: - -# stamp-po is a timestamp denoting the last time at which the CATALOGS have -# been loosely updated. Its purpose is that when a developer or translator -# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS, -# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent -# invocations of "make" will do nothing. This timestamp would not be necessary -# if updating the $(CATALOGS) would always touch them; however, the rule for -# $(POFILES) has been designed to not touch files that don't need to be -# changed. -stamp-po: $(srcdir)/$(DOMAIN).pot - test -z "$(CATALOGS)" || $(MAKE) $(CATALOGS) - @echo "touch stamp-po" - @echo timestamp > stamp-poT - @mv stamp-poT stamp-po - -# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update', -# otherwise packages like GCC can not be built if only parts of the source -# have been downloaded. - -# This target rebuilds $(DOMAIN).pot; it is an expensive operation. -# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. -$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed - $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \ - --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \ - --files-from=$(srcdir)/POTFILES.in \ - --copyright-holder='$(COPYRIGHT_HOLDER)' - $(MAKE) $(MFLAGS) builtins.pot-update - test ! -f $(DOMAIN).po || { \ - if test -f $(srcdir)/$(DOMAIN).pot; then \ - sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \ - sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \ - if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \ - rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \ - else \ - rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \ - mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ - fi; \ - else \ - mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \ - fi; \ - } - -# This rule has no dependencies: we don't need to update $(DOMAIN).pot at -# every "make" invocation, only create it when it is missing. -# Only "make $(DOMAIN).pot-update" or "make dist" will force an update. -$(srcdir)/$(DOMAIN).pot: - $(MAKE) $(DOMAIN).pot-update - -# This target rebuilds a PO file if $(DOMAIN).pot has changed. -# Note that a PO file is not touched if it doesn't need to be changed. -$(POFILES): $(srcdir)/$(DOMAIN).pot - @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot - - -install: install-exec install-data -install-exec: -install-data: install-data-yes - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ - for file in $(DISTFILES.common) Makevars.template; do \ - $(INSTALL_DATA) $(srcdir)/$$file \ - $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - for file in Makevars; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi -install-data-no: all -install-data-yes: all - $(mkinstalldirs) $(DESTDIR)$(datadir) - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ - if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \ - $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \ - echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ - link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ - mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ - for file in *; do \ - if test -f $$file; then \ - ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ - fi; \ - done); \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - else \ - if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ - :; \ - else \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - fi; \ - fi; \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ - ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \ - cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \ - fi; \ - done; \ - done - -install-strip: install - -installdirs: installdirs-exec installdirs-data -installdirs-exec: -installdirs-data: installdirs-data-yes - if test "$(PACKAGE)" = "gettext-tools"; then \ - $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \ - else \ - : ; \ - fi -installdirs-data-no: -installdirs-data-yes: - $(mkinstalldirs) $(DESTDIR)$(datadir) - @catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - dir=$(localedir)/$$lang/LC_MESSAGES; \ - $(mkinstalldirs) $(DESTDIR)$$dir; \ - for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \ - if test -n "$$lc"; then \ - if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \ - link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \ - mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \ - for file in *; do \ - if test -f $$file; then \ - ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \ - fi; \ - done); \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \ - else \ - if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \ - :; \ - else \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \ - mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \ - fi; \ - fi; \ - fi; \ - done; \ - done - -# Define this as empty until I found a useful application. -installcheck: - -uninstall: uninstall-exec uninstall-data -uninstall-exec: -uninstall-data: uninstall-data-yes - if test "$(PACKAGE)" = "gettext-tools"; then \ - for file in $(DISTFILES.common) Makevars.template; do \ - rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \ - done; \ - else \ - : ; \ - fi -uninstall-data-no: -uninstall-data-yes: - catalogs='$(CATALOGS)'; \ - for cat in $$catalogs; do \ - cat=`basename $$cat`; \ - lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \ - for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \ - rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \ - done; \ - done - -check: all - -info dvi ps pdf html tags TAGS ctags CTAGS ID: - -mostlyclean: - rm -f remove-potcdate.sed - rm -f stamp-poT - rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po - rm -fr *.o - -clean: mostlyclean - -distclean: clean - rm -f Makefile Makefile.in POTFILES *.mo stamp-po - -maintainer-clean: distclean - @echo "This command is intended for maintainers to use;" - @echo "it deletes files that may require special tools to rebuild." - rm -f stamp-po $(GMOFILES) - -distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) -dist distdir: - $(MAKE) update-po - @$(MAKE) dist2 -# This is a separate target because 'update-po' must be executed before. -dist2: $(DISTFILES) - dists="$(DISTFILES)"; \ - if test "$(PACKAGE)" = "gettext-tools"; then \ - dists="$$dists Makevars.template"; \ - fi; \ - if test -f $(srcdir)/ChangeLog; then \ - dists="$$dists ChangeLog"; \ - fi; \ - for i in 0 1 2 3 4 5 6 7 8 9; do \ - if test -f $(srcdir)/ChangeLog.$$i; then \ - dists="$$dists ChangeLog.$$i"; \ - fi; \ - done; \ - if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \ - for file in $$dists; do \ - if test -f $$file; then \ - cp -p $$file $(distdir); \ - else \ - cp -p $(srcdir)/$$file $(distdir); \ - fi; \ - done - -update-po: Makefile - $(MAKE) $(DOMAIN).pot-update - test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES) - $(MAKE) update-gmo - -# General rule for updating PO files. - -.nop.po-update: - @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \ - if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \ - tmpdir=`pwd`; \ - echo "$$lang:"; \ - test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ - cd $(srcdir); \ - if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ - if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ - rm -f $$tmpdir/$$lang.new.po; \ - else \ - if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ - :; \ - else \ - echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ - exit 1; \ - fi; \ - fi; \ - else \ - echo "msgmerge for $$lang.po failed!" 1>&2; \ - rm -f $$tmpdir/$$lang.new.po; \ - fi - -$(DUMMYPOFILES): - -update-gmo: Makefile $(GMOFILES) - @: - -Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ $(srcdir)/Rules-builtins - cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ - $(SHELL) ./config.status - -force: - -# Tell versions [3.59,3.63) of GNU make not to export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/bash-5.1/po/POTFILES b/bash-5.1/po/POTFILES deleted file mode 100644 index 988b64c2c0a24d3321f74259ff89bc7f06b34e80..0000000000000000000000000000000000000000 --- a/bash-5.1/po/POTFILES +++ /dev/null @@ -1,74 +0,0 @@ - ../arrayfunc.c \ - ../bashhist.c \ - ../bashline.c \ - ../braces.c \ - ../builtins/alias.def \ - ../builtins/bind.def \ - ../builtins/break.def \ - ../builtins/caller.def \ - ../builtins/cd.def \ - ../builtins/common.c \ - ../builtins/complete.def \ - ../builtins/declare.def \ - ../builtins/enable.def \ - ../builtins/evalfile.c \ - ../builtins/exec.def \ - ../builtins/exit.def \ - ../builtins/fc.def \ - ../builtins/fg_bg.def \ - ../builtins/getopt.c \ - ../builtins/hash.def \ - ../builtins/help.def \ - ../builtins/history.def \ - ../builtins/inlib.def \ - ../builtins/jobs.def \ - ../builtins/kill.def \ - ../builtins/let.def \ - ../builtins/mapfile.def \ - ../builtins/mkbuiltins.c \ - ../builtins/printf.def \ - ../builtins/pushd.def \ - ../builtins/read.def \ - ../builtins/return.def \ - ../builtins/set.def \ - ../builtins/setattr.def \ - ../builtins/shift.def \ - ../builtins/shopt.def \ - ../builtins/source.def \ - ../builtins/suspend.def \ - ../builtins/type.def \ - ../builtins/ulimit.def \ - ../builtins/umask.def \ - ../error.c \ - ../eval.c \ - ../execute_cmd.c \ - ../expr.c \ - ../general.c \ - ../input.c \ - ../jobs.c \ - ../lib/intl/os2compat.c \ - ../lib/malloc/malloc.c \ - ../lib/malloc/stats.c \ - ../lib/malloc/table.c \ - ../lib/malloc/watch.c \ - ../lib/sh/fmtulong.c \ - ../lib/sh/netopen.c \ - ../locale.c \ - ../mailcheck.c \ - ../make_cmd.c \ - ../nojobs.c \ - ../parse.y \ - ../pcomplete.c \ - ../pcomplib.c \ - ../print_cmd.c \ - ../redir.c \ - ../shell.c \ - ../sig.c \ - ../siglist.c \ - ../subst.c \ - ../test.c \ - ../trap.c \ - ../variables.c \ - ../version.c \ - ../version2.c \ - ../xmalloc.c diff --git a/bash-5.1/r_bash/src/lib.rs b/bash-5.1/r_bash/src/lib.rs deleted file mode 100644 index 4a7505d6942fd3f36797dbf8bcaabddc113421b0..0000000000000000000000000000000000000000 --- a/bash-5.1/r_bash/src/lib.rs +++ /dev/null @@ -1,14373 +0,0 @@ -/* automatically generated by rust-bindgen */ - -#[repr(C)] -#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] -pub struct __BindgenBitfieldUnit -where - Storage: AsRef<[u8]> + AsMut<[u8]>, -{ - storage: Storage, - align: [Align; 0], -} -impl __BindgenBitfieldUnit -where - Storage: AsRef<[u8]> + AsMut<[u8]>, -{ - #[inline] - pub fn new(storage: Storage) -> Self { - Self { storage, align: [] } - } - #[inline] - pub fn get_bit(&self, index: usize) -> bool { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = self.storage.as_ref()[byte_index]; - let bit_index = if cfg!(target_endian = "big") { - 7 - (index % 8) - } else { - index % 8 - }; - let mask = 1 << bit_index; - byte & mask == mask - } - #[inline] - pub fn set_bit(&mut self, index: usize, val: bool) { - debug_assert!(index / 8 < self.storage.as_ref().len()); - let byte_index = index / 8; - let byte = &mut self.storage.as_mut()[byte_index]; - let bit_index = if cfg!(target_endian = "big") { - 7 - (index % 8) - } else { - index % 8 - }; - let mask = 1 << bit_index; - if val { - *byte |= mask; - } else { - *byte &= !mask; - } - } - #[inline] - pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { - debug_assert!(bit_width <= 64); - debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); - debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); - let mut val = 0; - for i in 0..(bit_width as usize) { - if self.get_bit(i + bit_offset) { - let index = if cfg!(target_endian = "big") { - bit_width as usize - 1 - i - } else { - i - }; - val |= 1 << index; - } - } - val - } - #[inline] - pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { - debug_assert!(bit_width <= 64); - debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); - debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); - for i in 0..(bit_width as usize) { - let mask = 1 << i; - let val_bit_is_set = val & mask == mask; - let index = if cfg!(target_endian = "big") { - bit_width as usize - 1 - i - } else { - i - }; - self.set_bit(index + bit_offset, val_bit_is_set); - } - } -} -#[repr(C)] -#[derive(Default)] -pub struct __IncompleteArrayField(::core::marker::PhantomData, [T; 0]); -impl __IncompleteArrayField { - #[inline] - pub fn new() -> Self { - __IncompleteArrayField(::core::marker::PhantomData, []) - } - #[inline] - pub unsafe fn as_ptr(&self) -> *const T { - ::core::mem::transmute(self) - } - #[inline] - pub unsafe fn as_mut_ptr(&mut self) -> *mut T { - ::core::mem::transmute(self) - } - #[inline] - pub unsafe fn as_slice(&self, len: usize) -> &[T] { - ::core::slice::from_raw_parts(self.as_ptr(), len) - } - #[inline] - pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { - ::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len) - } -} -impl ::core::fmt::Debug for __IncompleteArrayField { - fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result { - fmt.write_str("__IncompleteArrayField") - } -} -impl ::core::clone::Clone for __IncompleteArrayField { - #[inline] - fn clone(&self) -> Self { - Self::new() - } -} -pub const __EXTENSIONS__: u32 = 1; -pub const _ALL_SOURCE: u32 = 1; -pub const _GNU_SOURCE: u32 = 1; -pub const _POSIX_PTHREAD_SEMANTICS: u32 = 1; -pub const _TANDEM_SOURCE: u32 = 1; -pub const JOB_CONTROL: u32 = 1; -pub const ALIAS: u32 = 1; -pub const PUSHD_AND_POPD: u32 = 1; -pub const BRACE_EXPANSION: u32 = 1; -pub const READLINE: u32 = 1; -pub const BANG_HISTORY: u32 = 1; -pub const HISTORY: u32 = 1; -pub const HELP_BUILTIN: u32 = 1; -pub const RESTRICTED_SHELL: u32 = 1; -pub const PROCESS_SUBSTITUTION: u32 = 1; -pub const PROMPT_STRING_DECODE: u32 = 1; -pub const SELECT_COMMAND: u32 = 1; -pub const COMMAND_TIMING: u32 = 1; -pub const ARRAY_VARS: u32 = 1; -pub const DPAREN_ARITHMETIC: u32 = 1; -pub const EXTENDED_GLOB: u32 = 1; -pub const EXTGLOB_DEFAULT: u32 = 0; -pub const COND_COMMAND: u32 = 1; -pub const COND_REGEXP: u32 = 1; -pub const COPROCESS_SUPPORT: u32 = 1; -pub const ARITH_FOR_COMMAND: u32 = 1; -pub const NETWORK_REDIRECTIONS: u32 = 1; -pub const PROGRAMMABLE_COMPLETION: u32 = 1; -pub const DEBUGGER: u32 = 1; -pub const MEMSCRAMBLE: u32 = 1; -pub const CASEMOD_ATTRS: u32 = 1; -pub const CASEMOD_EXPANSIONS: u32 = 1; -pub const GLOBASCII_DEFAULT: u32 = 1; -pub const FUNCTION_IMPORT: u32 = 1; -pub const ENABLE_NLS: u32 = 1; -pub const DEFAULT_PATH_VALUE: &'static [u8; 63usize] = - b"/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:.\0"; -pub const STANDARD_UTILS_PATH: &'static [u8; 30usize] = b"/bin:/usr/bin:/usr/sbin:/sbin\0"; -pub const PPROMPT: &'static [u8; 11usize] = b"\\s-\\\\v\\\\$ \0"; -pub const SPROMPT: &'static [u8; 3usize] = b"> \0"; -pub const DEFAULT_BASHRC: &'static [u8; 10usize] = b"~/.bashrc\0"; -pub const SYS_BASH_LOGOUT: &'static [u8; 22usize] = b"/etc/bash.bash_logout\0"; -pub const MULTIPLE_COPROCS: u32 = 0; -pub const CHECKWINSIZE_DEFAULT: u32 = 1; -pub const OPTIMIZE_SEQUENTIAL_ARRAY_ASSIGNMENT: u32 = 1; -pub const CHECKHASH_DEFAULT: u32 = 0; -pub const EVALNEST_MAX: u32 = 0; -pub const SOURCENEST_MAX: u32 = 0; -pub const OLDPWD_CHECK_DIRECTORY: u32 = 1; -pub const HISTEXPAND_DEFAULT: u32 = 1; -pub const ASSOC_KVPAIR_ASSIGNMENT: u32 = 1; -pub const HAVE_STRINGIZE: u32 = 1; -pub const HAVE_LONG_DOUBLE: u32 = 1; -pub const PROTOTYPES: u32 = 1; -pub const __PROTOTYPES: u32 = 1; -pub const HAVE_LONG_LONG: u32 = 1; -pub const HAVE_UNSIGNED_LONG_LONG: u32 = 1; -pub const SIZEOF_INT: u32 = 4; -pub const SIZEOF_LONG: u32 = 8; -pub const SIZEOF_CHAR_P: u32 = 8; -pub const SIZEOF_DOUBLE: u32 = 8; -pub const SIZEOF_INTMAX_T: u32 = 8; -pub const SIZEOF_LONG_LONG: u32 = 8; -pub const SIZEOF_WCHAR_T: u32 = 4; -pub const DEFAULT_MAIL_DIRECTORY: &'static [u8; 10usize] = b"/var/mail\0"; -pub const STDC_HEADERS: u32 = 1; -pub const HAVE_ALLOCA: u32 = 1; -pub const HAVE_ALLOCA_H: u32 = 1; -pub const MAJOR_IN_SYSMACROS: u32 = 1; -pub const HAVE_MBSTATE_T: u32 = 1; -pub const HAVE_QUAD_T: u32 = 1; -pub const HAVE_WCHAR_T: u32 = 1; -pub const HAVE_WCTYPE_T: u32 = 1; -pub const HAVE_WINT_T: u32 = 1; -pub const HAVE_DECL_SYS_SIGLIST: u32 = 1; -pub const UNDER_SYS_SIGLIST_DECLARED: u32 = 1; -pub const HAVE_SYS_SIGLIST: u32 = 1; -pub const HAVE_UNDER_SYS_SIGLIST: u32 = 1; -pub const HAVE_SYS_ERRLIST: u32 = 1; -pub const HAVE_STRUCT_DIRENT_D_INO: u32 = 1; -pub const HAVE_STRUCT_DIRENT_D_FILENO: u32 = 1; -pub const FIONREAD_IN_SYS_IOCTL: u32 = 1; -pub const GWINSZ_IN_SYS_IOCTL: u32 = 1; -pub const STRUCT_WINSIZE_IN_SYS_IOCTL: u32 = 1; -pub const TERMIOS_LDISC: u32 = 1; -pub const TERMIO_LDISC: u32 = 1; -pub const HAVE_STRUCT_STAT_ST_BLOCKS: u32 = 1; -pub const HAVE_STRUCT_TM_TM_ZONE: u32 = 1; -pub const HAVE_TM_ZONE: u32 = 1; -pub const HAVE_TIMEVAL: u32 = 1; -pub const HAVE_STRUCT_TIMEZONE: u32 = 1; -pub const WEXITSTATUS_OFFSET: u32 = 8; -pub const HAVE_STRUCT_TIMESPEC: u32 = 1; -pub const TIME_H_DEFINES_STRUCT_TIMESPEC: u32 = 1; -pub const HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC: u32 = 1; -pub const TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC: u32 = 1; -pub const HAVE_GETPW_DECLS: u32 = 1; -pub const HAVE_DECL_AUDIT_USER_TTY: u32 = 1; -pub const HAVE_DECL_CONFSTR: u32 = 1; -pub const HAVE_DECL_PRINTF: u32 = 1; -pub const HAVE_DECL_SBRK: u32 = 1; -pub const HAVE_DECL_STRCPY: u32 = 1; -pub const HAVE_DECL_STRSIGNAL: u32 = 1; -pub const HAVE_DECL_STRTOLD: u32 = 1; -pub const HAVE_DECL_STRTOIMAX: u32 = 1; -pub const HAVE_DECL_STRTOL: u32 = 1; -pub const HAVE_DECL_STRTOLL: u32 = 1; -pub const HAVE_DECL_STRTOUL: u32 = 1; -pub const HAVE_DECL_STRTOULL: u32 = 1; -pub const HAVE_DECL_STRTOUMAX: u32 = 1; -pub const GETPGRP_VOID: u32 = 1; -pub const PGRP_PIPE: u32 = 1; -pub const ULIMIT_MAXFDS: u32 = 1; -pub const CAN_REDEFINE_GETENV: u32 = 1; -pub const HAVE_STD_PUTENV: u32 = 1; -pub const HAVE_STD_UNSETENV: u32 = 1; -pub const HAVE_PRINTF_A_FORMAT: u32 = 1; -pub const HAVE_LANGINFO_CODESET: u32 = 1; -pub const HAVE_HASH_BANG_EXEC: u32 = 1; -pub const HAVE_DEV_FD: u32 = 1; -pub const DEV_FD_PREFIX: &'static [u8; 9usize] = b"/dev/fd/\0"; -pub const HAVE_DEV_STDIN: u32 = 1; -pub const VOID_SIGHANDLER: u32 = 1; -pub const HAVE_POSIX_SIGNALS: u32 = 1; -pub const HAVE_ASPRINTF: u32 = 1; -pub const HAVE_BCOPY: u32 = 1; -pub const HAVE_BZERO: u32 = 1; -pub const HAVE_CHOWN: u32 = 1; -pub const HAVE_CONFSTR: u32 = 1; -pub const HAVE_DLCLOSE: u32 = 1; -pub const HAVE_DLOPEN: u32 = 1; -pub const HAVE_DLSYM: u32 = 1; -pub const HAVE_DPRINTF: u32 = 1; -pub const HAVE_DUP2: u32 = 1; -pub const HAVE_EACCESS: u32 = 1; -pub const HAVE_FACCESSAT: u32 = 1; -pub const HAVE_FCNTL: u32 = 1; -pub const HAVE_FNMATCH: u32 = 1; -pub const FNMATCH_EQUIV_FALLBACK: u32 = 1; -pub const HAVE___FPURGE: u32 = 1; -pub const HAVE_DECL_FPURGE: u32 = 0; -pub const HAVE_GETADDRINFO: u32 = 1; -pub const HAVE_GETCWD: u32 = 1; -pub const HAVE_GETENTROPY: u32 = 1; -pub const HAVE_GETDTABLESIZE: u32 = 1; -pub const HAVE_GETGROUPS: u32 = 1; -pub const HAVE_GETHOSTBYNAME: u32 = 1; -pub const HAVE_GETHOSTNAME: u32 = 1; -pub const HAVE_GETPAGESIZE: u32 = 1; -pub const HAVE_GETPEERNAME: u32 = 1; -pub const HAVE_GETPWENT: u32 = 1; -pub const HAVE_GETPWNAM: u32 = 1; -pub const HAVE_GETPWUID: u32 = 1; -pub const HAVE_GETRANDOM: u32 = 1; -pub const HAVE_GETRLIMIT: u32 = 1; -pub const HAVE_GETRUSAGE: u32 = 1; -pub const HAVE_GETSERVBYNAME: u32 = 1; -pub const HAVE_GETSERVENT: u32 = 1; -pub const HAVE_GETTIMEOFDAY: u32 = 1; -pub const HAVE_ICONV: u32 = 1; -pub const HAVE_IMAXDIV: u32 = 1; -pub const HAVE_INET_ATON: u32 = 1; -pub const HAVE_ISASCII: u32 = 1; -pub const HAVE_ISBLANK: u32 = 1; -pub const HAVE_ISGRAPH: u32 = 1; -pub const HAVE_ISPRINT: u32 = 1; -pub const HAVE_ISSPACE: u32 = 1; -pub const HAVE_ISWCTYPE: u32 = 1; -pub const HAVE_ISWLOWER: u32 = 1; -pub const HAVE_ISWUPPER: u32 = 1; -pub const HAVE_ISXDIGIT: u32 = 1; -pub const HAVE_KILL: u32 = 1; -pub const HAVE_KILLPG: u32 = 1; -pub const HAVE_LSTAT: u32 = 1; -pub const HAVE_MBRLEN: u32 = 1; -pub const HAVE_MBRTOWC: u32 = 1; -pub const HAVE_MBSNRTOWCS: u32 = 1; -pub const HAVE_MBSRTOWCS: u32 = 1; -pub const HAVE_MEMMOVE: u32 = 1; -pub const HAVE_MEMSET: u32 = 1; -pub const HAVE_MKDTEMP: u32 = 1; -pub const HAVE_MKFIFO: u32 = 1; -pub const HAVE_MKSTEMP: u32 = 1; -pub const HAVE_PATHCONF: u32 = 1; -pub const HAVE_PSELECT: u32 = 1; -pub const HAVE_PREAD: u32 = 1; -pub const HAVE_PUTENV: u32 = 1; -pub const HAVE_RAISE: u32 = 1; -pub const HAVE_RANDOM: u32 = 1; -pub const HAVE_READLINK: u32 = 1; -pub const HAVE_REGCOMP: u32 = 1; -pub const HAVE_REGEXEC: u32 = 1; -pub const HAVE_RENAME: u32 = 1; -pub const HAVE_SBRK: u32 = 1; -pub const HAVE_SELECT: u32 = 1; -pub const HAVE_SETENV: u32 = 1; -pub const HAVE_SETITIMER: u32 = 1; -pub const HAVE_SETLINEBUF: u32 = 1; -pub const HAVE_SETLOCALE: u32 = 1; -pub const HAVE_DECL_SETREGID: u32 = 1; -pub const HAVE_SETRESGID: u32 = 1; -pub const HAVE_SETRESUID: u32 = 1; -pub const HAVE_SETVBUF: u32 = 1; -pub const HAVE_SIGINTERRUPT: u32 = 1; -pub const HAVE_POSIX_SIGSETJMP: u32 = 1; -pub const HAVE_SNPRINTF: u32 = 1; -pub const HAVE_STRCASECMP: u32 = 1; -pub const HAVE_STRCASESTR: u32 = 1; -pub const HAVE_STRCHR: u32 = 1; -pub const HAVE_STRCHRNUL: u32 = 1; -pub const HAVE_STRCOLL: u32 = 1; -pub const HAVE_STRERROR: u32 = 1; -pub const HAVE_STRFTIME: u32 = 1; -pub const HAVE_STRNLEN: u32 = 1; -pub const HAVE_STRPBRK: u32 = 1; -pub const HAVE_STRSTR: u32 = 1; -pub const HAVE_STRTOD: u32 = 1; -pub const HAVE_STRTOIMAX: u32 = 1; -pub const HAVE_STRTOL: u32 = 1; -pub const HAVE_STRTOLL: u32 = 1; -pub const HAVE_STRTOUL: u32 = 1; -pub const HAVE_STRTOULL: u32 = 1; -pub const HAVE_STRTOUMAX: u32 = 1; -pub const HAVE_STRSIGNAL: u32 = 1; -pub const HAVE_SYSCONF: u32 = 1; -pub const HAVE_SYSLOG: u32 = 1; -pub const HAVE_TCGETATTR: u32 = 1; -pub const HAVE_TCGETPGRP: u32 = 1; -pub const HAVE_TIMES: u32 = 1; -pub const HAVE_TOWLOWER: u32 = 1; -pub const HAVE_TOWUPPER: u32 = 1; -pub const HAVE_TTYNAME: u32 = 1; -pub const HAVE_TZSET: u32 = 1; -pub const HAVE_ULIMIT: u32 = 1; -pub const HAVE_UNAME: u32 = 1; -pub const HAVE_UNSETENV: u32 = 1; -pub const HAVE_VASPRINTF: u32 = 1; -pub const HAVE_VPRINTF: u32 = 1; -pub const HAVE_VSNPRINTF: u32 = 1; -pub const HAVE_WAITPID: u32 = 1; -pub const HAVE_WAIT3: u32 = 1; -pub const HAVE_WCRTOMB: u32 = 1; -pub const HAVE_WCSCOLL: u32 = 1; -pub const HAVE_WCSDUP: u32 = 1; -pub const HAVE_WCTYPE: u32 = 1; -pub const HAVE_WCSWIDTH: u32 = 1; -pub const HAVE_WCWIDTH: u32 = 1; -pub const HAVE_ARPA_INET_H: u32 = 1; -pub const HAVE_DIRENT_H: u32 = 1; -pub const HAVE_DLFCN_H: u32 = 1; -pub const HAVE_GRP_H: u32 = 1; -pub const HAVE_INTTYPES_H: u32 = 1; -pub const HAVE_LANGINFO_H: u32 = 1; -pub const HAVE_LIMITS_H: u32 = 1; -pub const HAVE_LOCALE_H: u32 = 1; -pub const HAVE_NETDB_H: u32 = 1; -pub const HAVE_NETINET_IN_H: u32 = 1; -pub const HAVE_PWD_H: u32 = 1; -pub const HAVE_REGEX_H: u32 = 1; -pub const HAVE_STDLIB_H: u32 = 1; -pub const HAVE_STDARG_H: u32 = 1; -pub const HAVE_STRING_H: u32 = 1; -pub const HAVE_STRINGS_H: u32 = 1; -pub const HAVE_MEMORY_H: u32 = 1; -pub const HAVE_STDBOOL_H: u32 = 1; -pub const HAVE_STDDEF_H: u32 = 1; -pub const HAVE_STDINT_H: u32 = 1; -pub const HAVE_SYSLOG_H: u32 = 1; -pub const HAVE_SYS_FILE_H: u32 = 1; -pub const HAVE_SYS_IOCTL_H: u32 = 1; -pub const HAVE_SYS_MMAN_H: u32 = 1; -pub const HAVE_SYS_PARAM_H: u32 = 1; -pub const HAVE_SYS_RANDOM_H: u32 = 1; -pub const HAVE_SYS_RESOURCE_H: u32 = 1; -pub const HAVE_SYS_SELECT_H: u32 = 1; -pub const HAVE_SYS_SOCKET_H: u32 = 1; -pub const HAVE_SYS_STAT_H: u32 = 1; -pub const HAVE_SYS_TIME_H: u32 = 1; -pub const TIME_WITH_SYS_TIME: u32 = 1; -pub const HAVE_SYS_TIMES_H: u32 = 1; -pub const HAVE_SYS_TYPES_H: u32 = 1; -pub const HAVE_SYS_WAIT_H: u32 = 1; -pub const HAVE_TERMCAP_H: u32 = 1; -pub const HAVE_TERMIO_H: u32 = 1; -pub const HAVE_TERMIOS_H: u32 = 1; -pub const HAVE_ULIMIT_H: u32 = 1; -pub const HAVE_UNISTD_H: u32 = 1; -pub const HAVE_WCHAR_H: u32 = 1; -pub const HAVE_WCTYPE_H: u32 = 1; -pub const HAVE_LIBDL: u32 = 1; -pub const HAVE_ARGZ_H: u32 = 1; -pub const HAVE_ERRNO_H: u32 = 1; -pub const HAVE_FCNTL_H: u32 = 1; -pub const HAVE_MALLOC_H: u32 = 1; -pub const HAVE_STDIO_EXT_H: u32 = 1; -pub const HAVE_DCGETTEXT: u32 = 1; -pub const HAVE_LOCALECONV: u32 = 1; -pub const HAVE_MEMPCPY: u32 = 1; -pub const HAVE_MMAP: u32 = 1; -pub const HAVE_MREMAP: u32 = 1; -pub const HAVE_MUNMAP: u32 = 1; -pub const HAVE_STPCPY: u32 = 1; -pub const HAVE_STRCSPN: u32 = 1; -pub const HAVE_STRDUP: u32 = 1; -pub const HAVE___ARGZ_COUNT: u32 = 1; -pub const HAVE___ARGZ_NEXT: u32 = 1; -pub const HAVE___ARGZ_STRINGIFY: u32 = 1; -pub const RESTRICTED_SHELL_NAME: &'static [u8; 6usize] = b"rbash\0"; -pub const _WCHAR_H: u32 = 1; -pub const _FEATURES_H: u32 = 1; -pub const _ISOC95_SOURCE: u32 = 1; -pub const _ISOC99_SOURCE: u32 = 1; -pub const _ISOC11_SOURCE: u32 = 1; -pub const _POSIX_SOURCE: u32 = 1; -pub const _POSIX_C_SOURCE: u32 = 200809; -pub const _XOPEN_SOURCE: u32 = 700; -pub const _XOPEN_SOURCE_EXTENDED: u32 = 1; -pub const _LARGEFILE64_SOURCE: u32 = 1; -pub const _DEFAULT_SOURCE: u32 = 1; -pub const _ATFILE_SOURCE: u32 = 1; -pub const __USE_ISOC11: u32 = 1; -pub const __USE_ISOC99: u32 = 1; -pub const __USE_ISOC95: u32 = 1; -pub const __USE_POSIX: u32 = 1; -pub const __USE_POSIX2: u32 = 1; -pub const __USE_POSIX199309: u32 = 1; -pub const __USE_POSIX199506: u32 = 1; -pub const __USE_XOPEN2K: u32 = 1; -pub const __USE_XOPEN2K8: u32 = 1; -pub const __USE_XOPEN: u32 = 1; -pub const __USE_XOPEN_EXTENDED: u32 = 1; -pub const __USE_UNIX98: u32 = 1; -pub const _LARGEFILE_SOURCE: u32 = 1; -pub const __USE_XOPEN2K8XSI: u32 = 1; -pub const __USE_XOPEN2KXSI: u32 = 1; -pub const __USE_LARGEFILE: u32 = 1; -pub const __USE_LARGEFILE64: u32 = 1; -pub const __USE_MISC: u32 = 1; -pub const __USE_ATFILE: u32 = 1; -pub const __USE_GNU: u32 = 1; -pub const __USE_FORTIFY_LEVEL: u32 = 0; -pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0; -pub const _STDC_PREDEF_H: u32 = 1; -pub const __STDC_IEC_559__: u32 = 1; -pub const __STDC_IEC_559_COMPLEX__: u32 = 1; -pub const __STDC_ISO_10646__: u32 = 201706; -pub const __GNU_LIBRARY__: u32 = 6; -pub const __GLIBC__: u32 = 2; -pub const __GLIBC_MINOR__: u32 = 28; -pub const _SYS_CDEFS_H: u32 = 1; -pub const __glibc_c99_flexarr_available: u32 = 1; -pub const __WORDSIZE: u32 = 64; -pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1; -pub const __SYSCALL_WORDSIZE: u32 = 64; -pub const __HAVE_GENERIC_SELECTION: u32 = 1; -pub const __GLIBC_USE_LIB_EXT2: u32 = 1; -pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 1; -pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 1; -pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 1; -pub const __HAVE_FLOAT128: u32 = 0; -pub const __HAVE_DISTINCT_FLOAT128: u32 = 0; -pub const __HAVE_FLOAT64X: u32 = 1; -pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1; -pub const __HAVE_FLOAT16: u32 = 0; -pub const __HAVE_FLOAT32: u32 = 1; -pub const __HAVE_FLOAT64: u32 = 1; -pub const __HAVE_FLOAT32X: u32 = 1; -pub const __HAVE_FLOAT128X: u32 = 0; -pub const __HAVE_DISTINCT_FLOAT16: u32 = 0; -pub const __HAVE_DISTINCT_FLOAT32: u32 = 0; -pub const __HAVE_DISTINCT_FLOAT64: u32 = 0; -pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0; -pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0; -pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0; -pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0; -pub const __GNUC_VA_LIST: u32 = 1; -pub const _BITS_WCHAR_H: u32 = 1; -pub const __wint_t_defined: u32 = 1; -pub const _WINT_T: u32 = 1; -pub const __mbstate_t_defined: u32 = 1; -pub const ____mbstate_t_defined: u32 = 1; -pub const ____FILE_defined: u32 = 1; -pub const __FILE_defined: u32 = 1; -pub const _BITS_TYPES_LOCALE_T_H: u32 = 1; -pub const _BITS_TYPES___LOCALE_T_H: u32 = 1; -pub const WEOF: u32 = 4294967295; -pub const _WCTYPE_H: u32 = 1; -pub const _BITS_TYPES_H: u32 = 1; -pub const _BITS_TYPESIZES_H: u32 = 1; -pub const __OFF_T_MATCHES_OFF64_T: u32 = 1; -pub const __INO_T_MATCHES_INO64_T: u32 = 1; -pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1; -pub const __FD_SETSIZE: u32 = 1024; -pub const _BITS_WCTYPE_WCHAR_H: u32 = 1; -pub const _ENDIAN_H: u32 = 1; -pub const __LITTLE_ENDIAN: u32 = 1234; -pub const __BIG_ENDIAN: u32 = 4321; -pub const __PDP_ENDIAN: u32 = 3412; -pub const __BYTE_ORDER: u32 = 1234; -pub const __FLOAT_WORD_ORDER: u32 = 1234; -pub const LITTLE_ENDIAN: u32 = 1234; -pub const BIG_ENDIAN: u32 = 4321; -pub const PDP_ENDIAN: u32 = 3412; -pub const BYTE_ORDER: u32 = 1234; -pub const _BITS_BYTESWAP_H: u32 = 1; -pub const _BITS_UINTN_IDENTITY_H: u32 = 1; -pub const HANDLE_MULTIBYTE: u32 = 1; -pub const _LIBC_LIMITS_H_: u32 = 1; -pub const MB_LEN_MAX: u32 = 16; -pub const CHAR_WIDTH: u32 = 8; -pub const SCHAR_WIDTH: u32 = 8; -pub const UCHAR_WIDTH: u32 = 8; -pub const SHRT_WIDTH: u32 = 16; -pub const USHRT_WIDTH: u32 = 16; -pub const INT_WIDTH: u32 = 32; -pub const UINT_WIDTH: u32 = 32; -pub const LONG_WIDTH: u32 = 64; -pub const ULONG_WIDTH: u32 = 64; -pub const LLONG_WIDTH: u32 = 64; -pub const ULLONG_WIDTH: u32 = 64; -pub const _BITS_POSIX1_LIM_H: u32 = 1; -pub const _POSIX_AIO_LISTIO_MAX: u32 = 2; -pub const _POSIX_AIO_MAX: u32 = 1; -pub const _POSIX_ARG_MAX: u32 = 4096; -pub const _POSIX_CHILD_MAX: u32 = 25; -pub const _POSIX_DELAYTIMER_MAX: u32 = 32; -pub const _POSIX_HOST_NAME_MAX: u32 = 255; -pub const _POSIX_LINK_MAX: u32 = 8; -pub const _POSIX_LOGIN_NAME_MAX: u32 = 9; -pub const _POSIX_MAX_CANON: u32 = 255; -pub const _POSIX_MAX_INPUT: u32 = 255; -pub const _POSIX_MQ_OPEN_MAX: u32 = 8; -pub const _POSIX_MQ_PRIO_MAX: u32 = 32; -pub const _POSIX_NAME_MAX: u32 = 14; -pub const _POSIX_NGROUPS_MAX: u32 = 8; -pub const _POSIX_OPEN_MAX: u32 = 20; -pub const _POSIX_FD_SETSIZE: u32 = 20; -pub const _POSIX_PATH_MAX: u32 = 256; -pub const _POSIX_PIPE_BUF: u32 = 512; -pub const _POSIX_RE_DUP_MAX: u32 = 255; -pub const _POSIX_RTSIG_MAX: u32 = 8; -pub const _POSIX_SEM_NSEMS_MAX: u32 = 256; -pub const _POSIX_SEM_VALUE_MAX: u32 = 32767; -pub const _POSIX_SIGQUEUE_MAX: u32 = 32; -pub const _POSIX_SSIZE_MAX: u32 = 32767; -pub const _POSIX_STREAM_MAX: u32 = 8; -pub const _POSIX_SYMLINK_MAX: u32 = 255; -pub const _POSIX_SYMLOOP_MAX: u32 = 8; -pub const _POSIX_TIMER_MAX: u32 = 32; -pub const _POSIX_TTY_NAME_MAX: u32 = 9; -pub const _POSIX_TZNAME_MAX: u32 = 6; -pub const _POSIX_QLIMIT: u32 = 1; -pub const _POSIX_HIWAT: u32 = 512; -pub const _POSIX_UIO_MAXIOV: u32 = 16; -pub const _POSIX_CLOCKRES_MIN: u32 = 20000000; -pub const NR_OPEN: u32 = 1024; -pub const NGROUPS_MAX: u32 = 65536; -pub const ARG_MAX: u32 = 131072; -pub const LINK_MAX: u32 = 127; -pub const MAX_CANON: u32 = 255; -pub const MAX_INPUT: u32 = 255; -pub const NAME_MAX: u32 = 255; -pub const PATH_MAX: u32 = 4096; -pub const PIPE_BUF: u32 = 4096; -pub const XATTR_NAME_MAX: u32 = 255; -pub const XATTR_SIZE_MAX: u32 = 65536; -pub const XATTR_LIST_MAX: u32 = 65536; -pub const RTSIG_MAX: u32 = 32; -pub const _POSIX_THREAD_KEYS_MAX: u32 = 128; -pub const PTHREAD_KEYS_MAX: u32 = 1024; -pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4; -pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4; -pub const _POSIX_THREAD_THREADS_MAX: u32 = 64; -pub const AIO_PRIO_DELTA_MAX: u32 = 20; -pub const PTHREAD_STACK_MIN: u32 = 16384; -pub const DELAYTIMER_MAX: u32 = 2147483647; -pub const TTY_NAME_MAX: u32 = 32; -pub const LOGIN_NAME_MAX: u32 = 256; -pub const HOST_NAME_MAX: u32 = 64; -pub const MQ_PRIO_MAX: u32 = 32768; -pub const SEM_VALUE_MAX: u32 = 2147483647; -pub const _BITS_POSIX2_LIM_H: u32 = 1; -pub const _POSIX2_BC_BASE_MAX: u32 = 99; -pub const _POSIX2_BC_DIM_MAX: u32 = 2048; -pub const _POSIX2_BC_SCALE_MAX: u32 = 99; -pub const _POSIX2_BC_STRING_MAX: u32 = 1000; -pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2; -pub const _POSIX2_EXPR_NEST_MAX: u32 = 32; -pub const _POSIX2_LINE_MAX: u32 = 2048; -pub const _POSIX2_RE_DUP_MAX: u32 = 255; -pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14; -pub const BC_BASE_MAX: u32 = 99; -pub const BC_DIM_MAX: u32 = 2048; -pub const BC_SCALE_MAX: u32 = 99; -pub const BC_STRING_MAX: u32 = 1000; -pub const COLL_WEIGHTS_MAX: u32 = 255; -pub const EXPR_NEST_MAX: u32 = 32; -pub const LINE_MAX: u32 = 2048; -pub const CHARCLASS_NAME_MAX: u32 = 2048; -pub const RE_DUP_MAX: u32 = 32767; -pub const _XOPEN_LIM_H: u32 = 1; -pub const _XOPEN_IOV_MAX: u32 = 16; -pub const _BITS_UIO_LIM_H: u32 = 1; -pub const __IOV_MAX: u32 = 1024; -pub const IOV_MAX: u32 = 1024; -pub const NL_ARGMAX: u32 = 4096; -pub const NL_LANGMAX: u32 = 2048; -pub const NZERO: u32 = 20; -pub const WORD_BIT: u32 = 32; -pub const LONG_BIT: u32 = 64; -pub const _UNISTD_H: u32 = 1; -pub const _POSIX_VERSION: u32 = 200809; -pub const __POSIX2_THIS_VERSION: u32 = 200809; -pub const _POSIX2_VERSION: u32 = 200809; -pub const _POSIX2_C_VERSION: u32 = 200809; -pub const _POSIX2_C_BIND: u32 = 200809; -pub const _POSIX2_C_DEV: u32 = 200809; -pub const _POSIX2_SW_DEV: u32 = 200809; -pub const _POSIX2_LOCALEDEF: u32 = 200809; -pub const _XOPEN_VERSION: u32 = 700; -pub const _XOPEN_XCU_VERSION: u32 = 4; -pub const _XOPEN_XPG2: u32 = 1; -pub const _XOPEN_XPG3: u32 = 1; -pub const _XOPEN_XPG4: u32 = 1; -pub const _XOPEN_UNIX: u32 = 1; -pub const _XOPEN_ENH_I18N: u32 = 1; -pub const _XOPEN_LEGACY: u32 = 1; -pub const _BITS_POSIX_OPT_H: u32 = 1; -pub const _POSIX_JOB_CONTROL: u32 = 1; -pub const _POSIX_SAVED_IDS: u32 = 1; -pub const _POSIX_PRIORITY_SCHEDULING: u32 = 200809; -pub const _POSIX_SYNCHRONIZED_IO: u32 = 200809; -pub const _POSIX_FSYNC: u32 = 200809; -pub const _POSIX_MAPPED_FILES: u32 = 200809; -pub const _POSIX_MEMLOCK: u32 = 200809; -pub const _POSIX_MEMLOCK_RANGE: u32 = 200809; -pub const _POSIX_MEMORY_PROTECTION: u32 = 200809; -pub const _POSIX_CHOWN_RESTRICTED: u32 = 0; -pub const _POSIX_VDISABLE: u8 = 0u8; -pub const _POSIX_NO_TRUNC: u32 = 1; -pub const _XOPEN_REALTIME: u32 = 1; -pub const _XOPEN_REALTIME_THREADS: u32 = 1; -pub const _XOPEN_SHM: u32 = 1; -pub const _POSIX_THREADS: u32 = 200809; -pub const _POSIX_REENTRANT_FUNCTIONS: u32 = 1; -pub const _POSIX_THREAD_SAFE_FUNCTIONS: u32 = 200809; -pub const _POSIX_THREAD_PRIORITY_SCHEDULING: u32 = 200809; -pub const _POSIX_THREAD_ATTR_STACKSIZE: u32 = 200809; -pub const _POSIX_THREAD_ATTR_STACKADDR: u32 = 200809; -pub const _POSIX_THREAD_PRIO_INHERIT: u32 = 200809; -pub const _POSIX_THREAD_PRIO_PROTECT: u32 = 200809; -pub const _POSIX_THREAD_ROBUST_PRIO_INHERIT: u32 = 200809; -pub const _POSIX_THREAD_ROBUST_PRIO_PROTECT: i32 = -1; -pub const _POSIX_SEMAPHORES: u32 = 200809; -pub const _POSIX_REALTIME_SIGNALS: u32 = 200809; -pub const _POSIX_ASYNCHRONOUS_IO: u32 = 200809; -pub const _POSIX_ASYNC_IO: u32 = 1; -pub const _LFS_ASYNCHRONOUS_IO: u32 = 1; -pub const _POSIX_PRIORITIZED_IO: u32 = 200809; -pub const _LFS64_ASYNCHRONOUS_IO: u32 = 1; -pub const _LFS_LARGEFILE: u32 = 1; -pub const _LFS64_LARGEFILE: u32 = 1; -pub const _LFS64_STDIO: u32 = 1; -pub const _POSIX_SHARED_MEMORY_OBJECTS: u32 = 200809; -pub const _POSIX_CPUTIME: u32 = 0; -pub const _POSIX_THREAD_CPUTIME: u32 = 0; -pub const _POSIX_REGEXP: u32 = 1; -pub const _POSIX_READER_WRITER_LOCKS: u32 = 200809; -pub const _POSIX_SHELL: u32 = 1; -pub const _POSIX_TIMEOUTS: u32 = 200809; -pub const _POSIX_SPIN_LOCKS: u32 = 200809; -pub const _POSIX_SPAWN: u32 = 200809; -pub const _POSIX_TIMERS: u32 = 200809; -pub const _POSIX_BARRIERS: u32 = 200809; -pub const _POSIX_MESSAGE_PASSING: u32 = 200809; -pub const _POSIX_THREAD_PROCESS_SHARED: u32 = 200809; -pub const _POSIX_MONOTONIC_CLOCK: u32 = 0; -pub const _POSIX_CLOCK_SELECTION: u32 = 200809; -pub const _POSIX_ADVISORY_INFO: u32 = 200809; -pub const _POSIX_IPV6: u32 = 200809; -pub const _POSIX_RAW_SOCKETS: u32 = 200809; -pub const _POSIX2_CHAR_TERM: u32 = 200809; -pub const _POSIX_SPORADIC_SERVER: i32 = -1; -pub const _POSIX_THREAD_SPORADIC_SERVER: i32 = -1; -pub const _POSIX_TRACE: i32 = -1; -pub const _POSIX_TRACE_EVENT_FILTER: i32 = -1; -pub const _POSIX_TRACE_INHERIT: i32 = -1; -pub const _POSIX_TRACE_LOG: i32 = -1; -pub const _POSIX_TYPED_MEMORY_OBJECTS: i32 = -1; -pub const _POSIX_V7_LPBIG_OFFBIG: i32 = -1; -pub const _POSIX_V6_LPBIG_OFFBIG: i32 = -1; -pub const _XBS5_LPBIG_OFFBIG: i32 = -1; -pub const _POSIX_V7_LP64_OFF64: u32 = 1; -pub const _POSIX_V6_LP64_OFF64: u32 = 1; -pub const _XBS5_LP64_OFF64: u32 = 1; -pub const __ILP32_OFF32_CFLAGS: &'static [u8; 5usize] = b"-m32\0"; -pub const __ILP32_OFF32_LDFLAGS: &'static [u8; 5usize] = b"-m32\0"; -pub const __ILP32_OFFBIG_CFLAGS: &'static [u8; 48usize] = - b"-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64\0"; -pub const __ILP32_OFFBIG_LDFLAGS: &'static [u8; 5usize] = b"-m32\0"; -pub const __LP64_OFF64_CFLAGS: &'static [u8; 5usize] = b"-m64\0"; -pub const __LP64_OFF64_LDFLAGS: &'static [u8; 5usize] = b"-m64\0"; -pub const STDIN_FILENO: u32 = 0; -pub const STDOUT_FILENO: u32 = 1; -pub const STDERR_FILENO: u32 = 2; -pub const R_OK: u32 = 4; -pub const W_OK: u32 = 2; -pub const X_OK: u32 = 1; -pub const F_OK: u32 = 0; -pub const SEEK_SET: u32 = 0; -pub const SEEK_CUR: u32 = 1; -pub const SEEK_END: u32 = 2; -pub const SEEK_DATA: u32 = 3; -pub const SEEK_HOLE: u32 = 4; -pub const L_SET: u32 = 0; -pub const L_INCR: u32 = 1; -pub const L_XTND: u32 = 2; -pub const _GETOPT_POSIX_H: u32 = 1; -pub const _GETOPT_CORE_H: u32 = 1; -pub const F_ULOCK: u32 = 0; -pub const F_LOCK: u32 = 1; -pub const F_TLOCK: u32 = 2; -pub const F_TEST: u32 = 3; -pub const _BITS_SIGNUM_H: u32 = 1; -pub const _BITS_SIGNUM_GENERIC_H: u32 = 1; -pub const SIGINT: u32 = 2; -pub const SIGILL: u32 = 4; -pub const SIGABRT: u32 = 6; -pub const SIGFPE: u32 = 8; -pub const SIGSEGV: u32 = 11; -pub const SIGTERM: u32 = 15; -pub const SIGHUP: u32 = 1; -pub const SIGQUIT: u32 = 3; -pub const SIGTRAP: u32 = 5; -pub const SIGKILL: u32 = 9; -// pub const SIGBUS: u32 = 10; -pub const SIGBUS: u32 = 7; -// pub const SIGSYS: u32 = 12; -pub const SIGSYS: u32 = 31; -pub const SIGPIPE: u32 = 13; -pub const SIGALRM: u32 = 14; -// pub const SIGURG: u32 = 16; -pub const SIGURG: u32 = 23; -// pub const SIGSTOP: u32 = 17; -pub const SIGSTOP: u32 = 19; -// pub const SIGTSTP: u32 = 18; -pub const SIGTSTP: u32 = 20; -// pub const SIGCONT: u32 = 19; -pub const SIGCONT: u32 = 18; -// pub const SIGCHLD: u32 = 20; -pub const SIGCHLD: u32 = 17; -pub const SIGTTIN: u32 = 21; -pub const SIGTTOU: u32 = 22; -pub const SIGPOLL: u32 = 23; -pub const SIGXCPU: u32 = 24; -pub const SIGXFSZ: u32 = 25; -pub const SIGVTALRM: u32 = 26; -pub const SIGPROF: u32 = 27; -// pub const SIGUSR1: u32 = 30; -pub const SIGUSR1: u32 = 10; -// pub const SIGUSR2: u32 = 31; -pub const SIGUSR2: u32 = 12; -pub const SIGWINCH: u32 = 28; -// pub const SIGIO: u32 = 23; -pub const SIGIO: u32 = 29; -pub const SIGIOT: u32 = 6; -pub const SIGCLD: u32 = 20; -pub const __SIGRTMIN: u32 = 32; -pub const __SIGRTMAX: u32 = 32; -pub const _NSIG: u32 = 33; -pub const SIGSTKFLT: u32 = 16; -pub const SIGPWR: u32 = 30; -pub const __sig_atomic_t_defined: u32 = 1; -pub const __sigset_t_defined: u32 = 1; -pub const _STRUCT_TIMESPEC: u32 = 1; -pub const __siginfo_t_defined: u32 = 1; -pub const __SI_MAX_SIZE: u32 = 128; -pub const _BITS_SIGINFO_ARCH_H: u32 = 1; -pub const __SI_ERRNO_THEN_CODE: u32 = 1; -pub const __SI_HAVE_SIGSYS: u32 = 1; -pub const _BITS_SIGINFO_CONSTS_H: u32 = 1; -pub const __SI_ASYNCIO_AFTER_SIGIO: u32 = 1; -pub const _BITS_SIGINFO_CONSTS_ARCH_H: u32 = 1; -pub const __sigevent_t_defined: u32 = 1; -pub const __SIGEV_MAX_SIZE: u32 = 64; -pub const __have_pthread_attr_t: u32 = 1; -pub const _BITS_SIGEVENT_CONSTS_H: u32 = 1; -pub const NSIG: u32 = 33; -pub const _BITS_SIGACTION_H: u32 = 1; -pub const SA_NOCLDSTOP: u32 = 1; -pub const SA_NOCLDWAIT: u32 = 2; -pub const SA_SIGINFO: u32 = 4; -pub const SA_ONSTACK: u32 = 134217728; -pub const SA_RESTART: u32 = 268435456; -pub const SA_NODEFER: u32 = 1073741824; -pub const SA_RESETHAND: u32 = 2147483648; -pub const SA_INTERRUPT: u32 = 536870912; -pub const SA_NOMASK: u32 = 1073741824; -pub const SA_ONESHOT: u32 = 2147483648; -pub const SA_STACK: u32 = 134217728; -pub const SIG_BLOCK: u32 = 0; -pub const SIG_UNBLOCK: u32 = 1; -pub const SIG_SETMASK: u32 = 2; -pub const _BITS_SIGCONTEXT_H: u32 = 1; -pub const FP_XSTATE_MAGIC1: u32 = 1179670611; -pub const FP_XSTATE_MAGIC2: u32 = 1179670597; -pub const __stack_t_defined: u32 = 1; -pub const _SYS_UCONTEXT_H: u32 = 1; -pub const __NGREG: u32 = 23; -pub const NGREG: u32 = 23; -pub const _BITS_SIGSTACK_H: u32 = 1; -pub const MINSIGSTKSZ: u32 = 2048; -pub const SIGSTKSZ: u32 = 8192; -pub const _BITS_SS_FLAGS_H: u32 = 1; -pub const __sigstack_defined: u32 = 1; -pub const _BITS_PTHREADTYPES_COMMON_H: u32 = 1; -pub const _THREAD_SHARED_TYPES_H: u32 = 1; -pub const _BITS_PTHREADTYPES_ARCH_H: u32 = 1; -pub const __SIZEOF_PTHREAD_MUTEX_T: u32 = 40; -pub const __SIZEOF_PTHREAD_ATTR_T: u32 = 56; -pub const __SIZEOF_PTHREAD_RWLOCK_T: u32 = 56; -pub const __SIZEOF_PTHREAD_BARRIER_T: u32 = 32; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_COND_T: u32 = 48; -pub const __SIZEOF_PTHREAD_CONDATTR_T: u32 = 4; -pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: u32 = 8; -pub const __SIZEOF_PTHREAD_BARRIERATTR_T: u32 = 4; -pub const __PTHREAD_MUTEX_LOCK_ELISION: u32 = 1; -pub const __PTHREAD_MUTEX_NUSERS_AFTER_KIND: u32 = 0; -pub const __PTHREAD_MUTEX_USE_UNION: u32 = 0; -pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED: u32 = 1; -pub const __PTHREAD_MUTEX_HAVE_PREV: u32 = 1; -pub const _BITS_SIGTHREAD_H: u32 = 1; -pub const _STDINT_H: u32 = 1; -pub const _BITS_STDINT_INTN_H: u32 = 1; -pub const _BITS_STDINT_UINTN_H: u32 = 1; -pub const INT8_MIN: i32 = -128; -pub const INT16_MIN: i32 = -32768; -pub const INT32_MIN: i32 = -2147483648; -pub const INT8_MAX: u32 = 127; -pub const INT16_MAX: u32 = 32767; -pub const INT32_MAX: u32 = 2147483647; -pub const UINT8_MAX: u32 = 255; -pub const UINT16_MAX: u32 = 65535; -pub const UINT32_MAX: u32 = 4294967295; -pub const INT_LEAST8_MIN: i32 = -128; -pub const INT_LEAST16_MIN: i32 = -32768; -pub const INT_LEAST32_MIN: i32 = -2147483648; -pub const INT_LEAST8_MAX: u32 = 127; -pub const INT_LEAST16_MAX: u32 = 32767; -pub const INT_LEAST32_MAX: u32 = 2147483647; -pub const UINT_LEAST8_MAX: u32 = 255; -pub const UINT_LEAST16_MAX: u32 = 65535; -pub const UINT_LEAST32_MAX: u32 = 4294967295; -pub const INT_FAST8_MIN: i32 = -128; -pub const INT_FAST16_MIN: i64 = -9223372036854775808; -pub const INT_FAST32_MIN: i64 = -9223372036854775808; -pub const INT_FAST8_MAX: u32 = 127; -pub const INT_FAST16_MAX: u64 = 9223372036854775807; -pub const INT_FAST32_MAX: u64 = 9223372036854775807; -pub const UINT_FAST8_MAX: u32 = 255; -pub const UINT_FAST16_MAX: i32 = -1; -pub const UINT_FAST32_MAX: i32 = -1; -pub const INTPTR_MIN: i64 = -9223372036854775808; -pub const INTPTR_MAX: u64 = 9223372036854775807; -pub const UINTPTR_MAX: i32 = -1; -pub const PTRDIFF_MIN: i64 = -9223372036854775808; -pub const PTRDIFF_MAX: u64 = 9223372036854775807; -pub const SIG_ATOMIC_MIN: i32 = -2147483648; -pub const SIG_ATOMIC_MAX: u32 = 2147483647; -pub const SIZE_MAX: i32 = -1; -pub const WINT_MIN: u32 = 0; -pub const WINT_MAX: u32 = 4294967295; -pub const INT8_WIDTH: u32 = 8; -pub const UINT8_WIDTH: u32 = 8; -pub const INT16_WIDTH: u32 = 16; -pub const UINT16_WIDTH: u32 = 16; -pub const INT32_WIDTH: u32 = 32; -pub const UINT32_WIDTH: u32 = 32; -pub const INT64_WIDTH: u32 = 64; -pub const UINT64_WIDTH: u32 = 64; -pub const INT_LEAST8_WIDTH: u32 = 8; -pub const UINT_LEAST8_WIDTH: u32 = 8; -pub const INT_LEAST16_WIDTH: u32 = 16; -pub const UINT_LEAST16_WIDTH: u32 = 16; -pub const INT_LEAST32_WIDTH: u32 = 32; -pub const UINT_LEAST32_WIDTH: u32 = 32; -pub const INT_LEAST64_WIDTH: u32 = 64; -pub const UINT_LEAST64_WIDTH: u32 = 64; -pub const INT_FAST8_WIDTH: u32 = 8; -pub const UINT_FAST8_WIDTH: u32 = 8; -pub const INT_FAST16_WIDTH: u32 = 64; -pub const UINT_FAST16_WIDTH: u32 = 64; -pub const INT_FAST32_WIDTH: u32 = 64; -pub const UINT_FAST32_WIDTH: u32 = 64; -pub const INT_FAST64_WIDTH: u32 = 64; -pub const UINT_FAST64_WIDTH: u32 = 64; -pub const INTPTR_WIDTH: u32 = 64; -pub const UINTPTR_WIDTH: u32 = 64; -pub const INTMAX_WIDTH: u32 = 64; -pub const UINTMAX_WIDTH: u32 = 64; -pub const PTRDIFF_WIDTH: u32 = 64; -pub const SIG_ATOMIC_WIDTH: u32 = 32; -pub const SIZE_WIDTH: u32 = 64; -pub const WCHAR_WIDTH: u32 = 32; -pub const WINT_WIDTH: u32 = 32; -pub const REDIR_VARASSIGN: u32 = 1; -pub const AMBIGUOUS_REDIRECT: i32 = -1; -pub const NOCLOBBER_REDIRECT: i32 = -2; -pub const RESTRICTED_REDIRECT: i32 = -3; -pub const HEREDOC_REDIRECT: i32 = -4; -pub const BADVAR_REDIRECT: i32 = -5; -pub const W_HASDOLLAR: u32 = 1; -pub const W_QUOTED: u32 = 2; -pub const W_ASSIGNMENT: u32 = 4; -pub const W_SPLITSPACE: u32 = 8; -pub const W_NOSPLIT: u32 = 16; -pub const W_NOGLOB: u32 = 32; -pub const W_NOSPLIT2: u32 = 64; -pub const W_TILDEEXP: u32 = 128; -pub const W_DOLLARAT: u32 = 256; -pub const W_DOLLARSTAR: u32 = 512; -pub const W_NOCOMSUB: u32 = 1024; -pub const W_ASSIGNRHS: u32 = 2048; -pub const W_NOTILDE: u32 = 4096; -pub const W_ITILDE: u32 = 8192; -pub const W_EXPANDRHS: u32 = 16384; -pub const W_COMPASSIGN: u32 = 32768; -pub const W_ASSNBLTIN: u32 = 65536; -pub const W_ASSIGNARG: u32 = 131072; -pub const W_HASQUOTEDNULL: u32 = 262144; -pub const W_DQUOTE: u32 = 524288; -pub const W_NOPROCSUB: u32 = 1048576; -pub const W_SAWQUOTEDNULL: u32 = 2097152; -pub const W_ASSIGNASSOC: u32 = 4194304; -pub const W_ASSIGNARRAY: u32 = 8388608; -pub const W_ARRAYIND: u32 = 16777216; -pub const W_ASSNGLOBAL: u32 = 33554432; -pub const W_NOBRACE: u32 = 67108864; -pub const W_COMPLETE: u32 = 134217728; -pub const W_CHKLOCAL: u32 = 268435456; -pub const W_NOASSNTILDE: u32 = 536870912; -pub const W_FORCELOCAL: u32 = 1073741824; -pub const PF_NOCOMSUB: u32 = 1; -pub const PF_IGNUNBOUND: u32 = 2; -pub const PF_NOSPLIT2: u32 = 4; -pub const PF_ASSIGNRHS: u32 = 8; -pub const PF_COMPLETE: u32 = 16; -pub const PF_EXPANDRHS: u32 = 32; -pub const PF_ALLINDS: u32 = 64; -pub const SUBSHELL_ASYNC: u32 = 1; -pub const SUBSHELL_PAREN: u32 = 2; -pub const SUBSHELL_COMSUB: u32 = 4; -pub const SUBSHELL_FORK: u32 = 8; -pub const SUBSHELL_PIPE: u32 = 16; -pub const SUBSHELL_PROCSUB: u32 = 32; -pub const SUBSHELL_COPROC: u32 = 64; -pub const SUBSHELL_RESETTRAP: u32 = 128; -pub const CMD_WANT_SUBSHELL: u32 = 1; -pub const CMD_FORCE_SUBSHELL: u32 = 2; -pub const CMD_INVERT_RETURN: u32 = 4; -pub const CMD_IGNORE_RETURN: u32 = 8; -pub const CMD_NO_FUNCTIONS: u32 = 16; -pub const CMD_INHIBIT_EXPANSION: u32 = 32; -pub const CMD_NO_FORK: u32 = 64; -pub const CMD_TIME_PIPELINE: u32 = 128; -pub const CMD_TIME_POSIX: u32 = 256; -pub const CMD_AMPERSAND: u32 = 512; -pub const CMD_STDIN_REDIR: u32 = 1024; -pub const CMD_COMMAND_BUILTIN: u32 = 2048; -pub const CMD_COPROC_SUBSHELL: u32 = 4096; -pub const CMD_LASTPIPE: u32 = 8192; -pub const CMD_STDPATH: u32 = 16384; -pub const CMD_TRY_OPTIMIZING: u32 = 32768; -pub const CASEPAT_FALLTHROUGH: u32 = 1; -pub const CASEPAT_TESTNEXT: u32 = 2; -pub const COND_AND: u32 = 1; -pub const COND_OR: u32 = 2; -pub const COND_UNARY: u32 = 3; -pub const COND_BINARY: u32 = 4; -pub const COND_TERM: u32 = 5; -pub const COND_EXPR: u32 = 6; -pub const COPROC_RUNNING: u32 = 1; -pub const COPROC_DEAD: u32 = 2; -pub const CMDERR_DEFAULT: u32 = 0; -pub const CMDERR_BADTYPE: u32 = 1; -pub const CMDERR_BADCONN: u32 = 2; -pub const CMDERR_BADJUMP: u32 = 3; -pub const CMDERR_LAST: u32 = 3; -pub const _SYS_TYPES_H: u32 = 1; -pub const __clock_t_defined: u32 = 1; -pub const __clockid_t_defined: u32 = 1; -pub const __time_t_defined: u32 = 1; -pub const __timer_t_defined: u32 = 1; -pub const __BIT_TYPES_DEFINED__: u32 = 1; -pub const _SYS_SELECT_H: u32 = 1; -pub const __FD_ZERO_STOS: &'static [u8; 6usize] = b"stosq\0"; -pub const __timeval_defined: u32 = 1; -pub const FD_SETSIZE: u32 = 1024; -pub const _INTTYPES_H: u32 = 1; -pub const ____gwchar_t_defined: u32 = 1; -pub const __PRI64_PREFIX: &'static [u8; 2usize] = b"l\0"; -pub const __PRIPTR_PREFIX: &'static [u8; 2usize] = b"l\0"; -pub const PRId8: &'static [u8; 2usize] = b"d\0"; -pub const PRId16: &'static [u8; 2usize] = b"d\0"; -pub const PRId32: &'static [u8; 2usize] = b"d\0"; -pub const PRId64: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdLEAST8: &'static [u8; 2usize] = b"d\0"; -pub const PRIdLEAST16: &'static [u8; 2usize] = b"d\0"; -pub const PRIdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const PRIdLEAST64: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdFAST8: &'static [u8; 2usize] = b"d\0"; -pub const PRIdFAST16: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdFAST32: &'static [u8; 3usize] = b"ld\0"; -pub const PRIdFAST64: &'static [u8; 3usize] = b"ld\0"; -pub const PRIi8: &'static [u8; 2usize] = b"i\0"; -pub const PRIi16: &'static [u8; 2usize] = b"i\0"; -pub const PRIi32: &'static [u8; 2usize] = b"i\0"; -pub const PRIi64: &'static [u8; 3usize] = b"li\0"; -pub const PRIiLEAST8: &'static [u8; 2usize] = b"i\0"; -pub const PRIiLEAST16: &'static [u8; 2usize] = b"i\0"; -pub const PRIiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const PRIiLEAST64: &'static [u8; 3usize] = b"li\0"; -pub const PRIiFAST8: &'static [u8; 2usize] = b"i\0"; -pub const PRIiFAST16: &'static [u8; 3usize] = b"li\0"; -pub const PRIiFAST32: &'static [u8; 3usize] = b"li\0"; -pub const PRIiFAST64: &'static [u8; 3usize] = b"li\0"; -pub const PRIo8: &'static [u8; 2usize] = b"o\0"; -pub const PRIo16: &'static [u8; 2usize] = b"o\0"; -pub const PRIo32: &'static [u8; 2usize] = b"o\0"; -pub const PRIo64: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoLEAST8: &'static [u8; 2usize] = b"o\0"; -pub const PRIoLEAST16: &'static [u8; 2usize] = b"o\0"; -pub const PRIoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const PRIoLEAST64: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoFAST8: &'static [u8; 2usize] = b"o\0"; -pub const PRIoFAST16: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoFAST32: &'static [u8; 3usize] = b"lo\0"; -pub const PRIoFAST64: &'static [u8; 3usize] = b"lo\0"; -pub const PRIu8: &'static [u8; 2usize] = b"u\0"; -pub const PRIu16: &'static [u8; 2usize] = b"u\0"; -pub const PRIu32: &'static [u8; 2usize] = b"u\0"; -pub const PRIu64: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuLEAST8: &'static [u8; 2usize] = b"u\0"; -pub const PRIuLEAST16: &'static [u8; 2usize] = b"u\0"; -pub const PRIuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const PRIuLEAST64: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuFAST8: &'static [u8; 2usize] = b"u\0"; -pub const PRIuFAST16: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuFAST32: &'static [u8; 3usize] = b"lu\0"; -pub const PRIuFAST64: &'static [u8; 3usize] = b"lu\0"; -pub const PRIx8: &'static [u8; 2usize] = b"x\0"; -pub const PRIx16: &'static [u8; 2usize] = b"x\0"; -pub const PRIx32: &'static [u8; 2usize] = b"x\0"; -pub const PRIx64: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxLEAST8: &'static [u8; 2usize] = b"x\0"; -pub const PRIxLEAST16: &'static [u8; 2usize] = b"x\0"; -pub const PRIxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const PRIxLEAST64: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxFAST8: &'static [u8; 2usize] = b"x\0"; -pub const PRIxFAST16: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxFAST32: &'static [u8; 3usize] = b"lx\0"; -pub const PRIxFAST64: &'static [u8; 3usize] = b"lx\0"; -pub const PRIX8: &'static [u8; 2usize] = b"X\0"; -pub const PRIX16: &'static [u8; 2usize] = b"X\0"; -pub const PRIX32: &'static [u8; 2usize] = b"X\0"; -pub const PRIX64: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXLEAST8: &'static [u8; 2usize] = b"X\0"; -pub const PRIXLEAST16: &'static [u8; 2usize] = b"X\0"; -pub const PRIXLEAST32: &'static [u8; 2usize] = b"X\0"; -pub const PRIXLEAST64: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXFAST8: &'static [u8; 2usize] = b"X\0"; -pub const PRIXFAST16: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXFAST32: &'static [u8; 3usize] = b"lX\0"; -pub const PRIXFAST64: &'static [u8; 3usize] = b"lX\0"; -pub const PRIdMAX: &'static [u8; 3usize] = b"ld\0"; -pub const PRIiMAX: &'static [u8; 3usize] = b"li\0"; -pub const PRIoMAX: &'static [u8; 3usize] = b"lo\0"; -pub const PRIuMAX: &'static [u8; 3usize] = b"lu\0"; -pub const PRIxMAX: &'static [u8; 3usize] = b"lx\0"; -pub const PRIXMAX: &'static [u8; 3usize] = b"lX\0"; -pub const PRIdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const PRIiPTR: &'static [u8; 3usize] = b"li\0"; -pub const PRIoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const PRIuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const PRIxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const PRIXPTR: &'static [u8; 3usize] = b"lX\0"; -pub const SCNd8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNd16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNd32: &'static [u8; 2usize] = b"d\0"; -pub const SCNd64: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdLEAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNdLEAST16: &'static [u8; 3usize] = b"hd\0"; -pub const SCNdLEAST32: &'static [u8; 2usize] = b"d\0"; -pub const SCNdLEAST64: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdFAST8: &'static [u8; 4usize] = b"hhd\0"; -pub const SCNdFAST16: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdFAST32: &'static [u8; 3usize] = b"ld\0"; -pub const SCNdFAST64: &'static [u8; 3usize] = b"ld\0"; -pub const SCNi8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNi16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNi32: &'static [u8; 2usize] = b"i\0"; -pub const SCNi64: &'static [u8; 3usize] = b"li\0"; -pub const SCNiLEAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNiLEAST16: &'static [u8; 3usize] = b"hi\0"; -pub const SCNiLEAST32: &'static [u8; 2usize] = b"i\0"; -pub const SCNiLEAST64: &'static [u8; 3usize] = b"li\0"; -pub const SCNiFAST8: &'static [u8; 4usize] = b"hhi\0"; -pub const SCNiFAST16: &'static [u8; 3usize] = b"li\0"; -pub const SCNiFAST32: &'static [u8; 3usize] = b"li\0"; -pub const SCNiFAST64: &'static [u8; 3usize] = b"li\0"; -pub const SCNu8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNu16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNu32: &'static [u8; 2usize] = b"u\0"; -pub const SCNu64: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuLEAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNuLEAST16: &'static [u8; 3usize] = b"hu\0"; -pub const SCNuLEAST32: &'static [u8; 2usize] = b"u\0"; -pub const SCNuLEAST64: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuFAST8: &'static [u8; 4usize] = b"hhu\0"; -pub const SCNuFAST16: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuFAST32: &'static [u8; 3usize] = b"lu\0"; -pub const SCNuFAST64: &'static [u8; 3usize] = b"lu\0"; -pub const SCNo8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNo16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNo32: &'static [u8; 2usize] = b"o\0"; -pub const SCNo64: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoLEAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNoLEAST16: &'static [u8; 3usize] = b"ho\0"; -pub const SCNoLEAST32: &'static [u8; 2usize] = b"o\0"; -pub const SCNoLEAST64: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoFAST8: &'static [u8; 4usize] = b"hho\0"; -pub const SCNoFAST16: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoFAST32: &'static [u8; 3usize] = b"lo\0"; -pub const SCNoFAST64: &'static [u8; 3usize] = b"lo\0"; -pub const SCNx8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNx16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNx32: &'static [u8; 2usize] = b"x\0"; -pub const SCNx64: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxLEAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNxLEAST16: &'static [u8; 3usize] = b"hx\0"; -pub const SCNxLEAST32: &'static [u8; 2usize] = b"x\0"; -pub const SCNxLEAST64: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxFAST8: &'static [u8; 4usize] = b"hhx\0"; -pub const SCNxFAST16: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxFAST32: &'static [u8; 3usize] = b"lx\0"; -pub const SCNxFAST64: &'static [u8; 3usize] = b"lx\0"; -pub const SCNdMAX: &'static [u8; 3usize] = b"ld\0"; -pub const SCNiMAX: &'static [u8; 3usize] = b"li\0"; -pub const SCNoMAX: &'static [u8; 3usize] = b"lo\0"; -pub const SCNuMAX: &'static [u8; 3usize] = b"lu\0"; -pub const SCNxMAX: &'static [u8; 3usize] = b"lx\0"; -pub const SCNdPTR: &'static [u8; 3usize] = b"ld\0"; -pub const SCNiPTR: &'static [u8; 3usize] = b"li\0"; -pub const SCNoPTR: &'static [u8; 3usize] = b"lo\0"; -pub const SCNuPTR: &'static [u8; 3usize] = b"lu\0"; -pub const SCNxPTR: &'static [u8; 3usize] = b"lx\0"; -pub const _CTYPE_H: u32 = 1; -pub const _SYS_TIME_H: u32 = 1; -pub const _SYS_RESOURCE_H: u32 = 1; -pub const RLIM64_INFINITY: i32 = -1; -pub const __rusage_defined: u32 = 1; -pub const PRIO_MIN: i32 = -20; -pub const PRIO_MAX: u32 = 20; -pub const _STRING_H: u32 = 1; -pub const _STRINGS_H: u32 = 1; -pub const _STDLIB_H: u32 = 1; -pub const WNOHANG: u32 = 1; -pub const WUNTRACED: u32 = 2; -pub const WSTOPPED: u32 = 2; -pub const WEXITED: u32 = 4; -pub const WCONTINUED: u32 = 8; -pub const WNOWAIT: u32 = 16777216; -pub const __WNOTHREAD: u32 = 536870912; -pub const __WALL: u32 = 1073741824; -pub const __WCLONE: u32 = 2147483648; -pub const __ENUM_IDTYPE_T: u32 = 1; -pub const __W_CONTINUED: u32 = 65535; -pub const __WCOREFLAG: u32 = 128; -pub const __ldiv_t_defined: u32 = 1; -pub const __lldiv_t_defined: u32 = 1; -pub const RAND_MAX: u32 = 2147483647; -pub const EXIT_FAILURE: u32 = 1; -pub const EXIT_SUCCESS: u32 = 0; -pub const _ALLOCA_H: u32 = 1; -pub const FS_EXISTS: u32 = 1; -pub const FS_EXECABLE: u32 = 2; -pub const FS_EXEC_PREFERRED: u32 = 4; -pub const FS_EXEC_ONLY: u32 = 8; -pub const FS_DIRECTORY: u32 = 16; -pub const FS_NODIRS: u32 = 32; -pub const FS_READABLE: u32 = 64; -pub const HIGH_FD_MAX: u32 = 256; -pub const DIRSEP: u8 = 47u8; -pub const AS_DISPOSE: u32 = 1; -pub const NO_SIG: i32 = -1; -pub const DEBUG_TRAP: u32 = 33; -pub const ERROR_TRAP: u32 = 34; -pub const RETURN_TRAP: u32 = 35; -pub const EXIT_TRAP: u32 = 0; -pub const BASH_NSIG: u32 = 36; -pub const DSIG_SIGPREFIX: u32 = 1; -pub const DSIG_NOCASE: u32 = 2; -pub const _LIBGETTEXT_H: u32 = 1; -pub const _LIBINTL_H: u32 = 1; -pub const __USE_GNU_GETTEXT: u32 = 1; -pub const _LOCALE_H: u32 = 1; -pub const _BITS_LOCALE_H: u32 = 1; -pub const __LC_CTYPE: u32 = 0; -pub const __LC_NUMERIC: u32 = 1; -pub const __LC_TIME: u32 = 2; -pub const __LC_COLLATE: u32 = 3; -pub const __LC_MONETARY: u32 = 4; -pub const __LC_MESSAGES: u32 = 5; -pub const __LC_ALL: u32 = 6; -pub const __LC_PAPER: u32 = 7; -pub const __LC_NAME: u32 = 8; -pub const __LC_ADDRESS: u32 = 9; -pub const __LC_TELEPHONE: u32 = 10; -pub const __LC_MEASUREMENT: u32 = 11; -pub const __LC_IDENTIFICATION: u32 = 12; -pub const LC_CTYPE: u32 = 0; -pub const LC_NUMERIC: u32 = 1; -pub const LC_TIME: u32 = 2; -pub const LC_COLLATE: u32 = 3; -pub const LC_MONETARY: u32 = 4; -pub const LC_MESSAGES: u32 = 5; -pub const LC_ALL: u32 = 6; -pub const LC_PAPER: u32 = 7; -pub const LC_NAME: u32 = 8; -pub const LC_ADDRESS: u32 = 9; -pub const LC_TELEPHONE: u32 = 10; -pub const LC_MEASUREMENT: u32 = 11; -pub const LC_IDENTIFICATION: u32 = 12; -pub const LC_CTYPE_MASK: u32 = 1; -pub const LC_NUMERIC_MASK: u32 = 2; -pub const LC_TIME_MASK: u32 = 4; -pub const LC_COLLATE_MASK: u32 = 8; -pub const LC_MONETARY_MASK: u32 = 16; -pub const LC_MESSAGES_MASK: u32 = 32; -pub const LC_PAPER_MASK: u32 = 128; -pub const LC_NAME_MASK: u32 = 256; -pub const LC_ADDRESS_MASK: u32 = 512; -pub const LC_TELEPHONE_MASK: u32 = 1024; -pub const LC_MEASUREMENT_MASK: u32 = 2048; -pub const LC_IDENTIFICATION_MASK: u32 = 4096; -pub const LC_ALL_MASK: u32 = 8127; -pub const EXP_EXPANDED: u32 = 1; -pub const FUNC_MULTILINE: u32 = 1; -pub const FUNC_EXTERNAL: u32 = 2; -pub const CASE_LOWER: u32 = 1; -pub const CASE_UPPER: u32 = 2; -pub const CASE_CAPITALIZE: u32 = 4; -pub const CASE_UNCAP: u32 = 8; -pub const CASE_TOGGLE: u32 = 16; -pub const CASE_TOGGLEALL: u32 = 32; -pub const CASE_UPFIRST: u32 = 64; -pub const CASE_LOWFIRST: u32 = 128; -pub const CASE_USEWORDS: u32 = 4096; -pub const FL_PREFIX: u32 = 1; -pub const FL_ADDBASE: u32 = 2; -pub const FL_HEXUPPER: u32 = 4; -pub const FL_UNSIGNED: u32 = 8; -pub const MP_DOTILDE: u32 = 1; -pub const MP_DOCWD: u32 = 2; -pub const MP_RMDOT: u32 = 4; -pub const MP_IGNDOT: u32 = 8; -pub const PATH_CHECKDOTDOT: u32 = 1; -pub const PATH_CHECKEXISTS: u32 = 2; -pub const PATH_HARDPATH: u32 = 4; -pub const PATH_NOALLOC: u32 = 8; -pub const SHMAT_SUBEXP: u32 = 1; -pub const SHMAT_PWARN: u32 = 2; -pub const MT_USETMPDIR: u32 = 1; -pub const MT_READWRITE: u32 = 2; -pub const MT_USERANDOM: u32 = 4; -pub const MT_TEMPLATE: u32 = 8; -pub const DEFAULT_HASH_BUCKETS: u32 = 128; -pub const HASH_NOSRCH: u32 = 1; -pub const HASH_CREATE: u32 = 2; -pub const ASSOC_HASH_BUCKETS: u32 = 1024; -pub const VC_HASLOCAL: u32 = 1; -pub const VC_HASTMPVAR: u32 = 2; -pub const VC_FUNCENV: u32 = 4; -pub const VC_BLTNENV: u32 = 8; -pub const VC_TEMPENV: u32 = 16; -pub const VC_TEMPFLAGS: u32 = 28; -pub const att_exported: u32 = 1; -pub const att_readonly: u32 = 2; -pub const att_array: u32 = 4; -pub const att_function: u32 = 8; -pub const att_integer: u32 = 16; -pub const att_local: u32 = 32; -pub const att_assoc: u32 = 64; -pub const att_trace: u32 = 128; -pub const att_uppercase: u32 = 256; -pub const att_lowercase: u32 = 512; -pub const att_capcase: u32 = 1024; -pub const att_nameref: u32 = 2048; -pub const user_attrs: u32 = 4019; -pub const attmask_user: u32 = 4095; -pub const att_invisible: u32 = 4096; -pub const att_nounset: u32 = 8192; -pub const att_noassign: u32 = 16384; -pub const att_imported: u32 = 32768; -pub const att_special: u32 = 65536; -pub const att_nofree: u32 = 131072; -pub const att_regenerate: u32 = 262144; -pub const attmask_int: u32 = 1044480; -pub const att_tempvar: u32 = 1048576; -pub const att_propagate: u32 = 2097152; -pub const attmask_scope: u32 = 15728640; -pub const NAMEREF_MAX: u32 = 8; -pub const MKLOC_ASSOCOK: u32 = 1; -pub const MKLOC_ARRAYOK: u32 = 2; -pub const MKLOC_INHERIT: u32 = 4; -pub const AV_ALLOWALL: u32 = 1; -pub const AV_QUOTED: u32 = 2; -pub const AV_USEIND: u32 = 4; -pub const AV_USEVAL: u32 = 8; -pub const AV_ASSIGNRHS: u32 = 16; -pub const AV_NOEXPAND: u32 = 32; -pub const VA_NOEXPAND: u32 = 1; -pub const VA_ONEWORD: u32 = 2; -pub const RX_ACTIVE: u32 = 1; -pub const RX_UNDOABLE: u32 = 2; -pub const RX_CLEXEC: u32 = 4; -pub const RX_INTERNAL: u32 = 8; -pub const RX_USER: u32 = 16; -pub const RX_SAVCLEXEC: u32 = 32; -pub const RX_SAVEFD: u32 = 64; -pub const HC_IGNSPACE: u32 = 1; -pub const HC_IGNDUPS: u32 = 2; -pub const HC_ERASEDUPS: u32 = 4; -pub const HC_IGNBOTH: u32 = 3; -pub const CA_ALIAS: u32 = 1; -pub const CA_ARRAYVAR: u32 = 2; -pub const CA_BINDING: u32 = 4; -pub const CA_BUILTIN: u32 = 8; -pub const CA_COMMAND: u32 = 16; -pub const CA_DIRECTORY: u32 = 32; -pub const CA_DISABLED: u32 = 64; -pub const CA_ENABLED: u32 = 128; -pub const CA_EXPORT: u32 = 256; -pub const CA_FILE: u32 = 512; -pub const CA_FUNCTION: u32 = 1024; -pub const CA_GROUP: u32 = 2048; -pub const CA_HELPTOPIC: u32 = 4096; -pub const CA_HOSTNAME: u32 = 8192; -pub const CA_JOB: u32 = 16384; -pub const CA_KEYWORD: u32 = 32768; -pub const CA_RUNNING: u32 = 65536; -pub const CA_SERVICE: u32 = 131072; -pub const CA_SETOPT: u32 = 262144; -pub const CA_SHOPT: u32 = 524288; -pub const CA_SIGNAL: u32 = 1048576; -pub const CA_STOPPED: u32 = 2097152; -pub const CA_USER: u32 = 4194304; -pub const CA_VARIABLE: u32 = 8388608; -pub const COPT_RESERVED: u32 = 1; -pub const COPT_DEFAULT: u32 = 2; -pub const COPT_FILENAMES: u32 = 4; -pub const COPT_DIRNAMES: u32 = 8; -pub const COPT_NOQUOTE: u32 = 16; -pub const COPT_NOSPACE: u32 = 32; -pub const COPT_BASHDEFAULT: u32 = 64; -pub const COPT_PLUSDIRS: u32 = 128; -pub const COPT_NOSORT: u32 = 256; -pub const COPT_LASTUSER: u32 = 256; -pub const PCOMP_RETRYFAIL: u32 = 512; -pub const PCOMP_NOTFOUND: u32 = 1024; -pub const LIST_DYNAMIC: u32 = 1; -pub const LIST_DIRTY: u32 = 2; -pub const LIST_INITIALIZED: u32 = 4; -pub const LIST_MUSTSORT: u32 = 8; -pub const LIST_DONTFREE: u32 = 16; -pub const LIST_DONTFREEMEMBERS: u32 = 32; -pub const EMPTYCMD: &'static [u8; 11usize] = b"_EmptycmD_\0"; -pub const DEFAULTCMD: &'static [u8; 13usize] = b"_DefaultCmD_\0"; -pub const INITIALWORD: &'static [u8; 14usize] = b"_InitialWorD_\0"; -pub const _STDIO_H: u32 = 1; -pub const _____fpos_t_defined: u32 = 1; -pub const _____fpos64_t_defined: u32 = 1; -pub const __struct_FILE_defined: u32 = 1; -pub const _IO_EOF_SEEN: u32 = 16; -pub const _IO_ERR_SEEN: u32 = 32; -pub const _IO_USER_LOCK: u32 = 32768; -pub const __cookie_io_functions_t_defined: u32 = 1; -pub const _IOFBF: u32 = 0; -pub const _IOLBF: u32 = 1; -pub const _IONBF: u32 = 2; -pub const BUFSIZ: u32 = 8192; -pub const EOF: i32 = -1; -pub const P_tmpdir: &'static [u8; 5usize] = b"/tmp\0"; -pub const _BITS_STDIO_LIM_H: u32 = 1; -pub const L_tmpnam: u32 = 20; -pub const TMP_MAX: u32 = 238328; -pub const FILENAME_MAX: u32 = 4096; -pub const L_ctermid: u32 = 9; -pub const L_cuserid: u32 = 9; -pub const FOPEN_MAX: u32 = 16; -pub const RENAME_NOREPLACE: u32 = 1; -pub const RENAME_EXCHANGE: u32 = 2; -pub const RENAME_WHITEOUT: u32 = 4; -pub const DEFAULT_HOSTS_FILE: &'static [u8; 11usize] = b"/etc/hosts\0"; -pub const SYS_PROFILE: &'static [u8; 13usize] = b"/etc/profile\0"; -pub const DEBUGGER_START_FILE: &'static [u8; 46usize] = - b"/usr/local/share/utshelldb/utshelldb-main.inc\0"; -pub const FILENAME_HASH_BUCKETS: u32 = 256; -pub const HASH_RELPATH: u32 = 1; -pub const HASH_CHKDOT: u32 = 2; -pub const AL_EXPANDNEXT: u32 = 1; -pub const AL_BEINGEXPANDED: u32 = 2; -pub const QGLOB_CVTNULL: u32 = 1; -pub const QGLOB_FILENAME: u32 = 2; -pub const QGLOB_REGEXP: u32 = 4; -pub const QGLOB_CTLESC: u32 = 8; -pub const QGLOB_DEQUOTE: u32 = 16; -pub const FLAG_ON: u8 = 45u8; -pub const FLAG_OFF: u8 = 43u8; -pub const FLAG_ERROR: i32 = -1; -pub const PATCHLEVEL: u32 = 4; -pub const Q_DOUBLE_QUOTES: u32 = 1; -pub const Q_HERE_DOCUMENT: u32 = 2; -pub const Q_KEEP_BACKSLASH: u32 = 4; -pub const Q_PATQUOTE: u32 = 8; -pub const Q_QUOTED: u32 = 16; -pub const Q_ADDEDQUOTES: u32 = 32; -pub const Q_QUOTEDNULL: u32 = 64; -pub const Q_DOLBRACE: u32 = 128; -pub const Q_ARITH: u32 = 256; -pub const Q_ARRAYSUB: u32 = 512; -pub const ASS_APPEND: u32 = 1; -pub const ASS_MKLOCAL: u32 = 2; -pub const ASS_MKASSOC: u32 = 4; -pub const ASS_MKGLOBAL: u32 = 8; -pub const ASS_NAMEREF: u32 = 16; -pub const ASS_FORCE: u32 = 32; -pub const ASS_CHKLOCAL: u32 = 64; -pub const ASS_NOEXPAND: u32 = 128; -pub const ASS_NOEVAL: u32 = 256; -pub const ASS_NOLONGJMP: u32 = 512; -pub const ASS_NOINVIS: u32 = 1024; -pub const SX_NOALLOC: u32 = 1; -pub const SX_VARNAME: u32 = 2; -pub const SX_REQMATCH: u32 = 4; -pub const SX_COMMAND: u32 = 8; -pub const SX_NOCTLESC: u32 = 16; -pub const SX_NOESCCTLNUL: u32 = 32; -pub const SX_NOLONGJMP: u32 = 64; -pub const SX_ARITHSUB: u32 = 128; -pub const SX_POSIXEXP: u32 = 256; -pub const SX_WORD: u32 = 512; -pub const SX_COMPLETE: u32 = 1024; -pub const SX_STRIPDQ: u32 = 2048; -pub const SD_NOJMP: u32 = 1; -pub const SD_INVERT: u32 = 2; -pub const SD_NOQUOTEDELIM: u32 = 4; -pub const SD_NOSKIPCMD: u32 = 8; -pub const SD_EXTGLOB: u32 = 16; -pub const SD_IGNOREQUOTE: u32 = 32; -pub const SD_GLOB: u32 = 64; -pub const SD_NOPROCSUB: u32 = 128; -pub const SD_COMPLETE: u32 = 256; -pub const SD_HISTEXP: u32 = 512; -pub const SD_ARITHEXP: u32 = 1024; -pub const _SYS_WAIT_H: u32 = 1; -pub const WCOREFLAG: u32 = 128; -pub const WAIT_ANY: i32 = -1; -pub const WAIT_MYPGRP: u32 = 0; -pub const JLIST_STANDARD: u32 = 0; -pub const JLIST_LONG: u32 = 1; -pub const JLIST_PID_ONLY: u32 = 2; -pub const JLIST_CHANGED_ONLY: u32 = 3; -pub const JLIST_NONINTERACTIVE: u32 = 4; -pub const LONGEST_SIGNAL_DESC: u32 = 24; -pub const JWAIT_PERROR: u32 = 1; -pub const JWAIT_FORCE: u32 = 2; -pub const JWAIT_NOWAIT: u32 = 4; -pub const JWAIT_WAITING: u32 = 8; -pub const JWAIT_NOTERM: u32 = 256; -pub const FORKSLEEP_MAX: u32 = 16; -pub const PS_DONE: u32 = 0; -pub const PS_RUNNING: u32 = 1; -pub const PS_STOPPED: u32 = 2; -pub const PS_RECYCLED: u32 = 4; -pub const J_FOREGROUND: u32 = 1; -pub const J_NOTIFIED: u32 = 2; -pub const J_JOBCONTROL: u32 = 4; -pub const J_NOHUP: u32 = 8; -pub const J_STATSAVED: u32 = 16; -pub const J_ASYNC: u32 = 32; -pub const J_PIPEFAIL: u32 = 64; -pub const J_WAITING: u32 = 128; -pub const NO_JOB: i32 = -1; -pub const DUP_JOB: i32 = -2; -pub const BAD_JOBSPEC: i32 = -3; -pub const FORK_SYNC: u32 = 0; -pub const FORK_ASYNC: u32 = 1; -pub const FORK_NOJOB: u32 = 2; -pub const FORK_NOTERM: u32 = 4; -pub const CMDSRCH_HASH: u32 = 1; -pub const CMDSRCH_STDPATH: u32 = 2; -pub const CMDSRCH_TEMPENV: u32 = 4; -pub const _SETJMP_H: u32 = 1; -pub const _BITS_SETJMP_H: u32 = 1; -pub const NOT_JUMPED: u32 = 0; -pub const FORCE_EOF: u32 = 1; -pub const DISCARD: u32 = 2; -pub const EXITPROG: u32 = 3; -pub const ERREXIT: u32 = 4; -pub const SIGEXIT: u32 = 5; -pub const slashify_in_here_document: &'static [u8; 4usize] = b"\\`$\0"; -pub const shell_meta_chars: &'static [u8; 8usize] = b"()<>;&|\0"; -pub const shell_break_chars: &'static [u8; 13usize] = b"()<>;&| \\t\\n\0"; -pub const shell_quote_chars: &'static [u8; 4usize] = b"\"`'\0"; -pub const shell_exp_chars: &'static [u8; 4usize] = b"$<>\0"; -pub const ext_glob_chars: &'static [u8; 6usize] = b"@*+?!\0"; -pub const shell_glob_chars: &'static [u8; 6usize] = b"*?[]^\0"; -pub const CWORD: u32 = 0; -pub const CSHMETA: u32 = 1; -pub const CSHBRK: u32 = 2; -pub const CBACKQ: u32 = 4; -pub const CQUOTE: u32 = 8; -pub const CSPECL: u32 = 16; -pub const CEXP: u32 = 32; -pub const CBSDQUOTE: u32 = 64; -pub const CBSHDOC: u32 = 128; -pub const CGLOB: u32 = 256; -pub const CXGLOB: u32 = 512; -pub const CXQUOTE: u32 = 1024; -pub const CSPECVAR: u32 = 2048; -pub const CSUBSTOP: u32 = 4096; -pub const CBLANK: u32 = 8192; -pub const CTLESC: u8 = 1u8; -pub const CTLNUL: u8 = 127u8; -pub const _OCACHE_H_: u32 = 1; -pub const NO_PIPE: i32 = -1; -pub const REDIRECT_BOTH: i32 = -2; -pub const NO_VARIABLE: i32 = -1; -pub const EXECUTION_FAILURE: u32 = 1; -pub const EXECUTION_SUCCESS: u32 = 0; -pub const EX_BADUSAGE: u32 = 2; -pub const EX_MISCERROR: u32 = 2; -pub const EX_RETRYFAIL: u32 = 124; -pub const EX_WEXPCOMSUB: u32 = 125; -pub const EX_BINARY_FILE: u32 = 126; -pub const EX_NOEXEC: u32 = 126; -pub const EX_NOINPUT: u32 = 126; -pub const EX_NOTFOUND: u32 = 127; -pub const EX_SHERRBASE: u32 = 256; -pub const EX_BADSYNTAX: u32 = 257; -pub const EX_USAGE: u32 = 258; -pub const EX_REDIRFAIL: u32 = 259; -pub const EX_BADASSIGN: u32 = 260; -pub const EX_EXPFAIL: u32 = 261; -pub const EX_DISKFALLBACK: u32 = 262; -pub const MATCH_ANY: u32 = 0; -pub const MATCH_BEG: u32 = 1; -pub const MATCH_END: u32 = 2; -pub const MATCH_TYPEMASK: u32 = 3; -pub const MATCH_GLOBREP: u32 = 16; -pub const MATCH_QUOTED: u32 = 32; -pub const MATCH_ASSIGNRHS: u32 = 64; -pub const MATCH_STARSUB: u32 = 128; -pub const FD_BITMAP_SIZE: u32 = 32; -pub const HEREDOC_MAX: u32 = 16; -pub const B_EOF: u32 = 1; -pub const B_ERROR: u32 = 2; -pub const B_UNBUFF: u32 = 4; -pub const B_WASBASHINPUT: u32 = 8; -pub const B_TEXT: u32 = 16; -pub const B_SHAREDBUF: u32 = 32; -pub const BUILTIN_ENABLED: u32 = 1; -pub const BUILTIN_DELETED: u32 = 2; -pub const STATIC_BUILTIN: u32 = 4; -pub const SPECIAL_BUILTIN: u32 = 8; -pub const ASSIGNMENT_BUILTIN: u32 = 16; -pub const POSIX_BUILTIN: u32 = 32; -pub const LOCALVAR_BUILTIN: u32 = 64; -pub const REQUIRES_BUILTIN: u32 = 128; -pub const BASE_INDENT: u32 = 4; -pub const PST_CASEPAT: u32 = 1; -pub const PST_ALEXPNEXT: u32 = 2; -pub const PST_ALLOWOPNBRC: u32 = 4; -pub const PST_NEEDCLOSBRC: u32 = 8; -pub const PST_DBLPAREN: u32 = 16; -pub const PST_SUBSHELL: u32 = 32; -pub const PST_CMDSUBST: u32 = 64; -pub const PST_CASESTMT: u32 = 128; -pub const PST_CONDCMD: u32 = 256; -pub const PST_CONDEXPR: u32 = 512; -pub const PST_ARITHFOR: u32 = 1024; -pub const PST_ALEXPAND: u32 = 2048; -pub const PST_EXTPAT: u32 = 4096; -pub const PST_COMPASSIGN: u32 = 8192; -pub const PST_ASSIGNOK: u32 = 16384; -pub const PST_EOFTOKEN: u32 = 32768; -pub const PST_REGEXP: u32 = 65536; -pub const PST_HEREDOC: u32 = 131072; -pub const PST_REPARSE: u32 = 262144; -pub const PST_REDIRLIST: u32 = 524288; -pub const PST_COMMENT: u32 = 1048576; -pub const PST_ENDALIAS: u32 = 2097152; -pub const DOLBRACE_PARAM: u32 = 1; -pub const DOLBRACE_OP: u32 = 2; -pub const DOLBRACE_WORD: u32 = 4; -pub const DOLBRACE_QUOTE: u32 = 64; -pub const DOLBRACE_QUOTE2: u32 = 128; -pub const YYDEBUG: u32 = 0; -pub const IF: u32 = 258; -pub const THEN: u32 = 259; -pub const ELSE: u32 = 260; -pub const ELIF: u32 = 261; -pub const FI: u32 = 262; -pub const CASE: u32 = 263; -pub const ESAC: u32 = 264; -pub const FOR: u32 = 265; -pub const SELECT: u32 = 266; -pub const WHILE: u32 = 267; -pub const UNTIL: u32 = 268; -pub const DO: u32 = 269; -pub const DONE: u32 = 270; -pub const FUNCTION: u32 = 271; -pub const COPROC: u32 = 272; -pub const COND_START: u32 = 273; -pub const COND_END: u32 = 274; -pub const COND_ERROR: u32 = 275; -pub const IN: u32 = 276; -pub const BANG: u32 = 277; -pub const TIME: u32 = 278; -pub const TIMEOPT: u32 = 279; -pub const TIMEIGN: u32 = 280; -pub const WORD: u32 = 281; -pub const ASSIGNMENT_WORD: u32 = 282; -pub const REDIR_WORD: u32 = 283; -pub const NUMBER: u32 = 284; -pub const ARITH_CMD: u32 = 285; -pub const ARITH_FOR_EXPRS: u32 = 286; -pub const COND_CMD: u32 = 287; -pub const AND_AND: u32 = 288; -pub const OR_OR: u32 = 289; -pub const GREATER_GREATER: u32 = 290; -pub const LESS_LESS: u32 = 291; -pub const LESS_AND: u32 = 292; -pub const LESS_LESS_LESS: u32 = 293; -pub const GREATER_AND: u32 = 294; -pub const SEMI_SEMI: u32 = 295; -pub const SEMI_AND: u32 = 296; -pub const SEMI_SEMI_AND: u32 = 297; -pub const LESS_LESS_MINUS: u32 = 298; -pub const AND_GREATER: u32 = 299; -pub const AND_GREATER_GREATER: u32 = 300; -pub const LESS_GREATER: u32 = 301; -pub const GREATER_BAR: u32 = 302; -pub const BAR_AND: u32 = 303; -pub const yacc_EOF: u32 = 304; -pub const YYSTYPE_IS_TRIVIAL: u32 = 1; -pub const YYSTYPE_IS_DECLARED: u32 = 1; -pub const _FCNTL_H: u32 = 1; -pub const __O_LARGEFILE: u32 = 0; -pub const F_GETLK64: u32 = 5; -pub const F_SETLK64: u32 = 6; -pub const F_SETLKW64: u32 = 7; -pub const __iovec_defined: u32 = 1; -pub const O_ACCMODE: u32 = 3; -pub const O_RDONLY: u32 = 0; -pub const O_WRONLY: u32 = 1; -pub const O_RDWR: u32 = 2; -pub const O_CREAT: u32 = 64; -pub const O_EXCL: u32 = 128; -pub const O_NOCTTY: u32 = 256; -pub const O_TRUNC: u32 = 512; -pub const O_APPEND: u32 = 1024; -pub const O_NONBLOCK: u32 = 2048; -pub const O_NDELAY: u32 = 2048; -pub const O_SYNC: u32 = 1052672; -pub const O_FSYNC: u32 = 1052672; -pub const O_ASYNC: u32 = 8192; -pub const __O_DIRECTORY: u32 = 65536; -pub const __O_NOFOLLOW: u32 = 131072; -pub const __O_CLOEXEC: u32 = 524288; -pub const __O_DIRECT: u32 = 16384; -pub const __O_NOATIME: u32 = 262144; -pub const __O_PATH: u32 = 2097152; -pub const __O_DSYNC: u32 = 4096; -pub const __O_TMPFILE: u32 = 4259840; -pub const F_GETLK: u32 = 5; -pub const F_SETLK: u32 = 6; -pub const F_SETLKW: u32 = 7; -pub const F_OFD_GETLK: u32 = 36; -pub const F_OFD_SETLK: u32 = 37; -pub const F_OFD_SETLKW: u32 = 38; -pub const O_LARGEFILE: u32 = 0; -pub const O_DIRECTORY: u32 = 65536; -pub const O_NOFOLLOW: u32 = 131072; -pub const O_CLOEXEC: u32 = 524288; -pub const O_DIRECT: u32 = 16384; -pub const O_NOATIME: u32 = 262144; -pub const O_PATH: u32 = 2097152; -pub const O_TMPFILE: u32 = 4259840; -pub const O_DSYNC: u32 = 4096; -pub const O_RSYNC: u32 = 1052672; -pub const F_DUPFD: u32 = 0; -pub const F_GETFD: u32 = 1; -pub const F_SETFD: u32 = 2; -pub const F_GETFL: u32 = 3; -pub const F_SETFL: u32 = 4; -pub const __F_SETOWN: u32 = 8; -pub const __F_GETOWN: u32 = 9; -pub const F_SETOWN: u32 = 8; -pub const F_GETOWN: u32 = 9; -pub const __F_SETSIG: u32 = 10; -pub const __F_GETSIG: u32 = 11; -pub const __F_SETOWN_EX: u32 = 15; -pub const __F_GETOWN_EX: u32 = 16; -pub const F_SETSIG: u32 = 10; -pub const F_GETSIG: u32 = 11; -pub const F_SETOWN_EX: u32 = 15; -pub const F_GETOWN_EX: u32 = 16; -pub const F_SETLEASE: u32 = 1024; -pub const F_GETLEASE: u32 = 1025; -pub const F_NOTIFY: u32 = 1026; -pub const F_SETPIPE_SZ: u32 = 1031; -pub const F_GETPIPE_SZ: u32 = 1032; -pub const F_ADD_SEALS: u32 = 1033; -pub const F_GET_SEALS: u32 = 1034; -pub const F_GET_RW_HINT: u32 = 1035; -pub const F_SET_RW_HINT: u32 = 1036; -pub const F_GET_FILE_RW_HINT: u32 = 1037; -pub const F_SET_FILE_RW_HINT: u32 = 1038; -pub const F_DUPFD_CLOEXEC: u32 = 1030; -pub const FD_CLOEXEC: u32 = 1; -pub const F_RDLCK: u32 = 0; -pub const F_WRLCK: u32 = 1; -pub const F_UNLCK: u32 = 2; -pub const F_EXLCK: u32 = 4; -pub const F_SHLCK: u32 = 8; -pub const LOCK_SH: u32 = 1; -pub const LOCK_EX: u32 = 2; -pub const LOCK_NB: u32 = 4; -pub const LOCK_UN: u32 = 8; -pub const LOCK_MAND: u32 = 32; -pub const LOCK_READ: u32 = 64; -pub const LOCK_WRITE: u32 = 128; -pub const LOCK_RW: u32 = 192; -pub const DN_ACCESS: u32 = 1; -pub const DN_MODIFY: u32 = 2; -pub const DN_CREATE: u32 = 4; -pub const DN_DELETE: u32 = 8; -pub const DN_RENAME: u32 = 16; -pub const DN_ATTRIB: u32 = 32; -pub const DN_MULTISHOT: u32 = 2147483648; -pub const F_SEAL_SEAL: u32 = 1; -pub const F_SEAL_SHRINK: u32 = 2; -pub const F_SEAL_GROW: u32 = 4; -pub const F_SEAL_WRITE: u32 = 8; -pub const RWF_WRITE_LIFE_NOT_SET: u32 = 0; -pub const RWH_WRITE_LIFE_NONE: u32 = 1; -pub const RWH_WRITE_LIFE_SHORT: u32 = 2; -pub const RWH_WRITE_LIFE_MEDIUM: u32 = 3; -pub const RWH_WRITE_LIFE_LONG: u32 = 4; -pub const RWH_WRITE_LIFE_EXTREME: u32 = 5; -pub const FAPPEND: u32 = 1024; -pub const FFSYNC: u32 = 1052672; -pub const FASYNC: u32 = 8192; -pub const FNONBLOCK: u32 = 2048; -pub const FNDELAY: u32 = 2048; -pub const __POSIX_FADV_DONTNEED: u32 = 4; -pub const __POSIX_FADV_NOREUSE: u32 = 5; -pub const POSIX_FADV_NORMAL: u32 = 0; -pub const POSIX_FADV_RANDOM: u32 = 1; -pub const POSIX_FADV_SEQUENTIAL: u32 = 2; -pub const POSIX_FADV_WILLNEED: u32 = 3; -pub const POSIX_FADV_DONTNEED: u32 = 4; -pub const POSIX_FADV_NOREUSE: u32 = 5; -pub const SYNC_FILE_RANGE_WAIT_BEFORE: u32 = 1; -pub const SYNC_FILE_RANGE_WRITE: u32 = 2; -pub const SYNC_FILE_RANGE_WAIT_AFTER: u32 = 4; -pub const SPLICE_F_MOVE: u32 = 1; -pub const SPLICE_F_NONBLOCK: u32 = 2; -pub const SPLICE_F_MORE: u32 = 4; -pub const SPLICE_F_GIFT: u32 = 8; -pub const FALLOC_FL_KEEP_SIZE: u32 = 1; -pub const FALLOC_FL_PUNCH_HOLE: u32 = 2; -pub const FALLOC_FL_NO_HIDE_STALE: u32 = 4; -pub const FALLOC_FL_COLLAPSE_RANGE: u32 = 8; -pub const FALLOC_FL_ZERO_RANGE: u32 = 16; -pub const FALLOC_FL_INSERT_RANGE: u32 = 32; -pub const FALLOC_FL_UNSHARE_RANGE: u32 = 64; -pub const MAX_HANDLE_SZ: u32 = 128; -pub const AT_FDCWD: i32 = -100; -pub const AT_SYMLINK_NOFOLLOW: u32 = 256; -pub const AT_REMOVEDIR: u32 = 512; -pub const AT_SYMLINK_FOLLOW: u32 = 1024; -pub const AT_NO_AUTOMOUNT: u32 = 2048; -pub const AT_EMPTY_PATH: u32 = 4096; -pub const AT_STATX_SYNC_TYPE: u32 = 24576; -pub const AT_STATX_SYNC_AS_STAT: u32 = 0; -pub const AT_STATX_FORCE_SYNC: u32 = 8192; -pub const AT_STATX_DONT_SYNC: u32 = 16384; -pub const AT_EACCESS: u32 = 512; -pub const _BITS_STAT_H: u32 = 1; -pub const _STAT_VER_KERNEL: u32 = 0; -pub const _STAT_VER_LINUX: u32 = 1; -pub const _MKNOD_VER_LINUX: u32 = 0; -pub const _STAT_VER: u32 = 1; -pub const __S_IFMT: u32 = 61440; -pub const __S_IFDIR: u32 = 16384; -pub const __S_IFCHR: u32 = 8192; -pub const __S_IFBLK: u32 = 24576; -pub const __S_IFREG: u32 = 32768; -pub const __S_IFIFO: u32 = 4096; -pub const __S_IFLNK: u32 = 40960; -pub const __S_IFSOCK: u32 = 49152; -pub const __S_ISUID: u32 = 2048; -pub const __S_ISGID: u32 = 1024; -pub const __S_ISVTX: u32 = 512; -pub const __S_IREAD: u32 = 256; -pub const __S_IWRITE: u32 = 128; -pub const __S_IEXEC: u32 = 64; -pub const UTIME_NOW: u32 = 1073741823; -pub const UTIME_OMIT: u32 = 1073741822; -pub const S_IFMT: u32 = 61440; -pub const S_IFDIR: u32 = 16384; -pub const S_IFCHR: u32 = 8192; -pub const S_IFBLK: u32 = 24576; -pub const S_IFREG: u32 = 32768; -pub const S_IFIFO: u32 = 4096; -pub const S_IFLNK: u32 = 40960; -pub const S_IFSOCK: u32 = 49152; -pub const S_ISUID: u32 = 2048; -pub const S_ISGID: u32 = 1024; -pub const S_ISVTX: u32 = 512; -pub const S_IRUSR: u32 = 256; -pub const S_IWUSR: u32 = 128; -pub const S_IXUSR: u32 = 64; -pub const S_IRWXU: u32 = 448; -pub const S_IRGRP: u32 = 32; -pub const S_IWGRP: u32 = 16; -pub const S_IXGRP: u32 = 8; -pub const S_IRWXG: u32 = 56; -pub const S_IROTH: u32 = 4; -pub const S_IWOTH: u32 = 2; -pub const S_IXOTH: u32 = 1; -pub const S_IRWXO: u32 = 7; -pub const FD_NCLOEXEC: u32 = 0; -pub const O_BINARY: u32 = 0; -pub const O_TEXT: u32 = 0; -pub const STAT_TIME_H: u32 = 1; -pub const _SYS_STAT_H: u32 = 1; -pub const S_IREAD: u32 = 256; -pub const S_IWRITE: u32 = 128; -pub const S_IEXEC: u32 = 64; -pub const ACCESSPERMS: u32 = 511; -pub const ALLPERMS: u32 = 4095; -pub const DEFFILEMODE: u32 = 438; -pub const S_BLKSIZE: u32 = 512; -pub const _MKNOD_VER: u32 = 0; -pub const STATX_TYPE: u32 = 1; -pub const STATX_MODE: u32 = 2; -pub const STATX_NLINK: u32 = 4; -pub const STATX_UID: u32 = 8; -pub const STATX_GID: u32 = 16; -pub const STATX_ATIME: u32 = 32; -pub const STATX_MTIME: u32 = 64; -pub const STATX_CTIME: u32 = 128; -pub const STATX_INO: u32 = 256; -pub const STATX_SIZE: u32 = 512; -pub const STATX_BLOCKS: u32 = 1024; -pub const STATX_BASIC_STATS: u32 = 2047; -pub const STATX_ALL: u32 = 4095; -pub const STATX_BTIME: u32 = 2048; -pub const STATX__RESERVED: u32 = 2147483648; -pub const STATX_ATTR_COMPRESSED: u32 = 4; -pub const STATX_ATTR_IMMUTABLE: u32 = 16; -pub const STATX_ATTR_APPEND: u32 = 32; -pub const STATX_ATTR_NODUMP: u32 = 64; -pub const STATX_ATTR_ENCRYPTED: u32 = 2048; -pub const STATX_ATTR_AUTOMOUNT: u32 = 4096; -pub const _TIME_H: u32 = 1; -pub const _BITS_TIME_H: u32 = 1; -pub const CLOCK_REALTIME: u32 = 0; -pub const CLOCK_MONOTONIC: u32 = 1; -pub const CLOCK_PROCESS_CPUTIME_ID: u32 = 2; -pub const CLOCK_THREAD_CPUTIME_ID: u32 = 3; -pub const CLOCK_MONOTONIC_RAW: u32 = 4; -pub const CLOCK_REALTIME_COARSE: u32 = 5; -pub const CLOCK_MONOTONIC_COARSE: u32 = 6; -pub const CLOCK_BOOTTIME: u32 = 7; -pub const CLOCK_REALTIME_ALARM: u32 = 8; -pub const CLOCK_BOOTTIME_ALARM: u32 = 9; -pub const CLOCK_TAI: u32 = 11; -pub const TIMER_ABSTIME: u32 = 1; -pub const _BITS_TIMEX_H: u32 = 1; -pub const ADJ_OFFSET: u32 = 1; -pub const ADJ_FREQUENCY: u32 = 2; -pub const ADJ_MAXERROR: u32 = 4; -pub const ADJ_ESTERROR: u32 = 8; -pub const ADJ_STATUS: u32 = 16; -pub const ADJ_TIMECONST: u32 = 32; -pub const ADJ_TAI: u32 = 128; -pub const ADJ_SETOFFSET: u32 = 256; -pub const ADJ_MICRO: u32 = 4096; -pub const ADJ_NANO: u32 = 8192; -pub const ADJ_TICK: u32 = 16384; -pub const ADJ_OFFSET_SINGLESHOT: u32 = 32769; -pub const ADJ_OFFSET_SS_READ: u32 = 40961; -pub const MOD_OFFSET: u32 = 1; -pub const MOD_FREQUENCY: u32 = 2; -pub const MOD_MAXERROR: u32 = 4; -pub const MOD_ESTERROR: u32 = 8; -pub const MOD_STATUS: u32 = 16; -pub const MOD_TIMECONST: u32 = 32; -pub const MOD_CLKB: u32 = 16384; -pub const MOD_CLKA: u32 = 32769; -pub const MOD_TAI: u32 = 128; -pub const MOD_MICRO: u32 = 4096; -pub const MOD_NANO: u32 = 8192; -pub const STA_PLL: u32 = 1; -pub const STA_PPSFREQ: u32 = 2; -pub const STA_PPSTIME: u32 = 4; -pub const STA_FLL: u32 = 8; -pub const STA_INS: u32 = 16; -pub const STA_DEL: u32 = 32; -pub const STA_UNSYNC: u32 = 64; -pub const STA_FREQHOLD: u32 = 128; -pub const STA_PPSSIGNAL: u32 = 256; -pub const STA_PPSJITTER: u32 = 512; -pub const STA_PPSWANDER: u32 = 1024; -pub const STA_PPSERROR: u32 = 2048; -pub const STA_CLOCKERR: u32 = 4096; -pub const STA_NANO: u32 = 8192; -pub const STA_MODE: u32 = 16384; -pub const STA_CLK: u32 = 32768; -pub const STA_RONLY: u32 = 65280; -pub const __struct_tm_defined: u32 = 1; -pub const __itimerspec_defined: u32 = 1; -pub const TIME_UTC: u32 = 1; -pub const _BASH_SYSTIMES_H: u32 = 1; -pub const _SYS_TIMES_H: u32 = 1; -pub const _DIRENT_H: u32 = 1; -pub const _DIRENT_MATCHES_DIRENT64: u32 = 1; -pub const MAXNAMLEN: u32 = 255; -pub const D_FILENO_AVAILABLE: u32 = 1; -pub const _SHMBCHAR_H: u32 = 1; -pub const IS_BASIC_ASCII: u32 = 1; -pub const _STDLIB_H_: u32 = 1; -pub const S_IRUGO: u32 = 292; -pub const S_IWUGO: u32 = 146; -pub const S_IXUGO: u32 = 73; -pub const USEC_PER_SEC: u32 = 1000000; -pub const _TERMIOS_H: u32 = 1; -pub const NCCS: u32 = 32; -pub const _HAVE_STRUCT_TERMIOS_C_ISPEED: u32 = 1; -pub const _HAVE_STRUCT_TERMIOS_C_OSPEED: u32 = 1; -pub const VINTR: u32 = 0; -pub const VQUIT: u32 = 1; -pub const VERASE: u32 = 2; -pub const VKILL: u32 = 3; -pub const VEOF: u32 = 4; -pub const VTIME: u32 = 5; -pub const VMIN: u32 = 6; -pub const VSWTC: u32 = 7; -pub const VSTART: u32 = 8; -pub const VSTOP: u32 = 9; -pub const VSUSP: u32 = 10; -pub const VEOL: u32 = 11; -pub const VREPRINT: u32 = 12; -pub const VDISCARD: u32 = 13; -pub const VWERASE: u32 = 14; -pub const VLNEXT: u32 = 15; -pub const VEOL2: u32 = 16; -pub const IGNBRK: u32 = 1; -pub const BRKINT: u32 = 2; -pub const IGNPAR: u32 = 4; -pub const PARMRK: u32 = 8; -pub const INPCK: u32 = 16; -pub const ISTRIP: u32 = 32; -pub const INLCR: u32 = 64; -pub const IGNCR: u32 = 128; -pub const ICRNL: u32 = 256; -pub const IUCLC: u32 = 512; -pub const IXON: u32 = 1024; -pub const IXANY: u32 = 2048; -pub const IXOFF: u32 = 4096; -pub const IMAXBEL: u32 = 8192; -pub const IUTF8: u32 = 16384; -pub const OPOST: u32 = 1; -pub const OLCUC: u32 = 2; -pub const ONLCR: u32 = 4; -pub const OCRNL: u32 = 8; -pub const ONOCR: u32 = 16; -pub const ONLRET: u32 = 32; -pub const OFILL: u32 = 64; -pub const OFDEL: u32 = 128; -pub const NLDLY: u32 = 256; -pub const NL0: u32 = 0; -pub const NL1: u32 = 256; -pub const CRDLY: u32 = 1536; -pub const CR0: u32 = 0; -pub const CR1: u32 = 512; -pub const CR2: u32 = 1024; -pub const CR3: u32 = 1536; -pub const TABDLY: u32 = 6144; -pub const TAB0: u32 = 0; -pub const TAB1: u32 = 2048; -pub const TAB2: u32 = 4096; -pub const TAB3: u32 = 6144; -pub const BSDLY: u32 = 8192; -pub const BS0: u32 = 0; -pub const BS1: u32 = 8192; -pub const FFDLY: u32 = 32768; -pub const FF0: u32 = 0; -pub const FF1: u32 = 32768; -pub const VTDLY: u32 = 16384; -pub const VT0: u32 = 0; -pub const VT1: u32 = 16384; -pub const XTABS: u32 = 6144; -pub const CBAUD: u32 = 4111; -pub const B0: u32 = 0; -pub const B50: u32 = 1; -pub const B75: u32 = 2; -pub const B110: u32 = 3; -pub const B134: u32 = 4; -pub const B150: u32 = 5; -pub const B200: u32 = 6; -pub const B300: u32 = 7; -pub const B600: u32 = 8; -pub const B1200: u32 = 9; -pub const B1800: u32 = 10; -pub const B2400: u32 = 11; -pub const B4800: u32 = 12; -pub const B9600: u32 = 13; -pub const B19200: u32 = 14; -pub const B38400: u32 = 15; -pub const EXTA: u32 = 14; -pub const EXTB: u32 = 15; -pub const CSIZE: u32 = 48; -pub const CS5: u32 = 0; -pub const CS6: u32 = 16; -pub const CS7: u32 = 32; -pub const CS8: u32 = 48; -pub const CSTOPB: u32 = 64; -pub const CREAD: u32 = 128; -pub const PARENB: u32 = 256; -pub const PARODD: u32 = 512; -pub const HUPCL: u32 = 1024; -pub const CLOCAL: u32 = 2048; -pub const CBAUDEX: u32 = 4096; -pub const B57600: u32 = 4097; -pub const B115200: u32 = 4098; -pub const B230400: u32 = 4099; -pub const B460800: u32 = 4100; -pub const B500000: u32 = 4101; -pub const B576000: u32 = 4102; -pub const B921600: u32 = 4103; -pub const B1000000: u32 = 4104; -pub const B1152000: u32 = 4105; -pub const B1500000: u32 = 4106; -pub const B2000000: u32 = 4107; -pub const B2500000: u32 = 4108; -pub const B3000000: u32 = 4109; -pub const B3500000: u32 = 4110; -pub const B4000000: u32 = 4111; -pub const __MAX_BAUD: u32 = 4111; -pub const CIBAUD: u32 = 269418496; -pub const CMSPAR: u32 = 1073741824; -pub const CRTSCTS: u32 = 2147483648; -pub const ISIG: u32 = 1; -pub const ICANON: u32 = 2; -pub const XCASE: u32 = 4; -pub const ECHO: u32 = 8; -pub const ECHOE: u32 = 16; -pub const ECHOK: u32 = 32; -pub const ECHONL: u32 = 64; -pub const NOFLSH: u32 = 128; -pub const TOSTOP: u32 = 256; -pub const ECHOCTL: u32 = 512; -pub const ECHOPRT: u32 = 1024; -pub const ECHOKE: u32 = 2048; -pub const FLUSHO: u32 = 4096; -pub const PENDIN: u32 = 16384; -pub const IEXTEN: u32 = 32768; -pub const EXTPROC: u32 = 65536; -pub const TCOOFF: u32 = 0; -pub const TCOON: u32 = 1; -pub const TCIOFF: u32 = 2; -pub const TCION: u32 = 3; -pub const TCIFLUSH: u32 = 0; -pub const TCOFLUSH: u32 = 1; -pub const TCIOFLUSH: u32 = 2; -pub const TCSANOW: u32 = 0; -pub const TCSADRAIN: u32 = 1; -pub const TCSAFLUSH: u32 = 2; -pub const TTYDEF_IFLAG: u32 = 11554; -pub const TTYDEF_OFLAG: u32 = 6149; -pub const TTYDEF_LFLAG: u32 = 35355; -pub const TTYDEF_CFLAG: u32 = 1440; -pub const TTYDEF_SPEED: u32 = 13; -pub const CEOL: u8 = 0u8; -pub const CERASE: u32 = 127; -pub const CSTATUS: u8 = 0u8; -pub const CMIN: u32 = 1; -pub const CQUIT: u32 = 28; -pub const CTIME: u32 = 0; -pub const CBRK: u8 = 0u8; -pub const GETOPT_EOF: i32 = -1; -pub const GETOPT_HELP: i32 = -99; -pub const _SH_GETOPT_H: u32 = 1; -pub const SEVAL_NONINT: u32 = 1; -pub const SEVAL_INTERACT: u32 = 2; -pub const SEVAL_NOHIST: u32 = 4; -pub const SEVAL_NOFREE: u32 = 8; -pub const SEVAL_RESETLINE: u32 = 16; -pub const SEVAL_PARSEONLY: u32 = 32; -pub const SEVAL_NOLONGJMP: u32 = 64; -pub const SEVAL_FUNCDEF: u32 = 128; -pub const SEVAL_ONECMD: u32 = 256; -pub const SEVAL_NOHISTEXP: u32 = 512; -pub const CDESC_ALL: u32 = 1; -pub const CDESC_SHORTDESC: u32 = 2; -pub const CDESC_REUSABLE: u32 = 4; -pub const CDESC_TYPE: u32 = 8; -pub const CDESC_PATH_ONLY: u32 = 16; -pub const CDESC_FORCE_PATH: u32 = 32; -pub const CDESC_NOFUNCS: u32 = 64; -pub const CDESC_ABSPATH: u32 = 128; -pub const CDESC_STDPATH: u32 = 256; -pub const JM_PREFIX: u32 = 1; -pub const JM_SUBSTRING: u32 = 2; -pub const JM_EXACT: u32 = 4; -pub const JM_STOPPED: u32 = 8; -pub const JM_FIRSTMATCH: u32 = 16; -pub const ARGS_NONE: u32 = 0; -pub const ARGS_INVOC: u32 = 1; -pub const ARGS_FUNC: u32 = 2; -pub const ARGS_SETBLTIN: u32 = 4; -pub const MAX_ATTRIBUTES: u32 = 16; -pub const TEST_PATMATCH: u32 = 1; -pub const TEST_ARITHEXP: u32 = 2; -pub const TEST_LOCALE: u32 = 4; -pub type _Float32 = f32; -pub type _Float64 = f64; -pub type _Float32x = f64; -pub type _Float64x = f64; -pub type wchar_t = ::std::os::raw::c_int; -pub type va_list = __builtin_va_list; -pub type __gnuc_va_list = __builtin_va_list; -pub type wint_t = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __mbstate_t { - pub __count: ::std::os::raw::c_int, - pub __value: __mbstate_t__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union __mbstate_t__bindgen_ty_1 { - pub __wch: ::std::os::raw::c_uint, - pub __wchb: [::std::os::raw::c_char; 4usize], - _bindgen_union_align: u32, -} -pub type mbstate_t = __mbstate_t; -pub type __FILE = _IO_FILE; -pub type FILE = _IO_FILE; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __locale_struct { - pub __locales: [*mut __locale_data; 13usize], - pub __ctype_b: *const ::std::os::raw::c_ushort, - pub __ctype_tolower: *const ::std::os::raw::c_int, - pub __ctype_toupper: *const ::std::os::raw::c_int, - pub __names: [*const ::std::os::raw::c_char; 13usize], -} -pub type __locale_t = *mut __locale_struct; -pub type locale_t = __locale_t; -extern "C" { - pub fn wcscpy(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsncpy(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> *mut wchar_t; -} -extern "C" { - pub fn wcscat(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsncat(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> *mut wchar_t; -} -extern "C" { - pub fn wcscmp(__s1: *const wchar_t, __s2: *const wchar_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcsncmp(__s1: *const wchar_t, __s2: *const wchar_t, __n: usize) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcscasecmp(__s1: *const wchar_t, __s2: *const wchar_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcsncasecmp( - __s1: *const wchar_t, - __s2: *const wchar_t, - __n: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcscasecmp_l( - __s1: *const wchar_t, - __s2: *const wchar_t, - __loc: locale_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcsncasecmp_l( - __s1: *const wchar_t, - __s2: *const wchar_t, - __n: usize, - __loc: locale_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcscoll(__s1: *const wchar_t, __s2: *const wchar_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcsxfrm(__s1: *mut wchar_t, __s2: *const wchar_t, __n: usize) -> usize; -} -extern "C" { - pub fn wcscoll_l( - __s1: *const wchar_t, - __s2: *const wchar_t, - __loc: locale_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcsxfrm_l( - __s1: *mut wchar_t, - __s2: *const wchar_t, - __n: usize, - __loc: locale_t, - ) -> usize; -} -extern "C" { - pub fn wcsdup(__s: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcschr(__wcs: *const wchar_t, __wc: wchar_t) -> *mut ::std::os::raw::c_int; -} -extern "C" { - pub fn wcsrchr(__wcs: *const wchar_t, __wc: wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcschrnul(__s: *const wchar_t, __wc: wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcscspn(__wcs: *const wchar_t, __reject: *const wchar_t) -> usize; -} -extern "C" { - pub fn wcsspn(__wcs: *const wchar_t, __accept: *const wchar_t) -> usize; -} -extern "C" { - pub fn wcspbrk(__wcs: *const wchar_t, __accept: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsstr(__haystack: *const wchar_t, __needle: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcstok( - __s: *mut wchar_t, - __delim: *const wchar_t, - __ptr: *mut *mut wchar_t, - ) -> *mut wchar_t; -} -extern "C" { - pub fn wcslen(__s: *const wchar_t) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn wcswcs(__haystack: *const wchar_t, __needle: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcsnlen(__s: *const wchar_t, __maxlen: usize) -> usize; -} -extern "C" { - pub fn wmemchr(__s: *const wchar_t, __c: wchar_t, __n: usize) -> *mut ::std::os::raw::c_int; -} -extern "C" { - pub fn wmemcmp(__s1: *const wchar_t, __s2: *const wchar_t, __n: usize) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wmemcpy(__s1: *mut wchar_t, __s2: *const wchar_t, __n: usize) -> *mut wchar_t; -} -extern "C" { - pub fn wmemmove(__s1: *mut wchar_t, __s2: *const wchar_t, __n: usize) -> *mut wchar_t; -} -extern "C" { - pub fn wmemset(__s: *mut wchar_t, __c: wchar_t, __n: usize) -> *mut wchar_t; -} -extern "C" { - pub fn wmempcpy(__s1: *mut wchar_t, __s2: *const wchar_t, __n: usize) -> *mut wchar_t; -} -extern "C" { - pub fn btowc(__c: ::std::os::raw::c_int) -> wint_t; -} -extern "C" { - pub fn wctob(__c: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mbsinit(__ps: *const mbstate_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mbrtowc( - __pwc: *mut wchar_t, - __s: *const ::std::os::raw::c_char, - __n: usize, - __p: *mut mbstate_t, - ) -> usize; -} -extern "C" { - pub fn wcrtomb(__s: *mut ::std::os::raw::c_char, __wc: wchar_t, __ps: *mut mbstate_t) -> usize; -} -extern "C" { - pub fn __mbrlen(__s: *const ::std::os::raw::c_char, __n: usize, __ps: *mut mbstate_t) -> usize; -} -extern "C" { - pub fn mbrlen(__s: *const ::std::os::raw::c_char, __n: usize, __ps: *mut mbstate_t) -> usize; -} -extern "C" { - pub fn mbsrtowcs( - __dst: *mut wchar_t, - __src: *mut *const ::std::os::raw::c_char, - __len: usize, - __ps: *mut mbstate_t, - ) -> usize; -} -extern "C" { - pub fn wcsrtombs( - __dst: *mut ::std::os::raw::c_char, - __src: *mut *const wchar_t, - __len: usize, - __ps: *mut mbstate_t, - ) -> usize; -} -extern "C" { - pub fn mbsnrtowcs( - __dst: *mut wchar_t, - __src: *mut *const ::std::os::raw::c_char, - __nmc: usize, - __len: usize, - __ps: *mut mbstate_t, - ) -> usize; -} -extern "C" { - pub fn wcsnrtombs( - __dst: *mut ::std::os::raw::c_char, - __src: *mut *const wchar_t, - __nwc: usize, - __len: usize, - __ps: *mut mbstate_t, - ) -> usize; -} -extern "C" { - pub fn wcwidth(__c: wchar_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcswidth(__s: *const wchar_t, __n: usize) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcstod(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> f64; -} -extern "C" { - pub fn wcstof(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> f32; -} -extern "C" { - pub fn wcstold(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> f64; -} -extern "C" { - pub fn wcstof32(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> _Float32; -} -extern "C" { - pub fn wcstof64(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> _Float64; -} -extern "C" { - pub fn wcstof32x(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> _Float32x; -} -extern "C" { - pub fn wcstof64x(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> _Float64x; -} -extern "C" { - pub fn wcstol( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn wcstoul( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn wcstoll( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn wcstoull( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub fn wcstoq( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn wcstouq( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub fn wcstol_l( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - __loc: locale_t, - ) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn wcstoul_l( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - __loc: locale_t, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn wcstoll_l( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - __loc: locale_t, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn wcstoull_l( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __base: ::std::os::raw::c_int, - __loc: locale_t, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub fn wcstod_l(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t, __loc: locale_t) -> f64; -} -extern "C" { - pub fn wcstof_l(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t, __loc: locale_t) -> f32; -} -extern "C" { - pub fn wcstold_l(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t, __loc: locale_t) -> f64; -} -extern "C" { - pub fn wcstof32_l( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __loc: locale_t, - ) -> _Float32; -} -extern "C" { - pub fn wcstof64_l( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __loc: locale_t, - ) -> _Float64; -} -extern "C" { - pub fn wcstof32x_l( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __loc: locale_t, - ) -> _Float32x; -} -extern "C" { - pub fn wcstof64x_l( - __nptr: *const wchar_t, - __endptr: *mut *mut wchar_t, - __loc: locale_t, - ) -> _Float64x; -} -extern "C" { - pub fn wcpcpy(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t; -} -extern "C" { - pub fn wcpncpy(__dest: *mut wchar_t, __src: *const wchar_t, __n: usize) -> *mut wchar_t; -} -extern "C" { - pub fn open_wmemstream(__bufloc: *mut *mut wchar_t, __sizeloc: *mut usize) -> *mut __FILE; -} -extern "C" { - pub fn fwide(__fp: *mut __FILE, __mode: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fwprintf(__stream: *mut __FILE, __format: *const wchar_t, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wprintf(__format: *const wchar_t, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn swprintf( - __s: *mut wchar_t, - __n: usize, - __format: *const wchar_t, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vfwprintf( - __s: *mut __FILE, - __format: *const wchar_t, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vwprintf(__format: *const wchar_t, __arg: *mut __va_list_tag) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vswprintf( - __s: *mut wchar_t, - __n: usize, - __format: *const wchar_t, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fwscanf(__stream: *mut __FILE, __format: *const wchar_t, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wscanf(__format: *const wchar_t, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn swscanf(__s: *const wchar_t, __format: *const wchar_t, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vfwscanf( - __s: *mut __FILE, - __format: *const wchar_t, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vwscanf(__format: *const wchar_t, __arg: *mut __va_list_tag) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vswscanf( - __s: *const wchar_t, - __format: *const wchar_t, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgetwc(__stream: *mut __FILE) -> wint_t; -} -extern "C" { - pub fn getwc(__stream: *mut __FILE) -> wint_t; -} -extern "C" { - pub fn getwchar() -> wint_t; -} -extern "C" { - pub fn fputwc(__wc: wchar_t, __stream: *mut __FILE) -> wint_t; -} -extern "C" { - pub fn putwc(__wc: wchar_t, __stream: *mut __FILE) -> wint_t; -} -extern "C" { - pub fn putwchar(__wc: wchar_t) -> wint_t; -} -extern "C" { - pub fn fgetws( - __ws: *mut wchar_t, - __n: ::std::os::raw::c_int, - __stream: *mut __FILE, - ) -> *mut wchar_t; -} -extern "C" { - pub fn fputws(__ws: *const wchar_t, __stream: *mut __FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ungetwc(__wc: wint_t, __stream: *mut __FILE) -> wint_t; -} -extern "C" { - pub fn getwc_unlocked(__stream: *mut __FILE) -> wint_t; -} -extern "C" { - pub fn getwchar_unlocked() -> wint_t; -} -extern "C" { - pub fn fgetwc_unlocked(__stream: *mut __FILE) -> wint_t; -} -extern "C" { - pub fn fputwc_unlocked(__wc: wchar_t, __stream: *mut __FILE) -> wint_t; -} -extern "C" { - pub fn putwc_unlocked(__wc: wchar_t, __stream: *mut __FILE) -> wint_t; -} -extern "C" { - pub fn putwchar_unlocked(__wc: wchar_t) -> wint_t; -} -extern "C" { - pub fn fgetws_unlocked( - __ws: *mut wchar_t, - __n: ::std::os::raw::c_int, - __stream: *mut __FILE, - ) -> *mut wchar_t; -} -extern "C" { - pub fn fputws_unlocked(__ws: *const wchar_t, __stream: *mut __FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wcsftime( - __s: *mut wchar_t, - __maxsize: usize, - __format: *const wchar_t, - __tp: *const tm, - ) -> usize; -} -extern "C" { - pub fn wcsftime_l( - __s: *mut wchar_t, - __maxsize: usize, - __format: *const wchar_t, - __tp: *const tm, - __loc: locale_t, - ) -> usize; -} -pub type __u_char = ::std::os::raw::c_uchar; -pub type __u_short = ::std::os::raw::c_ushort; -pub type __u_int = ::std::os::raw::c_uint; -pub type __u_long = ::std::os::raw::c_ulong; -pub type __int8_t = ::std::os::raw::c_schar; -pub type __uint8_t = ::std::os::raw::c_uchar; -pub type __int16_t = ::std::os::raw::c_short; -pub type __uint16_t = ::std::os::raw::c_ushort; -pub type __int32_t = ::std::os::raw::c_int; -pub type __uint32_t = ::std::os::raw::c_uint; -pub type __int64_t = ::std::os::raw::c_long; -pub type __uint64_t = ::std::os::raw::c_ulong; -pub type __int_least8_t = __int8_t; -pub type __uint_least8_t = __uint8_t; -pub type __int_least16_t = __int16_t; -pub type __uint_least16_t = __uint16_t; -pub type __int_least32_t = __int32_t; -pub type __uint_least32_t = __uint32_t; -pub type __int_least64_t = __int64_t; -pub type __uint_least64_t = __uint64_t; -pub type __quad_t = ::std::os::raw::c_long; -pub type __u_quad_t = ::std::os::raw::c_ulong; -pub type __intmax_t = ::std::os::raw::c_long; -pub type __uintmax_t = ::std::os::raw::c_ulong; -pub type __dev_t = ::std::os::raw::c_ulong; -pub type __uid_t = ::std::os::raw::c_uint; -pub type __gid_t = ::std::os::raw::c_uint; -pub type __ino_t = ::std::os::raw::c_ulong; -pub type __ino64_t = ::std::os::raw::c_ulong; -pub type __mode_t = ::std::os::raw::c_uint; -pub type __nlink_t = ::std::os::raw::c_ulong; -pub type __off_t = ::std::os::raw::c_long; -pub type __off64_t = ::std::os::raw::c_long; -pub type __pid_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __fsid_t { - pub __val: [::std::os::raw::c_int; 2usize], -} -pub type __clock_t = ::std::os::raw::c_long; -pub type __rlim_t = ::std::os::raw::c_ulong; -pub type __rlim64_t = ::std::os::raw::c_ulong; -pub type __id_t = ::std::os::raw::c_uint; -pub type __time_t = ::std::os::raw::c_long; -pub type __useconds_t = ::std::os::raw::c_uint; -pub type __suseconds_t = ::std::os::raw::c_long; -pub type __daddr_t = ::std::os::raw::c_int; -pub type __key_t = ::std::os::raw::c_int; -pub type __clockid_t = ::std::os::raw::c_int; -pub type __timer_t = *mut ::std::os::raw::c_void; -pub type __blksize_t = ::std::os::raw::c_long; -pub type __blkcnt_t = ::std::os::raw::c_long; -pub type __blkcnt64_t = ::std::os::raw::c_long; -pub type __fsblkcnt_t = ::std::os::raw::c_ulong; -pub type __fsblkcnt64_t = ::std::os::raw::c_ulong; -pub type __fsfilcnt_t = ::std::os::raw::c_ulong; -pub type __fsfilcnt64_t = ::std::os::raw::c_ulong; -pub type __fsword_t = ::std::os::raw::c_long; -pub type __ssize_t = ::std::os::raw::c_long; -pub type __syscall_slong_t = ::std::os::raw::c_long; -pub type __syscall_ulong_t = ::std::os::raw::c_ulong; -pub type __loff_t = __off64_t; -pub type __caddr_t = *mut ::std::os::raw::c_char; -pub type __intptr_t = ::std::os::raw::c_long; -pub type __socklen_t = ::std::os::raw::c_uint; -pub type __sig_atomic_t = ::std::os::raw::c_int; -pub type wctype_t = ::std::os::raw::c_ulong; -pub const __ISwupper: _bindgen_ty_1 = 0; -pub const __ISwlower: _bindgen_ty_1 = 1; -pub const __ISwalpha: _bindgen_ty_1 = 2; -pub const __ISwdigit: _bindgen_ty_1 = 3; -pub const __ISwxdigit: _bindgen_ty_1 = 4; -pub const __ISwspace: _bindgen_ty_1 = 5; -pub const __ISwprint: _bindgen_ty_1 = 6; -pub const __ISwgraph: _bindgen_ty_1 = 7; -pub const __ISwblank: _bindgen_ty_1 = 8; -pub const __ISwcntrl: _bindgen_ty_1 = 9; -pub const __ISwpunct: _bindgen_ty_1 = 10; -pub const __ISwalnum: _bindgen_ty_1 = 11; -pub const _ISwupper: _bindgen_ty_1 = 16777216; -pub const _ISwlower: _bindgen_ty_1 = 33554432; -pub const _ISwalpha: _bindgen_ty_1 = 67108864; -pub const _ISwdigit: _bindgen_ty_1 = 134217728; -pub const _ISwxdigit: _bindgen_ty_1 = 268435456; -pub const _ISwspace: _bindgen_ty_1 = 536870912; -pub const _ISwprint: _bindgen_ty_1 = 1073741824; -pub const _ISwgraph: _bindgen_ty_1 = -2147483648; -pub const _ISwblank: _bindgen_ty_1 = 65536; -pub const _ISwcntrl: _bindgen_ty_1 = 131072; -pub const _ISwpunct: _bindgen_ty_1 = 262144; -pub const _ISwalnum: _bindgen_ty_1 = 524288; -pub type _bindgen_ty_1 = i32; -extern "C" { - pub fn iswalnum(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswalpha(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswcntrl(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswdigit(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswgraph(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswlower(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswprint(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswpunct(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswspace(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswupper(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswxdigit(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswblank(__wc: wint_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wctype(__property: *const ::std::os::raw::c_char) -> wctype_t; -} -extern "C" { - pub fn iswctype(__wc: wint_t, __desc: wctype_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn towlower(__wc: wint_t) -> wint_t; -} -extern "C" { - pub fn towupper(__wc: wint_t) -> wint_t; -} -pub type wctrans_t = *const __int32_t; -extern "C" { - pub fn wctrans(__property: *const ::std::os::raw::c_char) -> wctrans_t; -} -extern "C" { - pub fn towctrans(__wc: wint_t, __desc: wctrans_t) -> wint_t; -} -extern "C" { - pub fn iswalnum_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswalpha_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswcntrl_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswdigit_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswgraph_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswlower_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswprint_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswpunct_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswspace_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswupper_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswxdigit_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iswblank_l(__wc: wint_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wctype_l(__property: *const ::std::os::raw::c_char, __locale: locale_t) -> wctype_t; -} -extern "C" { - pub fn iswctype_l(__wc: wint_t, __desc: wctype_t, __locale: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn towlower_l(__wc: wint_t, __locale: locale_t) -> wint_t; -} -extern "C" { - pub fn towupper_l(__wc: wint_t, __locale: locale_t) -> wint_t; -} -extern "C" { - pub fn wctrans_l(__property: *const ::std::os::raw::c_char, __locale: locale_t) -> wctrans_t; -} -extern "C" { - pub fn towctrans_l(__wc: wint_t, __desc: wctrans_t, __locale: locale_t) -> wint_t; -} -pub type gid_t = __gid_t; -pub type uid_t = __uid_t; -pub type off_t = __off_t; -pub type off64_t = __off64_t; -pub type useconds_t = __useconds_t; -pub type pid_t = __pid_t; -pub type socklen_t = __socklen_t; -extern "C" { - pub fn access( - __name: *const ::std::os::raw::c_char, - __type: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn euidaccess( - __name: *const ::std::os::raw::c_char, - __type: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn eaccess( - __name: *const ::std::os::raw::c_char, - __type: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn faccessat( - __fd: ::std::os::raw::c_int, - __file: *const ::std::os::raw::c_char, - __type: ::std::os::raw::c_int, - __flag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lseek( - __fd: ::std::os::raw::c_int, - __offset: __off_t, - __whence: ::std::os::raw::c_int, - ) -> __off_t; -} -extern "C" { - pub fn lseek64( - __fd: ::std::os::raw::c_int, - __offset: __off64_t, - __whence: ::std::os::raw::c_int, - ) -> __off64_t; -} -extern "C" { - pub fn close(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn read( - __fd: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_void, - __nbytes: usize, - ) -> isize; -} -extern "C" { - pub fn write( - __fd: ::std::os::raw::c_int, - __buf: *const ::std::os::raw::c_void, - __n: usize, - ) -> isize; -} -extern "C" { - pub fn pread( - __fd: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_void, - __nbytes: usize, - __offset: __off_t, - ) -> isize; -} -extern "C" { - pub fn pwrite( - __fd: ::std::os::raw::c_int, - __buf: *const ::std::os::raw::c_void, - __n: usize, - __offset: __off_t, - ) -> isize; -} -extern "C" { - pub fn pread64( - __fd: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_void, - __nbytes: usize, - __offset: __off64_t, - ) -> isize; -} -extern "C" { - pub fn pwrite64( - __fd: ::std::os::raw::c_int, - __buf: *const ::std::os::raw::c_void, - __n: usize, - __offset: __off64_t, - ) -> isize; -} -extern "C" { - pub fn pipe(__pipedes: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pipe2( - __pipedes: *mut ::std::os::raw::c_int, - __flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn alarm(__seconds: ::std::os::raw::c_uint) -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn sleep(__seconds: ::std::os::raw::c_uint) -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn ualarm(__value: __useconds_t, __interval: __useconds_t) -> __useconds_t; -} -extern "C" { - pub fn usleep(__useconds: __useconds_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pause() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn chown( - __file: *const ::std::os::raw::c_char, - __owner: __uid_t, - __group: __gid_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fchown( - __fd: ::std::os::raw::c_int, - __owner: __uid_t, - __group: __gid_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lchown( - __file: *const ::std::os::raw::c_char, - __owner: __uid_t, - __group: __gid_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fchownat( - __fd: ::std::os::raw::c_int, - __file: *const ::std::os::raw::c_char, - __owner: __uid_t, - __group: __gid_t, - __flag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn chdir(__path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fchdir(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getcwd(__buf: *mut ::std::os::raw::c_char, __size: usize) - -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_current_dir_name() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn getwd(__buf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn dup(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dup2(__fd: ::std::os::raw::c_int, __fd2: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dup3( - __fd: ::std::os::raw::c_int, - __fd2: ::std::os::raw::c_int, - __flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}__environ"] - pub static mut __environ: *mut *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}environ"] - pub static mut environ: *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn execve( - __path: *const ::std::os::raw::c_char, - __argv: *const *mut ::std::os::raw::c_char, - __envp: *const *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fexecve( - __fd: ::std::os::raw::c_int, - __argv: *const *mut ::std::os::raw::c_char, - __envp: *const *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn execv( - __path: *const ::std::os::raw::c_char, - __argv: *const *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn execle( - __path: *const ::std::os::raw::c_char, - __arg: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn execl( - __path: *const ::std::os::raw::c_char, - __arg: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn execvp( - __file: *const ::std::os::raw::c_char, - __argv: *const *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn execlp( - __file: *const ::std::os::raw::c_char, - __arg: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn execvpe( - __file: *const ::std::os::raw::c_char, - __argv: *const *mut ::std::os::raw::c_char, - __envp: *const *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn nice(__inc: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _exit(__status: ::std::os::raw::c_int); -} -pub const _PC_LINK_MAX: _bindgen_ty_2 = 0; -pub const _PC_MAX_CANON: _bindgen_ty_2 = 1; -pub const _PC_MAX_INPUT: _bindgen_ty_2 = 2; -pub const _PC_NAME_MAX: _bindgen_ty_2 = 3; -pub const _PC_PATH_MAX: _bindgen_ty_2 = 4; -pub const _PC_PIPE_BUF: _bindgen_ty_2 = 5; -pub const _PC_CHOWN_RESTRICTED: _bindgen_ty_2 = 6; -pub const _PC_NO_TRUNC: _bindgen_ty_2 = 7; -pub const _PC_VDISABLE: _bindgen_ty_2 = 8; -pub const _PC_SYNC_IO: _bindgen_ty_2 = 9; -pub const _PC_ASYNC_IO: _bindgen_ty_2 = 10; -pub const _PC_PRIO_IO: _bindgen_ty_2 = 11; -pub const _PC_SOCK_MAXBUF: _bindgen_ty_2 = 12; -pub const _PC_FILESIZEBITS: _bindgen_ty_2 = 13; -pub const _PC_REC_INCR_XFER_SIZE: _bindgen_ty_2 = 14; -pub const _PC_REC_MAX_XFER_SIZE: _bindgen_ty_2 = 15; -pub const _PC_REC_MIN_XFER_SIZE: _bindgen_ty_2 = 16; -pub const _PC_REC_XFER_ALIGN: _bindgen_ty_2 = 17; -pub const _PC_ALLOC_SIZE_MIN: _bindgen_ty_2 = 18; -pub const _PC_SYMLINK_MAX: _bindgen_ty_2 = 19; -pub const _PC_2_SYMLINKS: _bindgen_ty_2 = 20; -pub type _bindgen_ty_2 = u32; -pub const _SC_ARG_MAX: _bindgen_ty_3 = 0; -pub const _SC_CHILD_MAX: _bindgen_ty_3 = 1; -pub const _SC_CLK_TCK: _bindgen_ty_3 = 2; -pub const _SC_NGROUPS_MAX: _bindgen_ty_3 = 3; -pub const _SC_OPEN_MAX: _bindgen_ty_3 = 4; -pub const _SC_STREAM_MAX: _bindgen_ty_3 = 5; -pub const _SC_TZNAME_MAX: _bindgen_ty_3 = 6; -pub const _SC_JOB_CONTROL: _bindgen_ty_3 = 7; -pub const _SC_SAVED_IDS: _bindgen_ty_3 = 8; -pub const _SC_REALTIME_SIGNALS: _bindgen_ty_3 = 9; -pub const _SC_PRIORITY_SCHEDULING: _bindgen_ty_3 = 10; -pub const _SC_TIMERS: _bindgen_ty_3 = 11; -pub const _SC_ASYNCHRONOUS_IO: _bindgen_ty_3 = 12; -pub const _SC_PRIORITIZED_IO: _bindgen_ty_3 = 13; -pub const _SC_SYNCHRONIZED_IO: _bindgen_ty_3 = 14; -pub const _SC_FSYNC: _bindgen_ty_3 = 15; -pub const _SC_MAPPED_FILES: _bindgen_ty_3 = 16; -pub const _SC_MEMLOCK: _bindgen_ty_3 = 17; -pub const _SC_MEMLOCK_RANGE: _bindgen_ty_3 = 18; -pub const _SC_MEMORY_PROTECTION: _bindgen_ty_3 = 19; -pub const _SC_MESSAGE_PASSING: _bindgen_ty_3 = 20; -pub const _SC_SEMAPHORES: _bindgen_ty_3 = 21; -pub const _SC_SHARED_MEMORY_OBJECTS: _bindgen_ty_3 = 22; -pub const _SC_AIO_LISTIO_MAX: _bindgen_ty_3 = 23; -pub const _SC_AIO_MAX: _bindgen_ty_3 = 24; -pub const _SC_AIO_PRIO_DELTA_MAX: _bindgen_ty_3 = 25; -pub const _SC_DELAYTIMER_MAX: _bindgen_ty_3 = 26; -pub const _SC_MQ_OPEN_MAX: _bindgen_ty_3 = 27; -pub const _SC_MQ_PRIO_MAX: _bindgen_ty_3 = 28; -pub const _SC_VERSION: _bindgen_ty_3 = 29; -pub const _SC_PAGESIZE: _bindgen_ty_3 = 30; -pub const _SC_RTSIG_MAX: _bindgen_ty_3 = 31; -pub const _SC_SEM_NSEMS_MAX: _bindgen_ty_3 = 32; -pub const _SC_SEM_VALUE_MAX: _bindgen_ty_3 = 33; -pub const _SC_SIGQUEUE_MAX: _bindgen_ty_3 = 34; -pub const _SC_TIMER_MAX: _bindgen_ty_3 = 35; -pub const _SC_BC_BASE_MAX: _bindgen_ty_3 = 36; -pub const _SC_BC_DIM_MAX: _bindgen_ty_3 = 37; -pub const _SC_BC_SCALE_MAX: _bindgen_ty_3 = 38; -pub const _SC_BC_STRING_MAX: _bindgen_ty_3 = 39; -pub const _SC_COLL_WEIGHTS_MAX: _bindgen_ty_3 = 40; -pub const _SC_EQUIV_CLASS_MAX: _bindgen_ty_3 = 41; -pub const _SC_EXPR_NEST_MAX: _bindgen_ty_3 = 42; -pub const _SC_LINE_MAX: _bindgen_ty_3 = 43; -pub const _SC_RE_DUP_MAX: _bindgen_ty_3 = 44; -pub const _SC_CHARCLASS_NAME_MAX: _bindgen_ty_3 = 45; -pub const _SC_2_VERSION: _bindgen_ty_3 = 46; -pub const _SC_2_C_BIND: _bindgen_ty_3 = 47; -pub const _SC_2_C_DEV: _bindgen_ty_3 = 48; -pub const _SC_2_FORT_DEV: _bindgen_ty_3 = 49; -pub const _SC_2_FORT_RUN: _bindgen_ty_3 = 50; -pub const _SC_2_SW_DEV: _bindgen_ty_3 = 51; -pub const _SC_2_LOCALEDEF: _bindgen_ty_3 = 52; -pub const _SC_PII: _bindgen_ty_3 = 53; -pub const _SC_PII_XTI: _bindgen_ty_3 = 54; -pub const _SC_PII_SOCKET: _bindgen_ty_3 = 55; -pub const _SC_PII_INTERNET: _bindgen_ty_3 = 56; -pub const _SC_PII_OSI: _bindgen_ty_3 = 57; -pub const _SC_POLL: _bindgen_ty_3 = 58; -pub const _SC_SELECT: _bindgen_ty_3 = 59; -pub const _SC_UIO_MAXIOV: _bindgen_ty_3 = 60; -pub const _SC_IOV_MAX: _bindgen_ty_3 = 60; -pub const _SC_PII_INTERNET_STREAM: _bindgen_ty_3 = 61; -pub const _SC_PII_INTERNET_DGRAM: _bindgen_ty_3 = 62; -pub const _SC_PII_OSI_COTS: _bindgen_ty_3 = 63; -pub const _SC_PII_OSI_CLTS: _bindgen_ty_3 = 64; -pub const _SC_PII_OSI_M: _bindgen_ty_3 = 65; -pub const _SC_T_IOV_MAX: _bindgen_ty_3 = 66; -pub const _SC_THREADS: _bindgen_ty_3 = 67; -pub const _SC_THREAD_SAFE_FUNCTIONS: _bindgen_ty_3 = 68; -pub const _SC_GETGR_R_SIZE_MAX: _bindgen_ty_3 = 69; -pub const _SC_GETPW_R_SIZE_MAX: _bindgen_ty_3 = 70; -pub const _SC_LOGIN_NAME_MAX: _bindgen_ty_3 = 71; -pub const _SC_TTY_NAME_MAX: _bindgen_ty_3 = 72; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: _bindgen_ty_3 = 73; -pub const _SC_THREAD_KEYS_MAX: _bindgen_ty_3 = 74; -pub const _SC_THREAD_STACK_MIN: _bindgen_ty_3 = 75; -pub const _SC_THREAD_THREADS_MAX: _bindgen_ty_3 = 76; -pub const _SC_THREAD_ATTR_STACKADDR: _bindgen_ty_3 = 77; -pub const _SC_THREAD_ATTR_STACKSIZE: _bindgen_ty_3 = 78; -pub const _SC_THREAD_PRIORITY_SCHEDULING: _bindgen_ty_3 = 79; -pub const _SC_THREAD_PRIO_INHERIT: _bindgen_ty_3 = 80; -pub const _SC_THREAD_PRIO_PROTECT: _bindgen_ty_3 = 81; -pub const _SC_THREAD_PROCESS_SHARED: _bindgen_ty_3 = 82; -pub const _SC_NPROCESSORS_CONF: _bindgen_ty_3 = 83; -pub const _SC_NPROCESSORS_ONLN: _bindgen_ty_3 = 84; -pub const _SC_PHYS_PAGES: _bindgen_ty_3 = 85; -pub const _SC_AVPHYS_PAGES: _bindgen_ty_3 = 86; -pub const _SC_ATEXIT_MAX: _bindgen_ty_3 = 87; -pub const _SC_PASS_MAX: _bindgen_ty_3 = 88; -pub const _SC_XOPEN_VERSION: _bindgen_ty_3 = 89; -pub const _SC_XOPEN_XCU_VERSION: _bindgen_ty_3 = 90; -pub const _SC_XOPEN_UNIX: _bindgen_ty_3 = 91; -pub const _SC_XOPEN_CRYPT: _bindgen_ty_3 = 92; -pub const _SC_XOPEN_ENH_I18N: _bindgen_ty_3 = 93; -pub const _SC_XOPEN_SHM: _bindgen_ty_3 = 94; -pub const _SC_2_CHAR_TERM: _bindgen_ty_3 = 95; -pub const _SC_2_C_VERSION: _bindgen_ty_3 = 96; -pub const _SC_2_UPE: _bindgen_ty_3 = 97; -pub const _SC_XOPEN_XPG2: _bindgen_ty_3 = 98; -pub const _SC_XOPEN_XPG3: _bindgen_ty_3 = 99; -pub const _SC_XOPEN_XPG4: _bindgen_ty_3 = 100; -pub const _SC_CHAR_BIT: _bindgen_ty_3 = 101; -pub const _SC_CHAR_MAX: _bindgen_ty_3 = 102; -pub const _SC_CHAR_MIN: _bindgen_ty_3 = 103; -pub const _SC_INT_MAX: _bindgen_ty_3 = 104; -pub const _SC_INT_MIN: _bindgen_ty_3 = 105; -pub const _SC_LONG_BIT: _bindgen_ty_3 = 106; -pub const _SC_WORD_BIT: _bindgen_ty_3 = 107; -pub const _SC_MB_LEN_MAX: _bindgen_ty_3 = 108; -pub const _SC_NZERO: _bindgen_ty_3 = 109; -pub const _SC_SSIZE_MAX: _bindgen_ty_3 = 110; -pub const _SC_SCHAR_MAX: _bindgen_ty_3 = 111; -pub const _SC_SCHAR_MIN: _bindgen_ty_3 = 112; -pub const _SC_SHRT_MAX: _bindgen_ty_3 = 113; -pub const _SC_SHRT_MIN: _bindgen_ty_3 = 114; -pub const _SC_UCHAR_MAX: _bindgen_ty_3 = 115; -pub const _SC_UINT_MAX: _bindgen_ty_3 = 116; -pub const _SC_ULONG_MAX: _bindgen_ty_3 = 117; -pub const _SC_USHRT_MAX: _bindgen_ty_3 = 118; -pub const _SC_NL_ARGMAX: _bindgen_ty_3 = 119; -pub const _SC_NL_LANGMAX: _bindgen_ty_3 = 120; -pub const _SC_NL_MSGMAX: _bindgen_ty_3 = 121; -pub const _SC_NL_NMAX: _bindgen_ty_3 = 122; -pub const _SC_NL_SETMAX: _bindgen_ty_3 = 123; -pub const _SC_NL_TEXTMAX: _bindgen_ty_3 = 124; -pub const _SC_XBS5_ILP32_OFF32: _bindgen_ty_3 = 125; -pub const _SC_XBS5_ILP32_OFFBIG: _bindgen_ty_3 = 126; -pub const _SC_XBS5_LP64_OFF64: _bindgen_ty_3 = 127; -pub const _SC_XBS5_LPBIG_OFFBIG: _bindgen_ty_3 = 128; -pub const _SC_XOPEN_LEGACY: _bindgen_ty_3 = 129; -pub const _SC_XOPEN_REALTIME: _bindgen_ty_3 = 130; -pub const _SC_XOPEN_REALTIME_THREADS: _bindgen_ty_3 = 131; -pub const _SC_ADVISORY_INFO: _bindgen_ty_3 = 132; -pub const _SC_BARRIERS: _bindgen_ty_3 = 133; -pub const _SC_BASE: _bindgen_ty_3 = 134; -pub const _SC_C_LANG_SUPPORT: _bindgen_ty_3 = 135; -pub const _SC_C_LANG_SUPPORT_R: _bindgen_ty_3 = 136; -pub const _SC_CLOCK_SELECTION: _bindgen_ty_3 = 137; -pub const _SC_CPUTIME: _bindgen_ty_3 = 138; -pub const _SC_THREAD_CPUTIME: _bindgen_ty_3 = 139; -pub const _SC_DEVICE_IO: _bindgen_ty_3 = 140; -pub const _SC_DEVICE_SPECIFIC: _bindgen_ty_3 = 141; -pub const _SC_DEVICE_SPECIFIC_R: _bindgen_ty_3 = 142; -pub const _SC_FD_MGMT: _bindgen_ty_3 = 143; -pub const _SC_FIFO: _bindgen_ty_3 = 144; -pub const _SC_PIPE: _bindgen_ty_3 = 145; -pub const _SC_FILE_ATTRIBUTES: _bindgen_ty_3 = 146; -pub const _SC_FILE_LOCKING: _bindgen_ty_3 = 147; -pub const _SC_FILE_SYSTEM: _bindgen_ty_3 = 148; -pub const _SC_MONOTONIC_CLOCK: _bindgen_ty_3 = 149; -pub const _SC_MULTI_PROCESS: _bindgen_ty_3 = 150; -pub const _SC_SINGLE_PROCESS: _bindgen_ty_3 = 151; -pub const _SC_NETWORKING: _bindgen_ty_3 = 152; -pub const _SC_READER_WRITER_LOCKS: _bindgen_ty_3 = 153; -pub const _SC_SPIN_LOCKS: _bindgen_ty_3 = 154; -pub const _SC_REGEXP: _bindgen_ty_3 = 155; -pub const _SC_REGEX_VERSION: _bindgen_ty_3 = 156; -pub const _SC_SHELL: _bindgen_ty_3 = 157; -pub const _SC_SIGNALS: _bindgen_ty_3 = 158; -pub const _SC_SPAWN: _bindgen_ty_3 = 159; -pub const _SC_SPORADIC_SERVER: _bindgen_ty_3 = 160; -pub const _SC_THREAD_SPORADIC_SERVER: _bindgen_ty_3 = 161; -pub const _SC_SYSTEM_DATABASE: _bindgen_ty_3 = 162; -pub const _SC_SYSTEM_DATABASE_R: _bindgen_ty_3 = 163; -pub const _SC_TIMEOUTS: _bindgen_ty_3 = 164; -pub const _SC_TYPED_MEMORY_OBJECTS: _bindgen_ty_3 = 165; -pub const _SC_USER_GROUPS: _bindgen_ty_3 = 166; -pub const _SC_USER_GROUPS_R: _bindgen_ty_3 = 167; -pub const _SC_2_PBS: _bindgen_ty_3 = 168; -pub const _SC_2_PBS_ACCOUNTING: _bindgen_ty_3 = 169; -pub const _SC_2_PBS_LOCATE: _bindgen_ty_3 = 170; -pub const _SC_2_PBS_MESSAGE: _bindgen_ty_3 = 171; -pub const _SC_2_PBS_TRACK: _bindgen_ty_3 = 172; -pub const _SC_SYMLOOP_MAX: _bindgen_ty_3 = 173; -pub const _SC_STREAMS: _bindgen_ty_3 = 174; -pub const _SC_2_PBS_CHECKPOINT: _bindgen_ty_3 = 175; -pub const _SC_V6_ILP32_OFF32: _bindgen_ty_3 = 176; -pub const _SC_V6_ILP32_OFFBIG: _bindgen_ty_3 = 177; -pub const _SC_V6_LP64_OFF64: _bindgen_ty_3 = 178; -pub const _SC_V6_LPBIG_OFFBIG: _bindgen_ty_3 = 179; -pub const _SC_HOST_NAME_MAX: _bindgen_ty_3 = 180; -pub const _SC_TRACE: _bindgen_ty_3 = 181; -pub const _SC_TRACE_EVENT_FILTER: _bindgen_ty_3 = 182; -pub const _SC_TRACE_INHERIT: _bindgen_ty_3 = 183; -pub const _SC_TRACE_LOG: _bindgen_ty_3 = 184; -pub const _SC_LEVEL1_ICACHE_SIZE: _bindgen_ty_3 = 185; -pub const _SC_LEVEL1_ICACHE_ASSOC: _bindgen_ty_3 = 186; -pub const _SC_LEVEL1_ICACHE_LINESIZE: _bindgen_ty_3 = 187; -pub const _SC_LEVEL1_DCACHE_SIZE: _bindgen_ty_3 = 188; -pub const _SC_LEVEL1_DCACHE_ASSOC: _bindgen_ty_3 = 189; -pub const _SC_LEVEL1_DCACHE_LINESIZE: _bindgen_ty_3 = 190; -pub const _SC_LEVEL2_CACHE_SIZE: _bindgen_ty_3 = 191; -pub const _SC_LEVEL2_CACHE_ASSOC: _bindgen_ty_3 = 192; -pub const _SC_LEVEL2_CACHE_LINESIZE: _bindgen_ty_3 = 193; -pub const _SC_LEVEL3_CACHE_SIZE: _bindgen_ty_3 = 194; -pub const _SC_LEVEL3_CACHE_ASSOC: _bindgen_ty_3 = 195; -pub const _SC_LEVEL3_CACHE_LINESIZE: _bindgen_ty_3 = 196; -pub const _SC_LEVEL4_CACHE_SIZE: _bindgen_ty_3 = 197; -pub const _SC_LEVEL4_CACHE_ASSOC: _bindgen_ty_3 = 198; -pub const _SC_LEVEL4_CACHE_LINESIZE: _bindgen_ty_3 = 199; -pub const _SC_IPV6: _bindgen_ty_3 = 235; -pub const _SC_RAW_SOCKETS: _bindgen_ty_3 = 236; -pub const _SC_V7_ILP32_OFF32: _bindgen_ty_3 = 237; -pub const _SC_V7_ILP32_OFFBIG: _bindgen_ty_3 = 238; -pub const _SC_V7_LP64_OFF64: _bindgen_ty_3 = 239; -pub const _SC_V7_LPBIG_OFFBIG: _bindgen_ty_3 = 240; -pub const _SC_SS_REPL_MAX: _bindgen_ty_3 = 241; -pub const _SC_TRACE_EVENT_NAME_MAX: _bindgen_ty_3 = 242; -pub const _SC_TRACE_NAME_MAX: _bindgen_ty_3 = 243; -pub const _SC_TRACE_SYS_MAX: _bindgen_ty_3 = 244; -pub const _SC_TRACE_USER_EVENT_MAX: _bindgen_ty_3 = 245; -pub const _SC_XOPEN_STREAMS: _bindgen_ty_3 = 246; -pub const _SC_THREAD_ROBUST_PRIO_INHERIT: _bindgen_ty_3 = 247; -pub const _SC_THREAD_ROBUST_PRIO_PROTECT: _bindgen_ty_3 = 248; -pub type _bindgen_ty_3 = u32; -pub const _CS_PATH: _bindgen_ty_4 = 0; -pub const _CS_V6_WIDTH_RESTRICTED_ENVS: _bindgen_ty_4 = 1; -pub const _CS_GNU_LIBC_VERSION: _bindgen_ty_4 = 2; -pub const _CS_GNU_LIBPTHREAD_VERSION: _bindgen_ty_4 = 3; -pub const _CS_V5_WIDTH_RESTRICTED_ENVS: _bindgen_ty_4 = 4; -pub const _CS_V7_WIDTH_RESTRICTED_ENVS: _bindgen_ty_4 = 5; -pub const _CS_LFS_CFLAGS: _bindgen_ty_4 = 1000; -pub const _CS_LFS_LDFLAGS: _bindgen_ty_4 = 1001; -pub const _CS_LFS_LIBS: _bindgen_ty_4 = 1002; -pub const _CS_LFS_LINTFLAGS: _bindgen_ty_4 = 1003; -pub const _CS_LFS64_CFLAGS: _bindgen_ty_4 = 1004; -pub const _CS_LFS64_LDFLAGS: _bindgen_ty_4 = 1005; -pub const _CS_LFS64_LIBS: _bindgen_ty_4 = 1006; -pub const _CS_LFS64_LINTFLAGS: _bindgen_ty_4 = 1007; -pub const _CS_XBS5_ILP32_OFF32_CFLAGS: _bindgen_ty_4 = 1100; -pub const _CS_XBS5_ILP32_OFF32_LDFLAGS: _bindgen_ty_4 = 1101; -pub const _CS_XBS5_ILP32_OFF32_LIBS: _bindgen_ty_4 = 1102; -pub const _CS_XBS5_ILP32_OFF32_LINTFLAGS: _bindgen_ty_4 = 1103; -pub const _CS_XBS5_ILP32_OFFBIG_CFLAGS: _bindgen_ty_4 = 1104; -pub const _CS_XBS5_ILP32_OFFBIG_LDFLAGS: _bindgen_ty_4 = 1105; -pub const _CS_XBS5_ILP32_OFFBIG_LIBS: _bindgen_ty_4 = 1106; -pub const _CS_XBS5_ILP32_OFFBIG_LINTFLAGS: _bindgen_ty_4 = 1107; -pub const _CS_XBS5_LP64_OFF64_CFLAGS: _bindgen_ty_4 = 1108; -pub const _CS_XBS5_LP64_OFF64_LDFLAGS: _bindgen_ty_4 = 1109; -pub const _CS_XBS5_LP64_OFF64_LIBS: _bindgen_ty_4 = 1110; -pub const _CS_XBS5_LP64_OFF64_LINTFLAGS: _bindgen_ty_4 = 1111; -pub const _CS_XBS5_LPBIG_OFFBIG_CFLAGS: _bindgen_ty_4 = 1112; -pub const _CS_XBS5_LPBIG_OFFBIG_LDFLAGS: _bindgen_ty_4 = 1113; -pub const _CS_XBS5_LPBIG_OFFBIG_LIBS: _bindgen_ty_4 = 1114; -pub const _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS: _bindgen_ty_4 = 1115; -pub const _CS_POSIX_V6_ILP32_OFF32_CFLAGS: _bindgen_ty_4 = 1116; -pub const _CS_POSIX_V6_ILP32_OFF32_LDFLAGS: _bindgen_ty_4 = 1117; -pub const _CS_POSIX_V6_ILP32_OFF32_LIBS: _bindgen_ty_4 = 1118; -pub const _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS: _bindgen_ty_4 = 1119; -pub const _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS: _bindgen_ty_4 = 1120; -pub const _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS: _bindgen_ty_4 = 1121; -pub const _CS_POSIX_V6_ILP32_OFFBIG_LIBS: _bindgen_ty_4 = 1122; -pub const _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS: _bindgen_ty_4 = 1123; -pub const _CS_POSIX_V6_LP64_OFF64_CFLAGS: _bindgen_ty_4 = 1124; -pub const _CS_POSIX_V6_LP64_OFF64_LDFLAGS: _bindgen_ty_4 = 1125; -pub const _CS_POSIX_V6_LP64_OFF64_LIBS: _bindgen_ty_4 = 1126; -pub const _CS_POSIX_V6_LP64_OFF64_LINTFLAGS: _bindgen_ty_4 = 1127; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS: _bindgen_ty_4 = 1128; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS: _bindgen_ty_4 = 1129; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_LIBS: _bindgen_ty_4 = 1130; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS: _bindgen_ty_4 = 1131; -pub const _CS_POSIX_V7_ILP32_OFF32_CFLAGS: _bindgen_ty_4 = 1132; -pub const _CS_POSIX_V7_ILP32_OFF32_LDFLAGS: _bindgen_ty_4 = 1133; -pub const _CS_POSIX_V7_ILP32_OFF32_LIBS: _bindgen_ty_4 = 1134; -pub const _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS: _bindgen_ty_4 = 1135; -pub const _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS: _bindgen_ty_4 = 1136; -pub const _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS: _bindgen_ty_4 = 1137; -pub const _CS_POSIX_V7_ILP32_OFFBIG_LIBS: _bindgen_ty_4 = 1138; -pub const _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS: _bindgen_ty_4 = 1139; -pub const _CS_POSIX_V7_LP64_OFF64_CFLAGS: _bindgen_ty_4 = 1140; -pub const _CS_POSIX_V7_LP64_OFF64_LDFLAGS: _bindgen_ty_4 = 1141; -pub const _CS_POSIX_V7_LP64_OFF64_LIBS: _bindgen_ty_4 = 1142; -pub const _CS_POSIX_V7_LP64_OFF64_LINTFLAGS: _bindgen_ty_4 = 1143; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS: _bindgen_ty_4 = 1144; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS: _bindgen_ty_4 = 1145; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_LIBS: _bindgen_ty_4 = 1146; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS: _bindgen_ty_4 = 1147; -pub const _CS_V6_ENV: _bindgen_ty_4 = 1148; -pub const _CS_V7_ENV: _bindgen_ty_4 = 1149; -pub type _bindgen_ty_4 = u32; -extern "C" { - pub fn pathconf( - __path: *const ::std::os::raw::c_char, - __name: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn fpathconf( - __fd: ::std::os::raw::c_int, - __name: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn sysconf(__name: ::std::os::raw::c_int) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn confstr( - __name: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: usize, - ) -> usize; -} -extern "C" { - pub fn getpid() -> __pid_t; -} -extern "C" { - pub fn getppid() -> __pid_t; -} -extern "C" { - pub fn getpgrp() -> __pid_t; -} -extern "C" { - pub fn __getpgid(__pid: __pid_t) -> __pid_t; -} -extern "C" { - pub fn getpgid(__pid: __pid_t) -> __pid_t; -} -extern "C" { - pub fn setpgid(__pid: __pid_t, __pgid: __pid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setpgrp() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setsid() -> __pid_t; -} -extern "C" { - pub fn getsid(__pid: __pid_t) -> __pid_t; -} -extern "C" { - pub fn getuid() -> __uid_t; -} -extern "C" { - pub fn geteuid() -> __uid_t; -} -extern "C" { - pub fn getgid() -> __gid_t; -} -extern "C" { - pub fn getegid() -> __gid_t; -} -extern "C" { - pub fn getgroups(__size: ::std::os::raw::c_int, __list: *mut __gid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn group_member(__gid: __gid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setuid(__uid: __uid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setreuid(__ruid: __uid_t, __euid: __uid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn seteuid(__uid: __uid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setgid(__gid: __gid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setregid(__rgid: __gid_t, __egid: __gid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setegid(__gid: __gid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getresuid( - __ruid: *mut __uid_t, - __euid: *mut __uid_t, - __suid: *mut __uid_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getresgid( - __rgid: *mut __gid_t, - __egid: *mut __gid_t, - __sgid: *mut __gid_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setresuid(__ruid: __uid_t, __euid: __uid_t, __suid: __uid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setresgid(__rgid: __gid_t, __egid: __gid_t, __sgid: __gid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fork() -> __pid_t; -} -extern "C" { - pub fn vfork() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttyname(__fd: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ttyname_r( - __fd: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __buflen: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isatty(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttyslot() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn link( - __from: *const ::std::os::raw::c_char, - __to: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn linkat( - __fromfd: ::std::os::raw::c_int, - __from: *const ::std::os::raw::c_char, - __tofd: ::std::os::raw::c_int, - __to: *const ::std::os::raw::c_char, - __flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn symlink( - __from: *const ::std::os::raw::c_char, - __to: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn readlink( - __path: *const ::std::os::raw::c_char, - __buf: *mut ::std::os::raw::c_char, - __len: usize, - ) -> isize; -} -extern "C" { - pub fn symlinkat( - __from: *const ::std::os::raw::c_char, - __tofd: ::std::os::raw::c_int, - __to: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn readlinkat( - __fd: ::std::os::raw::c_int, - __path: *const ::std::os::raw::c_char, - __buf: *mut ::std::os::raw::c_char, - __len: usize, - ) -> isize; -} -extern "C" { - pub fn unlink(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unlinkat( - __fd: ::std::os::raw::c_int, - __name: *const ::std::os::raw::c_char, - __flag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rmdir(__path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tcgetpgrp(__fd: ::std::os::raw::c_int) -> __pid_t; -} -extern "C" { - pub fn tcsetpgrp(__fd: ::std::os::raw::c_int, __pgrp_id: __pid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getlogin() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn getlogin_r( - __name: *mut ::std::os::raw::c_char, - __name_len: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setlogin(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}optarg"] - pub static mut optarg: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}optind"] - pub static mut optind: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}opterr"] - pub static mut opterr: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}optopt"] - pub static mut optopt: ::std::os::raw::c_int; -} -extern "C" { - pub fn getopt( - ___argc: ::std::os::raw::c_int, - ___argv: *const *mut ::std::os::raw::c_char, - __shortopts: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gethostname(__name: *mut ::std::os::raw::c_char, __len: usize) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sethostname( - __name: *const ::std::os::raw::c_char, - __len: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sethostid(__id: ::std::os::raw::c_long) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getdomainname( - __name: *mut ::std::os::raw::c_char, - __len: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setdomainname( - __name: *const ::std::os::raw::c_char, - __len: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vhangup() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn revoke(__file: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn profil( - __sample_buffer: *mut ::std::os::raw::c_ushort, - __size: usize, - __offset: usize, - __scale: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn acct(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getusershell() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn endusershell(); -} -extern "C" { - pub fn setusershell(); -} -extern "C" { - pub fn daemon( - __nochdir: ::std::os::raw::c_int, - __noclose: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn chroot(__path: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getpass(__prompt: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fsync(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn syncfs(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gethostid() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn sync(); -} -extern "C" { - pub fn getpagesize() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getdtablesize() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn truncate( - __file: *const ::std::os::raw::c_char, - __length: __off_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn truncate64( - __file: *const ::std::os::raw::c_char, - __length: __off64_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftruncate(__fd: ::std::os::raw::c_int, __length: __off_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftruncate64(__fd: ::std::os::raw::c_int, __length: __off64_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn brk(__addr: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sbrk(__delta: isize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn syscall(__sysno: ::std::os::raw::c_long, ...) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn lockf( - __fd: ::std::os::raw::c_int, - __cmd: ::std::os::raw::c_int, - __len: __off_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lockf64( - __fd: ::std::os::raw::c_int, - __cmd: ::std::os::raw::c_int, - __len: __off64_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn copy_file_range( - __infd: ::std::os::raw::c_int, - __pinoff: *mut __off64_t, - __outfd: ::std::os::raw::c_int, - __poutoff: *mut __off64_t, - __length: usize, - __flags: ::std::os::raw::c_uint, - ) -> isize; -} -extern "C" { - pub fn fdatasync(__fildes: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn crypt( - __key: *const ::std::os::raw::c_char, - __salt: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn swab( - __from: *const ::std::os::raw::c_void, - __to: *mut ::std::os::raw::c_void, - __n: isize, - ); -} -extern "C" { - pub fn getentropy( - __buffer: *mut ::std::os::raw::c_void, - __length: usize, - ) -> ::std::os::raw::c_int; -} -pub type sig_atomic_t = __sig_atomic_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __sigset_t { - pub __val: [::std::os::raw::c_ulong; 16usize], -} -pub type sigset_t = __sigset_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timespec { - pub tv_sec: __time_t, - pub tv_nsec: __syscall_slong_t, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union sigval { - pub sival_int: ::std::os::raw::c_int, - pub sival_ptr: *mut ::std::os::raw::c_void, - _bindgen_union_align: u64, -} -pub type __sigval_t = sigval; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct siginfo_t { - pub si_signo: ::std::os::raw::c_int, - pub si_errno: ::std::os::raw::c_int, - pub si_code: ::std::os::raw::c_int, - pub __pad0: ::std::os::raw::c_int, - pub _sifields: siginfo_t__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union siginfo_t__bindgen_ty_1 { - pub _pad: [::std::os::raw::c_int; 28usize], - pub _kill: siginfo_t__bindgen_ty_1__bindgen_ty_1, - pub _timer: siginfo_t__bindgen_ty_1__bindgen_ty_2, - pub _rt: siginfo_t__bindgen_ty_1__bindgen_ty_3, - pub _sigchld: siginfo_t__bindgen_ty_1__bindgen_ty_4, - pub _sigfault: siginfo_t__bindgen_ty_1__bindgen_ty_5, - pub _sigpoll: siginfo_t__bindgen_ty_1__bindgen_ty_6, - pub _sigsys: siginfo_t__bindgen_ty_1__bindgen_ty_7, - _bindgen_union_align: [u64; 14usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct siginfo_t__bindgen_ty_1__bindgen_ty_1 { - pub si_pid: __pid_t, - pub si_uid: __uid_t, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct siginfo_t__bindgen_ty_1__bindgen_ty_2 { - pub si_tid: ::std::os::raw::c_int, - pub si_overrun: ::std::os::raw::c_int, - pub si_sigval: __sigval_t, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct siginfo_t__bindgen_ty_1__bindgen_ty_3 { - pub si_pid: __pid_t, - pub si_uid: __uid_t, - pub si_sigval: __sigval_t, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct siginfo_t__bindgen_ty_1__bindgen_ty_4 { - pub si_pid: __pid_t, - pub si_uid: __uid_t, - pub si_status: ::std::os::raw::c_int, - pub si_utime: __clock_t, - pub si_stime: __clock_t, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct siginfo_t__bindgen_ty_1__bindgen_ty_5 { - pub si_addr: *mut ::std::os::raw::c_void, - pub si_addr_lsb: ::std::os::raw::c_short, - pub _bounds: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1 { - pub _addr_bnd: siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1, - pub _pkey: __uint32_t, - _bindgen_union_align: [u64; 2usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct siginfo_t__bindgen_ty_1__bindgen_ty_5__bindgen_ty_1__bindgen_ty_1 { - pub _lower: *mut ::std::os::raw::c_void, - pub _upper: *mut ::std::os::raw::c_void, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct siginfo_t__bindgen_ty_1__bindgen_ty_6 { - pub si_band: ::std::os::raw::c_long, - pub si_fd: ::std::os::raw::c_int, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct siginfo_t__bindgen_ty_1__bindgen_ty_7 { - pub _call_addr: *mut ::std::os::raw::c_void, - pub _syscall: ::std::os::raw::c_int, - pub _arch: ::std::os::raw::c_uint, -} -pub const SI_ASYNCNL: _bindgen_ty_5 = -60; -pub const SI_TKILL: _bindgen_ty_5 = -6; -pub const SI_SIGIO: _bindgen_ty_5 = -5; -pub const SI_ASYNCIO: _bindgen_ty_5 = -4; -pub const SI_MESGQ: _bindgen_ty_5 = -3; -pub const SI_TIMER: _bindgen_ty_5 = -2; -pub const SI_QUEUE: _bindgen_ty_5 = -1; -pub const SI_USER: _bindgen_ty_5 = 0; -pub const SI_KERNEL: _bindgen_ty_5 = 128; -pub type _bindgen_ty_5 = i32; -pub const ILL_ILLOPC: _bindgen_ty_6 = 1; -pub const ILL_ILLOPN: _bindgen_ty_6 = 2; -pub const ILL_ILLADR: _bindgen_ty_6 = 3; -pub const ILL_ILLTRP: _bindgen_ty_6 = 4; -pub const ILL_PRVOPC: _bindgen_ty_6 = 5; -pub const ILL_PRVREG: _bindgen_ty_6 = 6; -pub const ILL_COPROC: _bindgen_ty_6 = 7; -pub const ILL_BADSTK: _bindgen_ty_6 = 8; -pub type _bindgen_ty_6 = u32; -pub const FPE_INTDIV: _bindgen_ty_7 = 1; -pub const FPE_INTOVF: _bindgen_ty_7 = 2; -pub const FPE_FLTDIV: _bindgen_ty_7 = 3; -pub const FPE_FLTOVF: _bindgen_ty_7 = 4; -pub const FPE_FLTUND: _bindgen_ty_7 = 5; -pub const FPE_FLTRES: _bindgen_ty_7 = 6; -pub const FPE_FLTINV: _bindgen_ty_7 = 7; -pub const FPE_FLTSUB: _bindgen_ty_7 = 8; -pub type _bindgen_ty_7 = u32; -pub const SEGV_MAPERR: _bindgen_ty_8 = 1; -pub const SEGV_ACCERR: _bindgen_ty_8 = 2; -pub const SEGV_BNDERR: _bindgen_ty_8 = 3; -pub const SEGV_PKUERR: _bindgen_ty_8 = 4; -pub type _bindgen_ty_8 = u32; -pub const BUS_ADRALN: _bindgen_ty_9 = 1; -pub const BUS_ADRERR: _bindgen_ty_9 = 2; -pub const BUS_OBJERR: _bindgen_ty_9 = 3; -pub const BUS_MCEERR_AR: _bindgen_ty_9 = 4; -pub const BUS_MCEERR_AO: _bindgen_ty_9 = 5; -pub type _bindgen_ty_9 = u32; -pub const TRAP_BRKPT: _bindgen_ty_10 = 1; -pub const TRAP_TRACE: _bindgen_ty_10 = 2; -pub type _bindgen_ty_10 = u32; -pub const CLD_EXITED: _bindgen_ty_11 = 1; -pub const CLD_KILLED: _bindgen_ty_11 = 2; -pub const CLD_DUMPED: _bindgen_ty_11 = 3; -pub const CLD_TRAPPED: _bindgen_ty_11 = 4; -pub const CLD_STOPPED: _bindgen_ty_11 = 5; -pub const CLD_CONTINUED: _bindgen_ty_11 = 6; -pub type _bindgen_ty_11 = u32; -pub const POLL_IN: _bindgen_ty_12 = 1; -pub const POLL_OUT: _bindgen_ty_12 = 2; -pub const POLL_MSG: _bindgen_ty_12 = 3; -pub const POLL_ERR: _bindgen_ty_12 = 4; -pub const POLL_PRI: _bindgen_ty_12 = 5; -pub const POLL_HUP: _bindgen_ty_12 = 6; -pub type _bindgen_ty_12 = u32; -pub type sigval_t = __sigval_t; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct sigevent { - pub sigev_value: __sigval_t, - pub sigev_signo: ::std::os::raw::c_int, - pub sigev_notify: ::std::os::raw::c_int, - pub _sigev_un: sigevent__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union sigevent__bindgen_ty_1 { - pub _pad: [::std::os::raw::c_int; 12usize], - pub _tid: __pid_t, - pub _sigev_thread: sigevent__bindgen_ty_1__bindgen_ty_1, - _bindgen_union_align: [u64; 6usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sigevent__bindgen_ty_1__bindgen_ty_1 { - pub _function: ::core::option::Option, - pub _attribute: *mut pthread_attr_t, -} -pub type sigevent_t = sigevent; -pub const SIGEV_SIGNAL: _bindgen_ty_13 = 0; -pub const SIGEV_NONE: _bindgen_ty_13 = 1; -pub const SIGEV_THREAD: _bindgen_ty_13 = 2; -pub const SIGEV_THREAD_ID: _bindgen_ty_13 = 4; -pub type _bindgen_ty_13 = u32; -pub type __sighandler_t = ::core::option::Option; -extern "C" { - pub fn __sysv_signal(__sig: ::std::os::raw::c_int, __handler: __sighandler_t) - -> __sighandler_t; -} -extern "C" { - pub fn sysv_signal(__sig: ::std::os::raw::c_int, __handler: __sighandler_t) -> __sighandler_t; -} -extern "C" { - pub fn signal(__sig: ::std::os::raw::c_int, __handler: __sighandler_t) -> __sighandler_t; -} -extern "C" { - pub fn kill(__pid: __pid_t, __sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn killpg(__pgrp: __pid_t, __sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn raise(__sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ssignal(__sig: ::std::os::raw::c_int, __handler: __sighandler_t) -> __sighandler_t; -} -extern "C" { - pub fn gsignal(__sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn psignal(__sig: ::std::os::raw::c_int, __s: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn psiginfo(__pinfo: *const siginfo_t, __s: *const ::std::os::raw::c_char); -} -extern "C" { - #[link_name = "\u{1}__xpg_sigpause"] - pub fn sigpause(__sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigblock(__mask: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigsetmask(__mask: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn siggetmask() -> ::std::os::raw::c_int; -} -pub type sighandler_t = __sighandler_t; -pub type sig_t = __sighandler_t; -extern "C" { - pub fn sigemptyset(__set: *mut sigset_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigfillset(__set: *mut sigset_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigaddset(__set: *mut sigset_t, __signo: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigdelset(__set: *mut sigset_t, __signo: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigismember( - __set: *const sigset_t, - __signo: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigisemptyset(__set: *const sigset_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigandset( - __set: *mut sigset_t, - __left: *const sigset_t, - __right: *const sigset_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigorset( - __set: *mut sigset_t, - __left: *const sigset_t, - __right: *const sigset_t, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct sigaction { - pub __sigaction_handler: sigaction__bindgen_ty_1, - pub sa_mask: __sigset_t, - pub sa_flags: ::std::os::raw::c_int, - pub sa_restorer: ::core::option::Option, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union sigaction__bindgen_ty_1 { - pub sa_handler: __sighandler_t, - pub sa_sigaction: ::core::option::Option< - unsafe extern "C" fn( - arg1: ::std::os::raw::c_int, - arg2: *mut siginfo_t, - arg3: *mut ::std::os::raw::c_void, - ), - >, - _bindgen_union_align: u64, -} -extern "C" { - pub fn sigprocmask( - __how: ::std::os::raw::c_int, - __set: *const sigset_t, - __oset: *mut sigset_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigsuspend(__set: *const sigset_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigaction( - __sig: ::std::os::raw::c_int, - __act: *const sigaction, - __oact: *mut sigaction, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigpending(__set: *mut sigset_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigwait( - __set: *const sigset_t, - __sig: *mut ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigwaitinfo(__set: *const sigset_t, __info: *mut siginfo_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigtimedwait( - __set: *const sigset_t, - __info: *mut siginfo_t, - __timeout: *const timespec, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigqueue( - __pid: __pid_t, - __sig: ::std::os::raw::c_int, - __val: sigval, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}_sys_siglist"] - pub static mut _sys_siglist: [*const ::std::os::raw::c_char; 65usize]; -} -extern "C" { - #[link_name = "\u{1}sys_siglist"] - pub static mut sys_siglist: [*const ::std::os::raw::c_char; 65usize]; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _fpx_sw_bytes { - pub magic1: __uint32_t, - pub extended_size: __uint32_t, - pub xstate_bv: __uint64_t, - pub xstate_size: __uint32_t, - pub __glibc_reserved1: [__uint32_t; 7usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _fpreg { - pub significand: [::std::os::raw::c_ushort; 4usize], - pub exponent: ::std::os::raw::c_ushort, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _fpxreg { - pub significand: [::std::os::raw::c_ushort; 4usize], - pub exponent: ::std::os::raw::c_ushort, - pub __glibc_reserved1: [::std::os::raw::c_ushort; 3usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _xmmreg { - pub element: [__uint32_t; 4usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _fpstate { - pub cwd: __uint16_t, - pub swd: __uint16_t, - pub ftw: __uint16_t, - pub fop: __uint16_t, - pub rip: __uint64_t, - pub rdp: __uint64_t, - pub mxcsr: __uint32_t, - pub mxcr_mask: __uint32_t, - pub _st: [_fpxreg; 8usize], - pub _xmm: [_xmmreg; 16usize], - pub __glibc_reserved1: [__uint32_t; 24usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct sigcontext { - pub r8: __uint64_t, - pub r9: __uint64_t, - pub r10: __uint64_t, - pub r11: __uint64_t, - pub r12: __uint64_t, - pub r13: __uint64_t, - pub r14: __uint64_t, - pub r15: __uint64_t, - pub rdi: __uint64_t, - pub rsi: __uint64_t, - pub rbp: __uint64_t, - pub rbx: __uint64_t, - pub rdx: __uint64_t, - pub rax: __uint64_t, - pub rcx: __uint64_t, - pub rsp: __uint64_t, - pub rip: __uint64_t, - pub eflags: __uint64_t, - pub cs: ::std::os::raw::c_ushort, - pub gs: ::std::os::raw::c_ushort, - pub fs: ::std::os::raw::c_ushort, - pub __pad0: ::std::os::raw::c_ushort, - pub err: __uint64_t, - pub trapno: __uint64_t, - pub oldmask: __uint64_t, - pub cr2: __uint64_t, - pub __bindgen_anon_1: sigcontext__bindgen_ty_1, - pub __reserved1: [__uint64_t; 8usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union sigcontext__bindgen_ty_1 { - pub fpstate: *mut _fpstate, - pub __fpstate_word: __uint64_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _xsave_hdr { - pub xstate_bv: __uint64_t, - pub __glibc_reserved1: [__uint64_t; 2usize], - pub __glibc_reserved2: [__uint64_t; 5usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _ymmh_state { - pub ymmh_space: [__uint32_t; 64usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _xstate { - pub fpstate: _fpstate, - pub xstate_hdr: _xsave_hdr, - pub ymmh: _ymmh_state, -} -extern "C" { - pub fn sigreturn(__scp: *mut sigcontext) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stack_t { - pub ss_sp: *mut ::std::os::raw::c_void, - pub ss_flags: ::std::os::raw::c_int, - pub ss_size: usize, -} -pub type greg_t = ::std::os::raw::c_longlong; -pub type gregset_t = [greg_t; 23usize]; -pub const REG_R8: _bindgen_ty_14 = 0; -pub const REG_R9: _bindgen_ty_14 = 1; -pub const REG_R10: _bindgen_ty_14 = 2; -pub const REG_R11: _bindgen_ty_14 = 3; -pub const REG_R12: _bindgen_ty_14 = 4; -pub const REG_R13: _bindgen_ty_14 = 5; -pub const REG_R14: _bindgen_ty_14 = 6; -pub const REG_R15: _bindgen_ty_14 = 7; -pub const REG_RDI: _bindgen_ty_14 = 8; -pub const REG_RSI: _bindgen_ty_14 = 9; -pub const REG_RBP: _bindgen_ty_14 = 10; -pub const REG_RBX: _bindgen_ty_14 = 11; -pub const REG_RDX: _bindgen_ty_14 = 12; -pub const REG_RAX: _bindgen_ty_14 = 13; -pub const REG_RCX: _bindgen_ty_14 = 14; -pub const REG_RSP: _bindgen_ty_14 = 15; -pub const REG_RIP: _bindgen_ty_14 = 16; -pub const REG_EFL: _bindgen_ty_14 = 17; -pub const REG_CSGSFS: _bindgen_ty_14 = 18; -pub const REG_ERR: _bindgen_ty_14 = 19; -pub const REG_TRAPNO: _bindgen_ty_14 = 20; -pub const REG_OLDMASK: _bindgen_ty_14 = 21; -pub const REG_CR2: _bindgen_ty_14 = 22; -pub type _bindgen_ty_14 = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _libc_fpxreg { - pub significand: [::std::os::raw::c_ushort; 4usize], - pub exponent: ::std::os::raw::c_ushort, - pub __glibc_reserved1: [::std::os::raw::c_ushort; 3usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _libc_xmmreg { - pub element: [__uint32_t; 4usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _libc_fpstate { - pub cwd: __uint16_t, - pub swd: __uint16_t, - pub ftw: __uint16_t, - pub fop: __uint16_t, - pub rip: __uint64_t, - pub rdp: __uint64_t, - pub mxcsr: __uint32_t, - pub mxcr_mask: __uint32_t, - pub _st: [_libc_fpxreg; 8usize], - pub _xmm: [_libc_xmmreg; 16usize], - pub __glibc_reserved1: [__uint32_t; 24usize], -} -pub type fpregset_t = *mut _libc_fpstate; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct mcontext_t { - pub gregs: gregset_t, - pub fpregs: fpregset_t, - pub __reserved1: [::std::os::raw::c_ulonglong; 8usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ucontext_t { - pub uc_flags: ::std::os::raw::c_ulong, - pub uc_link: *mut ucontext_t, - pub uc_stack: stack_t, - pub uc_mcontext: mcontext_t, - pub uc_sigmask: sigset_t, - pub __fpregs_mem: _libc_fpstate, - pub __ssp: [::std::os::raw::c_ulonglong; 4usize], -} -extern "C" { - pub fn siginterrupt( - __sig: ::std::os::raw::c_int, - __interrupt: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -pub const SS_ONSTACK: _bindgen_ty_15 = 1; -pub const SS_DISABLE: _bindgen_ty_15 = 2; -pub type _bindgen_ty_15 = u32; -extern "C" { - pub fn sigaltstack(__ss: *const stack_t, __oss: *mut stack_t) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sigstack { - pub ss_sp: *mut ::std::os::raw::c_void, - pub ss_onstack: ::std::os::raw::c_int, -} -extern "C" { - pub fn sigstack(__ss: *mut sigstack, __oss: *mut sigstack) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sighold(__sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigrelse(__sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigignore(__sig: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sigset(__sig: ::std::os::raw::c_int, __disp: __sighandler_t) -> __sighandler_t; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_rwlock_arch_t { - pub __readers: ::std::os::raw::c_uint, - pub __writers: ::std::os::raw::c_uint, - pub __wrphase_futex: ::std::os::raw::c_uint, - pub __writers_futex: ::std::os::raw::c_uint, - pub __pad3: ::std::os::raw::c_uint, - pub __pad4: ::std::os::raw::c_uint, - pub __cur_writer: ::std::os::raw::c_int, - pub __shared: ::std::os::raw::c_int, - pub __rwelision: ::std::os::raw::c_schar, - pub __pad1: [::std::os::raw::c_uchar; 7usize], - pub __pad2: ::std::os::raw::c_ulong, - pub __flags: ::std::os::raw::c_uint, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_internal_list { - pub __prev: *mut __pthread_internal_list, - pub __next: *mut __pthread_internal_list, -} -pub type __pthread_list_t = __pthread_internal_list; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_mutex_s { - pub __lock: ::std::os::raw::c_int, - pub __count: ::std::os::raw::c_uint, - pub __owner: ::std::os::raw::c_int, - pub __nusers: ::std::os::raw::c_uint, - pub __kind: ::std::os::raw::c_int, - pub __spins: ::std::os::raw::c_short, - pub __elision: ::std::os::raw::c_short, - pub __list: __pthread_list_t, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct __pthread_cond_s { - pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1, - pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2, - pub __g_refs: [::std::os::raw::c_uint; 2usize], - pub __g_size: [::std::os::raw::c_uint; 2usize], - pub __g1_orig_size: ::std::os::raw::c_uint, - pub __wrefs: ::std::os::raw::c_uint, - pub __g_signals: [::std::os::raw::c_uint; 2usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union __pthread_cond_s__bindgen_ty_1 { - pub __wseq: ::std::os::raw::c_ulonglong, - pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 { - pub __low: ::std::os::raw::c_uint, - pub __high: ::std::os::raw::c_uint, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union __pthread_cond_s__bindgen_ty_2 { - pub __g1_start: ::std::os::raw::c_ulonglong, - pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 { - pub __low: ::std::os::raw::c_uint, - pub __high: ::std::os::raw::c_uint, -} -pub type pthread_t = ::std::os::raw::c_ulong; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutexattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_condattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -pub type pthread_key_t = ::std::os::raw::c_uint; -pub type pthread_once_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_attr_t { - pub __size: [::std::os::raw::c_char; 56usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 7usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_mutex_t { - pub __data: __pthread_mutex_s, - pub __size: [::std::os::raw::c_char; 40usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 5usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_cond_t { - pub __data: __pthread_cond_s, - pub __size: [::std::os::raw::c_char; 48usize], - pub __align: ::std::os::raw::c_longlong, - _bindgen_union_align: [u64; 6usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_rwlock_t { - pub __data: __pthread_rwlock_arch_t, - pub __size: [::std::os::raw::c_char; 56usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 7usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_rwlockattr_t { - pub __size: [::std::os::raw::c_char; 8usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: u64, -} -pub type pthread_spinlock_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_barrier_t { - pub __size: [::std::os::raw::c_char; 32usize], - pub __align: ::std::os::raw::c_long, - _bindgen_union_align: [u64; 4usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union pthread_barrierattr_t { - pub __size: [::std::os::raw::c_char; 4usize], - pub __align: ::std::os::raw::c_int, - _bindgen_union_align: u32, -} -extern "C" { - pub fn pthread_sigmask( - __how: ::std::os::raw::c_int, - __newmask: *const __sigset_t, - __oldmask: *mut __sigset_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pthread_kill( - __threadid: pthread_t, - __signo: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pthread_sigqueue( - __threadid: pthread_t, - __signo: ::std::os::raw::c_int, - __value: sigval, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __libc_current_sigrtmin() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __libc_current_sigrtmax() -> ::std::os::raw::c_int; -} -pub type int_least8_t = __int_least8_t; -pub type int_least16_t = __int_least16_t; -pub type int_least32_t = __int_least32_t; -pub type int_least64_t = __int_least64_t; -pub type uint_least8_t = __uint_least8_t; -pub type uint_least16_t = __uint_least16_t; -pub type uint_least32_t = __uint_least32_t; -pub type uint_least64_t = __uint_least64_t; -pub type int_fast8_t = ::std::os::raw::c_schar; -pub type int_fast16_t = ::std::os::raw::c_long; -pub type int_fast32_t = ::std::os::raw::c_long; -pub type int_fast64_t = ::std::os::raw::c_long; -pub type uint_fast8_t = ::std::os::raw::c_uchar; -pub type uint_fast16_t = ::std::os::raw::c_ulong; -pub type uint_fast32_t = ::std::os::raw::c_ulong; -pub type uint_fast64_t = ::std::os::raw::c_ulong; -pub type intmax_t = __intmax_t; -pub type uintmax_t = __uintmax_t; -pub const r_instruction_r_output_direction: r_instruction = 0; -pub const r_instruction_r_input_direction: r_instruction = 1; -pub const r_instruction_r_inputa_direction: r_instruction = 2; -pub const r_instruction_r_appending_to: r_instruction = 3; -pub const r_instruction_r_reading_until: r_instruction = 4; -pub const r_instruction_r_reading_string: r_instruction = 5; -pub const r_instruction_r_duplicating_input: r_instruction = 6; -pub const r_instruction_r_duplicating_output: r_instruction = 7; -pub const r_instruction_r_deblank_reading_until: r_instruction = 8; -pub const r_instruction_r_close_this: r_instruction = 9; -pub const r_instruction_r_err_and_out: r_instruction = 10; -pub const r_instruction_r_input_output: r_instruction = 11; -pub const r_instruction_r_output_force: r_instruction = 12; -pub const r_instruction_r_duplicating_input_word: r_instruction = 13; -pub const r_instruction_r_duplicating_output_word: r_instruction = 14; -pub const r_instruction_r_move_input: r_instruction = 15; -pub const r_instruction_r_move_output: r_instruction = 16; -pub const r_instruction_r_move_input_word: r_instruction = 17; -pub const r_instruction_r_move_output_word: r_instruction = 18; -pub const r_instruction_r_append_err_and_out: r_instruction = 19; -pub type r_instruction = u32; -pub const command_type_cm_for: command_type = 0; -pub const command_type_cm_case: command_type = 1; -pub const command_type_cm_while: command_type = 2; -pub const command_type_cm_if: command_type = 3; -pub const command_type_cm_simple: command_type = 4; -pub const command_type_cm_select: command_type = 5; -pub const command_type_cm_connection: command_type = 6; -pub const command_type_cm_function_def: command_type = 7; -pub const command_type_cm_until: command_type = 8; -pub const command_type_cm_group: command_type = 9; -pub const command_type_cm_arith: command_type = 10; -pub const command_type_cm_cond: command_type = 11; -pub const command_type_cm_arith_for: command_type = 12; -pub const command_type_cm_subshell: command_type = 13; -pub const command_type_cm_coproc: command_type = 14; -pub type command_type = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct word_desc { - pub word: *mut ::std::os::raw::c_char, - pub flags: ::std::os::raw::c_int, -} -pub type WORD_DESC = word_desc; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct word_list { - pub next: *mut word_list, - pub word: *mut WORD_DESC, -} -pub type WORD_LIST = word_list; -#[repr(C)] -#[derive(Copy, Clone)] -pub union REDIRECTEE { - pub dest: ::std::os::raw::c_int, - pub filename: *mut WORD_DESC, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct redirect { - pub next: *mut redirect, - pub redirector: REDIRECTEE, - pub rflags: ::std::os::raw::c_int, - pub flags: ::std::os::raw::c_int, - pub instruction: r_instruction, - pub redirectee: REDIRECTEE, - pub here_doc_eof: *mut ::std::os::raw::c_char, -} -pub type REDIRECT = redirect; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct element { - pub word: *mut WORD_DESC, - pub redirect: *mut REDIRECT, -} -pub type ELEMENT = element; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct command { - pub type_: command_type, - pub flags: ::std::os::raw::c_int, - pub line: ::std::os::raw::c_int, - pub redirects: *mut REDIRECT, - pub value: command__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union command__bindgen_ty_1 { - pub For: *mut for_com, - pub Case: *mut case_com, - pub While: *mut while_com, - pub If: *mut if_com, - pub Connection: *mut connection, - pub Simple: *mut simple_com, - pub Function_def: *mut function_def, - pub Group: *mut group_com, - pub Select: *mut select_com, - pub Arith: *mut arith_com, - pub Cond: *mut cond_com, - pub ArithFor: *mut arith_for_com, - pub Subshell: *mut subshell_com, - pub Coproc: *mut coproc_com, - _bindgen_union_align: u64, -} -pub type COMMAND = command; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct connection { - pub ignore: ::std::os::raw::c_int, - pub first: *mut COMMAND, - pub second: *mut COMMAND, - pub connector: ::std::os::raw::c_int, -} -pub type CONNECTION = connection; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pattern_list { - pub next: *mut pattern_list, - pub patterns: *mut WORD_LIST, - pub action: *mut COMMAND, - pub flags: ::std::os::raw::c_int, -} -pub type PATTERN_LIST = pattern_list; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct case_com { - pub flags: ::std::os::raw::c_int, - pub line: ::std::os::raw::c_int, - pub word: *mut WORD_DESC, - pub clauses: *mut PATTERN_LIST, -} -pub type CASE_COM = case_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct for_com { - pub flags: ::std::os::raw::c_int, - pub line: ::std::os::raw::c_int, - pub name: *mut WORD_DESC, - pub map_list: *mut WORD_LIST, - pub action: *mut COMMAND, -} -pub type FOR_COM = for_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct arith_for_com { - pub flags: ::std::os::raw::c_int, - pub line: ::std::os::raw::c_int, - pub init: *mut WORD_LIST, - pub test: *mut WORD_LIST, - pub step: *mut WORD_LIST, - pub action: *mut COMMAND, -} -pub type ARITH_FOR_COM = arith_for_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct select_com { - pub flags: ::std::os::raw::c_int, - pub line: ::std::os::raw::c_int, - pub name: *mut WORD_DESC, - pub map_list: *mut WORD_LIST, - pub action: *mut COMMAND, -} -pub type SELECT_COM = select_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct if_com { - pub flags: ::std::os::raw::c_int, - pub test: *mut COMMAND, - pub true_case: *mut COMMAND, - pub false_case: *mut COMMAND, -} -pub type IF_COM = if_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct while_com { - pub flags: ::std::os::raw::c_int, - pub test: *mut COMMAND, - pub action: *mut COMMAND, -} -pub type WHILE_COM = while_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct arith_com { - pub flags: ::std::os::raw::c_int, - pub line: ::std::os::raw::c_int, - pub exp: *mut WORD_LIST, -} -pub type ARITH_COM = arith_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct cond_com { - pub flags: ::std::os::raw::c_int, - pub line: ::std::os::raw::c_int, - pub type_: ::std::os::raw::c_int, - pub op: *mut WORD_DESC, - pub left: *mut cond_com, - pub right: *mut cond_com, -} -pub type COND_COM = cond_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct simple_com { - pub flags: ::std::os::raw::c_int, - pub line: ::std::os::raw::c_int, - pub words: *mut WORD_LIST, - pub redirects: *mut REDIRECT, -} -pub type SIMPLE_COM = simple_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct function_def { - pub flags: ::std::os::raw::c_int, - pub line: ::std::os::raw::c_int, - pub name: *mut WORD_DESC, - pub command: *mut COMMAND, - pub source_file: *mut ::std::os::raw::c_char, -} -pub type FUNCTION_DEF = function_def; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct group_com { - pub ignore: ::std::os::raw::c_int, - pub command: *mut COMMAND, -} -pub type GROUP_COM = group_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct subshell_com { - pub flags: ::std::os::raw::c_int, - pub line: ::std::os::raw::c_int, - pub command: *mut COMMAND, -} -pub type SUBSHELL_COM = subshell_com; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct coproc { - pub c_name: *mut ::std::os::raw::c_char, - pub c_pid: pid_t, - pub c_rfd: ::std::os::raw::c_int, - pub c_wfd: ::std::os::raw::c_int, - pub c_rsave: ::std::os::raw::c_int, - pub c_wsave: ::std::os::raw::c_int, - pub c_flags: ::std::os::raw::c_int, - pub c_status: ::std::os::raw::c_int, - pub c_lock: ::std::os::raw::c_int, -} -pub type Coproc = coproc; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct coproc_com { - pub flags: ::std::os::raw::c_int, - pub name: *mut ::std::os::raw::c_char, - pub command: *mut COMMAND, -} -pub type COPROC_COM = coproc_com; -extern "C" { - #[link_name = "\u{1}global_command"] - pub static mut global_command: *mut COMMAND; -} -extern "C" { - #[link_name = "\u{1}sh_coproc"] - pub static mut sh_coproc: Coproc; -} -extern "C" { - pub fn copy_function_def_contents( - arg1: *mut FUNCTION_DEF, - arg2: *mut FUNCTION_DEF, - ) -> *mut FUNCTION_DEF; -} -extern "C" { - pub fn copy_function_def(arg1: *mut FUNCTION_DEF) -> *mut FUNCTION_DEF; -} -extern "C" { - pub fn copy_word(arg1: *mut WORD_DESC) -> *mut WORD_DESC; -} -extern "C" { - pub fn copy_word_list(arg1: *mut WORD_LIST) -> *mut WORD_LIST; -} -extern "C" { - pub fn copy_redirect(arg1: *mut REDIRECT) -> *mut REDIRECT; -} -extern "C" { - pub fn copy_redirects(arg1: *mut REDIRECT) -> *mut REDIRECT; -} -extern "C" { - pub fn copy_command(arg1: *mut COMMAND) -> *mut COMMAND; -} -pub type u_char = __u_char; -pub type u_short = __u_short; -pub type u_int = __u_int; -pub type u_long = __u_long; -pub type quad_t = __quad_t; -pub type u_quad_t = __u_quad_t; -pub type fsid_t = __fsid_t; -pub type loff_t = __loff_t; -pub type ino_t = __ino_t; -pub type ino64_t = __ino64_t; -pub type dev_t = __dev_t; -pub type mode_t = __mode_t; -pub type nlink_t = __nlink_t; -pub type id_t = __id_t; -pub type daddr_t = __daddr_t; -pub type caddr_t = __caddr_t; -pub type key_t = __key_t; -pub type clock_t = __clock_t; -pub type clockid_t = __clockid_t; -pub type time_t = __time_t; -pub type timer_t = __timer_t; -pub type suseconds_t = __suseconds_t; -pub type ulong = ::std::os::raw::c_ulong; -pub type ushort = ::std::os::raw::c_ushort; -pub type uint = ::std::os::raw::c_uint; -pub type u_int8_t = ::std::os::raw::c_uchar; -pub type u_int16_t = ::std::os::raw::c_ushort; -pub type u_int32_t = ::std::os::raw::c_uint; -pub type u_int64_t = ::std::os::raw::c_ulong; -pub type register_t = ::std::os::raw::c_long; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timeval { - pub tv_sec: __time_t, - pub tv_usec: __suseconds_t, -} -pub type __fd_mask = ::std::os::raw::c_long; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fd_set { - pub fds_bits: [__fd_mask; 16usize], -} -pub type fd_mask = __fd_mask; -extern "C" { - pub fn select( - __nfds: ::std::os::raw::c_int, - __readfds: *mut fd_set, - __writefds: *mut fd_set, - __exceptfds: *mut fd_set, - __timeout: *mut timeval, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pselect( - __nfds: ::std::os::raw::c_int, - __readfds: *mut fd_set, - __writefds: *mut fd_set, - __exceptfds: *mut fd_set, - __timeout: *const timespec, - __sigmask: *const __sigset_t, - ) -> ::std::os::raw::c_int; -} -pub type blksize_t = __blksize_t; -pub type blkcnt_t = __blkcnt_t; -pub type fsblkcnt_t = __fsblkcnt_t; -pub type fsfilcnt_t = __fsfilcnt_t; -pub type blkcnt64_t = __blkcnt64_t; -pub type fsblkcnt64_t = __fsblkcnt64_t; -pub type fsfilcnt64_t = __fsfilcnt64_t; -pub type __gwchar_t = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct imaxdiv_t { - pub quot: ::std::os::raw::c_long, - pub rem: ::std::os::raw::c_long, -} -extern "C" { - pub fn imaxabs(__n: intmax_t) -> intmax_t; -} -extern "C" { - pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t; -} -extern "C" { - pub fn strtoimax( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> intmax_t; -} -extern "C" { - pub fn strtoumax( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> uintmax_t; -} -extern "C" { - pub fn wcstoimax( - __nptr: *const __gwchar_t, - __endptr: *mut *mut __gwchar_t, - __base: ::std::os::raw::c_int, - ) -> intmax_t; -} -extern "C" { - pub fn wcstoumax( - __nptr: *const __gwchar_t, - __endptr: *mut *mut __gwchar_t, - __base: ::std::os::raw::c_int, - ) -> uintmax_t; -} -pub const _ISupper: _bindgen_ty_16 = 256; -pub const _ISlower: _bindgen_ty_16 = 512; -pub const _ISalpha: _bindgen_ty_16 = 1024; -pub const _ISdigit: _bindgen_ty_16 = 2048; -pub const _ISxdigit: _bindgen_ty_16 = 4096; -pub const _ISspace: _bindgen_ty_16 = 8192; -pub const _ISprint: _bindgen_ty_16 = 16384; -pub const _ISgraph: _bindgen_ty_16 = 32768; -pub const _ISblank: _bindgen_ty_16 = 1; -pub const _IScntrl: _bindgen_ty_16 = 2; -pub const _ISpunct: _bindgen_ty_16 = 4; -pub const _ISalnum: _bindgen_ty_16 = 8; -pub type _bindgen_ty_16 = u32; -extern "C" { - pub fn __ctype_b_loc() -> *mut *const ::std::os::raw::c_ushort; -} -extern "C" { - pub fn __ctype_tolower_loc() -> *mut *const __int32_t; -} -extern "C" { - pub fn __ctype_toupper_loc() -> *mut *const __int32_t; -} -extern "C" { - pub fn isalnum(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isalpha(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iscntrl(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isdigit(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn islower(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isgraph(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isprint(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ispunct(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isspace(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isupper(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isxdigit(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tolower(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn toupper(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isblank(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isctype( - __c: ::std::os::raw::c_int, - __mask: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isascii(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn toascii(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _toupper(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _tolower(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isalnum_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isalpha_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn iscntrl_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isdigit_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn islower_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isgraph_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isprint_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ispunct_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isspace_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isupper_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isxdigit_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn isblank_l(arg1: ::std::os::raw::c_int, arg2: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __tolower_l(__c: ::std::os::raw::c_int, __l: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tolower_l(__c: ::std::os::raw::c_int, __l: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __toupper_l(__c: ::std::os::raw::c_int, __l: locale_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn toupper_l(__c: ::std::os::raw::c_int, __l: locale_t) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timezone { - pub tz_minuteswest: ::std::os::raw::c_int, - pub tz_dsttime: ::std::os::raw::c_int, -} -pub type __timezone_ptr_t = *mut timezone; -extern "C" { - pub fn gettimeofday(__tv: *mut timeval, __tz: __timezone_ptr_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn settimeofday(__tv: *const timeval, __tz: *const timezone) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn adjtime(__delta: *const timeval, __olddelta: *mut timeval) -> ::std::os::raw::c_int; -} -pub const __itimer_which_ITIMER_REAL: __itimer_which = 0; -pub const __itimer_which_ITIMER_VIRTUAL: __itimer_which = 1; -pub const __itimer_which_ITIMER_PROF: __itimer_which = 2; -pub type __itimer_which = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct itimerval { - pub it_interval: timeval, - pub it_value: timeval, -} -pub use self::__itimer_which as __itimer_which_t; -extern "C" { - pub fn getitimer(__which: __itimer_which_t, __value: *mut itimerval) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setitimer( - __which: __itimer_which_t, - __new: *const itimerval, - __old: *mut itimerval, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn utimes( - __file: *const ::std::os::raw::c_char, - __tvp: *const timeval, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lutimes( - __file: *const ::std::os::raw::c_char, - __tvp: *const timeval, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn futimes(__fd: ::std::os::raw::c_int, __tvp: *const timeval) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn futimesat( - __fd: ::std::os::raw::c_int, - __file: *const ::std::os::raw::c_char, - __tvp: *const timeval, - ) -> ::std::os::raw::c_int; -} -pub const __rlimit_resource_RLIMIT_CPU: __rlimit_resource = 0; -pub const __rlimit_resource_RLIMIT_FSIZE: __rlimit_resource = 1; -pub const __rlimit_resource_RLIMIT_DATA: __rlimit_resource = 2; -pub const __rlimit_resource_RLIMIT_STACK: __rlimit_resource = 3; -pub const __rlimit_resource_RLIMIT_CORE: __rlimit_resource = 4; -pub const __rlimit_resource___RLIMIT_RSS: __rlimit_resource = 5; -pub const __rlimit_resource_RLIMIT_NOFILE: __rlimit_resource = 7; -pub const __rlimit_resource___RLIMIT_OFILE: __rlimit_resource = 7; -pub const __rlimit_resource_RLIMIT_AS: __rlimit_resource = 9; -pub const __rlimit_resource___RLIMIT_NPROC: __rlimit_resource = 6; -pub const __rlimit_resource___RLIMIT_MEMLOCK: __rlimit_resource = 8; -pub const __rlimit_resource___RLIMIT_LOCKS: __rlimit_resource = 10; -pub const __rlimit_resource___RLIMIT_SIGPENDING: __rlimit_resource = 11; -pub const __rlimit_resource___RLIMIT_MSGQUEUE: __rlimit_resource = 12; -pub const __rlimit_resource___RLIMIT_NICE: __rlimit_resource = 13; -pub const __rlimit_resource___RLIMIT_RTPRIO: __rlimit_resource = 14; -pub const __rlimit_resource___RLIMIT_RTTIME: __rlimit_resource = 15; -pub const __rlimit_resource___RLIMIT_NLIMITS: __rlimit_resource = 16; -pub const __rlimit_resource___RLIM_NLIMITS: __rlimit_resource = 16; -pub type __rlimit_resource = u32; -pub type rlim_t = __rlim_t; -pub type rlim64_t = __rlim64_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rlimit { - pub rlim_cur: rlim_t, - pub rlim_max: rlim_t, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rlimit64 { - pub rlim_cur: rlim64_t, - pub rlim_max: rlim64_t, -} -pub const __rusage_who_RUSAGE_SELF: __rusage_who = 0; -pub const __rusage_who_RUSAGE_CHILDREN: __rusage_who = -1; -pub const __rusage_who_RUSAGE_THREAD: __rusage_who = 1; -pub type __rusage_who = i32; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct rusage { - pub ru_utime: timeval, - pub ru_stime: timeval, - pub __bindgen_anon_1: rusage__bindgen_ty_1, - pub __bindgen_anon_2: rusage__bindgen_ty_2, - pub __bindgen_anon_3: rusage__bindgen_ty_3, - pub __bindgen_anon_4: rusage__bindgen_ty_4, - pub __bindgen_anon_5: rusage__bindgen_ty_5, - pub __bindgen_anon_6: rusage__bindgen_ty_6, - pub __bindgen_anon_7: rusage__bindgen_ty_7, - pub __bindgen_anon_8: rusage__bindgen_ty_8, - pub __bindgen_anon_9: rusage__bindgen_ty_9, - pub __bindgen_anon_10: rusage__bindgen_ty_10, - pub __bindgen_anon_11: rusage__bindgen_ty_11, - pub __bindgen_anon_12: rusage__bindgen_ty_12, - pub __bindgen_anon_13: rusage__bindgen_ty_13, - pub __bindgen_anon_14: rusage__bindgen_ty_14, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_1 { - pub ru_maxrss: ::std::os::raw::c_long, - pub __ru_maxrss_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_2 { - pub ru_ixrss: ::std::os::raw::c_long, - pub __ru_ixrss_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_3 { - pub ru_idrss: ::std::os::raw::c_long, - pub __ru_idrss_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_4 { - pub ru_isrss: ::std::os::raw::c_long, - pub __ru_isrss_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_5 { - pub ru_minflt: ::std::os::raw::c_long, - pub __ru_minflt_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_6 { - pub ru_majflt: ::std::os::raw::c_long, - pub __ru_majflt_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_7 { - pub ru_nswap: ::std::os::raw::c_long, - pub __ru_nswap_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_8 { - pub ru_inblock: ::std::os::raw::c_long, - pub __ru_inblock_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_9 { - pub ru_oublock: ::std::os::raw::c_long, - pub __ru_oublock_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_10 { - pub ru_msgsnd: ::std::os::raw::c_long, - pub __ru_msgsnd_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_11 { - pub ru_msgrcv: ::std::os::raw::c_long, - pub __ru_msgrcv_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_12 { - pub ru_nsignals: ::std::os::raw::c_long, - pub __ru_nsignals_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_13 { - pub ru_nvcsw: ::std::os::raw::c_long, - pub __ru_nvcsw_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union rusage__bindgen_ty_14 { - pub ru_nivcsw: ::std::os::raw::c_long, - pub __ru_nivcsw_word: __syscall_slong_t, - _bindgen_union_align: u64, -} -pub const __priority_which_PRIO_PROCESS: __priority_which = 0; -pub const __priority_which_PRIO_PGRP: __priority_which = 1; -pub const __priority_which_PRIO_USER: __priority_which = 2; -pub type __priority_which = u32; -extern "C" { - pub fn prlimit( - __pid: __pid_t, - __resource: __rlimit_resource, - __new_limit: *const rlimit, - __old_limit: *mut rlimit, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn prlimit64( - __pid: __pid_t, - __resource: __rlimit_resource, - __new_limit: *const rlimit64, - __old_limit: *mut rlimit64, - ) -> ::std::os::raw::c_int; -} -pub use self::__priority_which as __priority_which_t; -pub use self::__rlimit_resource as __rlimit_resource_t; -pub use self::__rusage_who as __rusage_who_t; -extern "C" { - pub fn getrlimit( - __resource: __rlimit_resource_t, - __rlimits: *mut rlimit, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getrlimit64( - __resource: __rlimit_resource_t, - __rlimits: *mut rlimit64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setrlimit( - __resource: __rlimit_resource_t, - __rlimits: *const rlimit, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setrlimit64( - __resource: __rlimit_resource_t, - __rlimits: *const rlimit64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getrusage(__who: __rusage_who_t, __usage: *mut rusage) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getpriority(__which: __priority_which_t, __who: id_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setpriority( - __which: __priority_which_t, - __who: id_t, - __prio: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn memcpy( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __n: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memmove( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __n: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memccpy( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memset( - __s: *mut ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memcmp( - __s1: *const ::std::os::raw::c_void, - __s2: *const ::std::os::raw::c_void, - __n: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn memchr( - __s: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn rawmemchr( - __s: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn memrchr( - __s: *const ::std::os::raw::c_void, - __c: ::std::os::raw::c_int, - __n: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn strcpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strncpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcat( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strncat( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strncmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcoll( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strxfrm( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: usize, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strcoll_l( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __l: locale_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strxfrm_l( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: usize, - __l: locale_t, - ) -> usize; -} -extern "C" { - pub fn strdup(__s: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strndup( - __string: *const ::std::os::raw::c_char, - __n: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strrchr( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strchrnul( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcspn( - __s: *const ::std::os::raw::c_char, - __reject: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strspn( - __s: *const ::std::os::raw::c_char, - __accept: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strpbrk( - __s: *const ::std::os::raw::c_char, - __accept: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strstr( - __haystack: *const ::std::os::raw::c_char, - __needle: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strtok( - __s: *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __strtok_r( - __s: *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - __save_ptr: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strtok_r( - __s: *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - __save_ptr: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcasestr( - __haystack: *const ::std::os::raw::c_char, - __needle: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn memmem( - __haystack: *const ::std::os::raw::c_void, - __haystacklen: usize, - __needle: *const ::std::os::raw::c_void, - __needlelen: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn __mempcpy( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __n: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn mempcpy( - __dest: *mut ::std::os::raw::c_void, - __src: *const ::std::os::raw::c_void, - __n: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn strlen(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strnlen(__string: *const ::std::os::raw::c_char, __maxlen: usize) -> usize; -} -extern "C" { - pub fn strerror(__errnum: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strerror_r( - __errnum: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __buflen: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strerror_l( - __errnum: ::std::os::raw::c_int, - __l: locale_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bcmp( - __s1: *const ::std::os::raw::c_void, - __s2: *const ::std::os::raw::c_void, - __n: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bcopy( - __src: *const ::std::os::raw::c_void, - __dest: *mut ::std::os::raw::c_void, - __n: usize, - ); -} -extern "C" { - pub fn bzero(__s: *mut ::std::os::raw::c_void, __n: usize); -} -extern "C" { - pub fn index( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn rindex( - __s: *const ::std::os::raw::c_char, - __c: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ffs(__i: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ffsl(__l: ::std::os::raw::c_long) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ffsll(__ll: ::std::os::raw::c_longlong) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcasecmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strncasecmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strcasecmp_l( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __loc: locale_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strncasecmp_l( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - __n: usize, - __loc: locale_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn explicit_bzero(__s: *mut ::std::os::raw::c_void, __n: usize); -} -extern "C" { - pub fn strsep( - __stringp: *mut *mut ::std::os::raw::c_char, - __delim: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strsignal(__sig: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __stpcpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn stpcpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __stpncpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn stpncpy( - __dest: *mut ::std::os::raw::c_char, - __src: *const ::std::os::raw::c_char, - __n: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strverscmp( - __s1: *const ::std::os::raw::c_char, - __s2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strfry(__string: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn memfrob(__s: *mut ::std::os::raw::c_void, __n: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn basename(__filename: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -pub const idtype_t_P_ALL: idtype_t = 0; -pub const idtype_t_P_PID: idtype_t = 1; -pub const idtype_t_P_PGID: idtype_t = 2; -pub type idtype_t = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct div_t { - pub quot: ::std::os::raw::c_int, - pub rem: ::std::os::raw::c_int, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ldiv_t { - pub quot: ::std::os::raw::c_long, - pub rem: ::std::os::raw::c_long, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct lldiv_t { - pub quot: ::std::os::raw::c_longlong, - pub rem: ::std::os::raw::c_longlong, -} -extern "C" { - pub fn __ctype_get_mb_cur_max() -> usize; -} -extern "C" { - pub fn atof(__nptr: *const ::std::os::raw::c_char) -> f64; -} -extern "C" { - pub fn atoi(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn atol(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn atoll(__nptr: *const ::std::os::raw::c_char) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtod( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> f64; -} -extern "C" { - pub fn strtof( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> f32; -} -extern "C" { - pub fn strtold( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> f64; -} -extern "C" { - pub fn strtof32( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> _Float32; -} -extern "C" { - pub fn strtof64( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> _Float64; -} -extern "C" { - pub fn strtof32x( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> _Float32x; -} -extern "C" { - pub fn strtof64x( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - ) -> _Float64x; -} -extern "C" { - pub fn strtol( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn strtoul( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strtoq( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtouq( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub fn strtoll( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtoull( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub fn strfromd( - __dest: *mut ::std::os::raw::c_char, - __size: usize, - __format: *const ::std::os::raw::c_char, - __f: f64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strfromf( - __dest: *mut ::std::os::raw::c_char, - __size: usize, - __format: *const ::std::os::raw::c_char, - __f: f32, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strfroml( - __dest: *mut ::std::os::raw::c_char, - __size: usize, - __format: *const ::std::os::raw::c_char, - __f: f64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strfromf32( - __dest: *mut ::std::os::raw::c_char, - __size: usize, - __format: *const ::std::os::raw::c_char, - __f: _Float32, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strfromf64( - __dest: *mut ::std::os::raw::c_char, - __size: usize, - __format: *const ::std::os::raw::c_char, - __f: _Float64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strfromf32x( - __dest: *mut ::std::os::raw::c_char, - __size: usize, - __format: *const ::std::os::raw::c_char, - __f: _Float32x, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strfromf64x( - __dest: *mut ::std::os::raw::c_char, - __size: usize, - __format: *const ::std::os::raw::c_char, - __f: _Float64x, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strtol_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - __loc: locale_t, - ) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn strtoul_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - __loc: locale_t, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn strtoll_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - __loc: locale_t, - ) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn strtoull_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __base: ::std::os::raw::c_int, - __loc: locale_t, - ) -> ::std::os::raw::c_ulonglong; -} -extern "C" { - pub fn strtod_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __loc: locale_t, - ) -> f64; -} -extern "C" { - pub fn strtof_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __loc: locale_t, - ) -> f32; -} -extern "C" { - pub fn strtold_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __loc: locale_t, - ) -> f64; -} -extern "C" { - pub fn strtof32_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __loc: locale_t, - ) -> _Float32; -} -extern "C" { - pub fn strtof64_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __loc: locale_t, - ) -> _Float64; -} -extern "C" { - pub fn strtof32x_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __loc: locale_t, - ) -> _Float32x; -} -extern "C" { - pub fn strtof64x_l( - __nptr: *const ::std::os::raw::c_char, - __endptr: *mut *mut ::std::os::raw::c_char, - __loc: locale_t, - ) -> _Float64x; -} -extern "C" { - pub fn l64a(__n: ::std::os::raw::c_long) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn a64l(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn random() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn srandom(__seed: ::std::os::raw::c_uint); -} -extern "C" { - pub fn initstate( - __seed: ::std::os::raw::c_uint, - __statebuf: *mut ::std::os::raw::c_char, - __statelen: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn setstate(__statebuf: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct random_data { - pub fptr: *mut i32, - pub rptr: *mut i32, - pub state: *mut i32, - pub rand_type: ::std::os::raw::c_int, - pub rand_deg: ::std::os::raw::c_int, - pub rand_sep: ::std::os::raw::c_int, - pub end_ptr: *mut i32, -} -extern "C" { - pub fn random_r(__buf: *mut random_data, __result: *mut i32) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn srandom_r( - __seed: ::std::os::raw::c_uint, - __buf: *mut random_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn initstate_r( - __seed: ::std::os::raw::c_uint, - __statebuf: *mut ::std::os::raw::c_char, - __statelen: usize, - __buf: *mut random_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setstate_r( - __statebuf: *mut ::std::os::raw::c_char, - __buf: *mut random_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rand() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn srand(__seed: ::std::os::raw::c_uint); -} -extern "C" { - pub fn rand_r(__seed: *mut ::std::os::raw::c_uint) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn drand48() -> f64; -} -extern "C" { - pub fn erand48(__xsubi: *mut ::std::os::raw::c_ushort) -> f64; -} -extern "C" { - pub fn lrand48() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn nrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn mrand48() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn jrand48(__xsubi: *mut ::std::os::raw::c_ushort) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn srand48(__seedval: ::std::os::raw::c_long); -} -extern "C" { - pub fn seed48(__seed16v: *mut ::std::os::raw::c_ushort) -> *mut ::std::os::raw::c_ushort; -} -extern "C" { - pub fn lcong48(__param: *mut ::std::os::raw::c_ushort); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct drand48_data { - pub __x: [::std::os::raw::c_ushort; 3usize], - pub __old_x: [::std::os::raw::c_ushort; 3usize], - pub __c: ::std::os::raw::c_ushort, - pub __init: ::std::os::raw::c_ushort, - pub __a: ::std::os::raw::c_ulonglong, -} -extern "C" { - pub fn drand48_r(__buffer: *mut drand48_data, __result: *mut f64) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn erand48_r( - __xsubi: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - __result: *mut f64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lrand48_r( - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn nrand48_r( - __xsubi: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mrand48_r( - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn jrand48_r( - __xsubi: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - __result: *mut ::std::os::raw::c_long, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn srand48_r( - __seedval: ::std::os::raw::c_long, - __buffer: *mut drand48_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn seed48_r( - __seed16v: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lcong48_r( - __param: *mut ::std::os::raw::c_ushort, - __buffer: *mut drand48_data, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn malloc(__size: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn calloc(__nmemb: usize, __size: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn realloc( - __ptr: *mut ::std::os::raw::c_void, - __size: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn reallocarray( - __ptr: *mut ::std::os::raw::c_void, - __nmemb: usize, - __size: usize, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn free(__ptr: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn alloca(__size: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn valloc(__size: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn posix_memalign( - __memptr: *mut *mut ::std::os::raw::c_void, - __alignment: usize, - __size: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn aligned_alloc(__alignment: usize, __size: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn abort(); -} -extern "C" { - pub fn atexit(__func: ::core::option::Option) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn at_quick_exit( - __func: ::core::option::Option, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn on_exit( - __func: ::core::option::Option< - unsafe extern "C" fn( - __status: ::std::os::raw::c_int, - __arg: *mut ::std::os::raw::c_void, - ), - >, - __arg: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn exit(__status: ::std::os::raw::c_int); -} -extern "C" { - pub fn quick_exit(__status: ::std::os::raw::c_int); -} -extern "C" { - pub fn _Exit(__status: ::std::os::raw::c_int); -} -extern "C" { - pub fn getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn secure_getenv(__name: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn putenv(__string: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setenv( - __name: *const ::std::os::raw::c_char, - __value: *const ::std::os::raw::c_char, - __replace: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unsetenv(__name: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clearenv() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mktemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn mkstemp(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkstemp64(__template: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkstemps( - __template: *mut ::std::os::raw::c_char, - __suffixlen: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkstemps64( - __template: *mut ::std::os::raw::c_char, - __suffixlen: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkdtemp(__template: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn mkostemp( - __template: *mut ::std::os::raw::c_char, - __flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkostemp64( - __template: *mut ::std::os::raw::c_char, - __flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkostemps( - __template: *mut ::std::os::raw::c_char, - __suffixlen: ::std::os::raw::c_int, - __flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkostemps64( - __template: *mut ::std::os::raw::c_char, - __suffixlen: ::std::os::raw::c_int, - __flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn system(__command: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn canonicalize_file_name( - __name: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn realpath( - __name: *const ::std::os::raw::c_char, - __resolved: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -pub type __compar_fn_t = ::core::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, ->; -pub type comparison_fn_t = __compar_fn_t; -pub type __compar_d_fn_t = ::core::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - arg3: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn bsearch( - __key: *const ::std::os::raw::c_void, - __base: *const ::std::os::raw::c_void, - __nmemb: usize, - __size: usize, - __compar: __compar_fn_t, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn qsort( - __base: *mut ::std::os::raw::c_void, - __nmemb: usize, - __size: usize, - __compar: __compar_fn_t, - ); -} -extern "C" { - pub fn qsort_r( - __base: *mut ::std::os::raw::c_void, - __nmemb: usize, - __size: usize, - __compar: __compar_d_fn_t, - __arg: *mut ::std::os::raw::c_void, - ); -} -extern "C" { - pub fn abs(__x: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn labs(__x: ::std::os::raw::c_long) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn llabs(__x: ::std::os::raw::c_longlong) -> ::std::os::raw::c_longlong; -} -extern "C" { - pub fn div(__numer: ::std::os::raw::c_int, __denom: ::std::os::raw::c_int) -> div_t; -} -extern "C" { - pub fn ldiv(__numer: ::std::os::raw::c_long, __denom: ::std::os::raw::c_long) -> ldiv_t; -} -extern "C" { - pub fn lldiv( - __numer: ::std::os::raw::c_longlong, - __denom: ::std::os::raw::c_longlong, - ) -> lldiv_t; -} -extern "C" { - pub fn ecvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fcvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn gcvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn qecvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn qfcvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn qgcvt( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ecvt_r( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fcvt_r( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn qecvt_r( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn qfcvt_r( - __value: f64, - __ndigit: ::std::os::raw::c_int, - __decpt: *mut ::std::os::raw::c_int, - __sign: *mut ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __len: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mblen(__s: *const ::std::os::raw::c_char, __n: usize) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mbtowc( - __pwc: *mut wchar_t, - __s: *const ::std::os::raw::c_char, - __n: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wctomb(__s: *mut ::std::os::raw::c_char, __wchar: wchar_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const ::std::os::raw::c_char, __n: usize) -> usize; -} -extern "C" { - pub fn wcstombs(__s: *mut ::std::os::raw::c_char, __pwcs: *const wchar_t, __n: usize) -> usize; -} -extern "C" { - pub fn rpmatch(__response: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getsubopt( - __optionp: *mut *mut ::std::os::raw::c_char, - __tokens: *const *mut ::std::os::raw::c_char, - __valuep: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn posix_openpt(__oflag: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn grantpt(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unlockpt(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ptsname(__fd: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ptsname_r( - __fd: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __buflen: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getpt() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getloadavg(__loadavg: *mut f64, __nelem: ::std::os::raw::c_int) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn xmalloc(arg1: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn xrealloc(arg1: *mut ::std::os::raw::c_void, arg2: usize) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn xfree(arg1: *mut ::std::os::raw::c_void); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct g_list { - pub next: *mut g_list, -} -pub type GENERIC_LIST = g_list; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct STRING_INT_ALIST { - pub word: *mut ::std::os::raw::c_char, - pub token: ::std::os::raw::c_int, -} -pub type Function = ::core::option::Option ::std::os::raw::c_int>; -pub type VFunction = ::core::option::Option; -pub type CPFunction = ::core::option::Option *mut ::std::os::raw::c_char>; -pub type CPPFunction = - ::core::option::Option *mut *mut ::std::os::raw::c_char>; -pub type sh_intfunc_t = ::core::option::Option< - unsafe extern "C" fn(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int, ->; -pub type sh_ivoidfunc_t = ::core::option::Option ::std::os::raw::c_int>; -pub type sh_icpfunc_t = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int, ->; -pub type sh_icppfunc_t = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int, ->; -pub type sh_iptrfunc_t = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, ->; -pub type sh_voidfunc_t = ::core::option::Option; -pub type sh_vintfunc_t = ::core::option::Option; -pub type sh_vcpfunc_t = - ::core::option::Option; -pub type sh_vcppfunc_t = - ::core::option::Option; -pub type sh_vptrfunc_t = - ::core::option::Option; -pub type sh_wdesc_func_t = - ::core::option::Option ::std::os::raw::c_int>; -pub type sh_wlist_func_t = - ::core::option::Option ::std::os::raw::c_int>; -pub type sh_glist_func_t = - ::core::option::Option ::std::os::raw::c_int>; -pub type sh_string_func_t = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char, ->; -pub type sh_msg_func_t = ::core::option::Option< - unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int, ->; -pub type sh_vmsg_func_t = - ::core::option::Option; -pub type sh_sv_func_t = - ::core::option::Option; -pub type sh_free_func_t = - ::core::option::Option; -pub type sh_resetsig_func_t = - ::core::option::Option; -pub type sh_ignore_func_t = ::core::option::Option< - unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int, ->; -pub type sh_assign_func_t = ::core::option::Option< - unsafe extern "C" fn(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int, ->; -pub type sh_wassign_func_t = ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut WORD_DESC, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, ->; -pub type sh_load_func_t = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int, ->; -pub type sh_unload_func_t = - ::core::option::Option; -pub type sh_builtin_func_t = - ::core::option::Option ::std::os::raw::c_int>; -pub type QSFUNC = ::core::option::Option< - unsafe extern "C" fn( - arg1: *const ::std::os::raw::c_void, - arg2: *const ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn posix_initialize(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn num_posix_options() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn get_posix_options(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn set_posix_options(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn save_posix_options(); -} -extern "C" { - pub fn string_to_rlimtype(arg1: *mut ::std::os::raw::c_char) -> rlim_t; -} -extern "C" { - pub fn print_rlimtype(arg1: rlim_t, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn all_digits(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn legal_number( - arg1: *const ::std::os::raw::c_char, - arg2: *mut intmax_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn legal_identifier(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn importable_function_name( - arg1: *const ::std::os::raw::c_char, - arg2: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn exportable_function_name(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn check_identifier( - arg1: *mut WORD_DESC, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn valid_nameref_value( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn check_selfref( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn legal_alias_name( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn line_isblank(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn assignment( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_unset_nodelay_mode(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_setclexec(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_validfd(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fd_ispipe(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn check_dev_tty(); -} -extern "C" { - pub fn move_to_high_fd( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn check_binary_file( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_openpipe(arg1: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_closepipe(arg1: *mut ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn file_exists(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn file_isdir(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn file_iswdir(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn path_dot_or_dotdot(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn absolute_pathname(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn absolute_program(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn make_absolute( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn base_pathname(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn full_pathname(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn polite_directory_format( - arg1: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn trim_pathname( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn printable_filename( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn extract_colon_unit( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn tilde_initialize(); -} -extern "C" { - pub fn bash_tilde_find_word( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bash_tilde_expand( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_group_list(arg1: *mut ::std::os::raw::c_int) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_group_array(arg1: *mut ::std::os::raw::c_int) -> *mut ::std::os::raw::c_int; -} -extern "C" { - pub fn conf_standard_path() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn default_columns() -> ::std::os::raw::c_int; -} -pub type arrayind_t = intmax_t; -pub const atype_array_indexed: atype = 0; -pub const atype_array_assoc: atype = 1; -pub type atype = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct array { - pub type_: atype, - pub max_index: arrayind_t, - pub num_elements: ::std::os::raw::c_int, - pub head: *mut array_element, - pub lastref: *mut array_element, -} -pub type ARRAY = array; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct array_element { - pub ind: arrayind_t, - pub value: *mut ::std::os::raw::c_char, - pub next: *mut array_element, - pub prev: *mut array_element, -} -pub type ARRAY_ELEMENT = array_element; -pub type sh_ae_map_func_t = ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut ARRAY_ELEMENT, - arg2: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn array_create() -> *mut ARRAY; -} -extern "C" { - pub fn array_flush(arg1: *mut ARRAY); -} -extern "C" { - pub fn array_dispose(arg1: *mut ARRAY); -} -extern "C" { - pub fn array_copy(arg1: *mut ARRAY) -> *mut ARRAY; -} -extern "C" { - pub fn array_slice( - arg1: *mut ARRAY, - arg2: *mut ARRAY_ELEMENT, - arg3: *mut ARRAY_ELEMENT, - ) -> *mut ARRAY; -} -extern "C" { - pub fn array_walk(arg1: *mut ARRAY, arg2: sh_ae_map_func_t, arg3: *mut ::std::os::raw::c_void); -} -extern "C" { - pub fn array_shift( - arg1: *mut ARRAY, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut ARRAY_ELEMENT; -} -extern "C" { - pub fn array_rshift( - arg1: *mut ARRAY, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn array_unshift_element(arg1: *mut ARRAY) -> *mut ARRAY_ELEMENT; -} -extern "C" { - pub fn array_shift_element( - arg1: *mut ARRAY, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn array_quote(arg1: *mut ARRAY) -> *mut ARRAY; -} -extern "C" { - pub fn array_quote_escapes(arg1: *mut ARRAY) -> *mut ARRAY; -} -extern "C" { - pub fn array_dequote(arg1: *mut ARRAY) -> *mut ARRAY; -} -extern "C" { - pub fn array_dequote_escapes(arg1: *mut ARRAY) -> *mut ARRAY; -} -extern "C" { - pub fn array_remove_quoted_nulls(arg1: *mut ARRAY) -> *mut ARRAY; -} -extern "C" { - pub fn array_subrange( - arg1: *mut ARRAY, - arg2: arrayind_t, - arg3: arrayind_t, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_patsub( - arg1: *mut ARRAY, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_modcase( - arg1: *mut ARRAY, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_create_element( - arg1: arrayind_t, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ARRAY_ELEMENT; -} -extern "C" { - pub fn array_copy_element(arg1: *mut ARRAY_ELEMENT) -> *mut ARRAY_ELEMENT; -} -extern "C" { - pub fn array_dispose_element(arg1: *mut ARRAY_ELEMENT); -} -extern "C" { - pub fn array_insert( - arg1: *mut ARRAY, - arg2: arrayind_t, - arg3: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn array_remove(arg1: *mut ARRAY, arg2: arrayind_t) -> *mut ARRAY_ELEMENT; -} -extern "C" { - pub fn array_reference(arg1: *mut ARRAY, arg2: arrayind_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_to_word_list(arg1: *mut ARRAY) -> *mut WORD_LIST; -} -extern "C" { - pub fn array_from_word_list(arg1: *mut WORD_LIST) -> *mut ARRAY; -} -extern "C" { - pub fn array_keys_to_word_list(arg1: *mut ARRAY) -> *mut WORD_LIST; -} -extern "C" { - pub fn array_assign_list(arg1: *mut ARRAY, arg2: *mut WORD_LIST) -> *mut ARRAY; -} -extern "C" { - pub fn array_to_argv( - arg1: *mut ARRAY, - arg2: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_to_kvpair( - arg1: *mut ARRAY, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_to_assign( - arg1: *mut ARRAY, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_to_string( - arg1: *mut ARRAY, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_from_string( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ARRAY; -} -extern "C" { - pub fn execute_array_command( - arg1: *mut ARRAY, - arg2: *mut ::std::os::raw::c_void, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}trap_list"] - pub static mut trap_list: [*mut ::std::os::raw::c_char; 0usize]; -} -extern "C" { - #[link_name = "\u{1}trapped_signal_received"] - pub static mut trapped_signal_received: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}wait_signal_received"] - pub static mut wait_signal_received: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}running_trap"] - pub static mut running_trap: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}trap_saved_exit_value"] - pub static mut trap_saved_exit_value: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}suppress_debug_trap_verbose"] - pub static mut suppress_debug_trap_verbose: ::std::os::raw::c_int; -} -extern "C" { - pub fn initialize_traps(); -} -extern "C" { - pub fn run_pending_traps(); -} -extern "C" { - pub fn queue_sigchld_trap(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn maybe_set_sigchld_trap(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn set_impossible_sigchld_trap(); -} -extern "C" { - pub fn set_sigchld_trap(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn set_debug_trap(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn set_error_trap(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn set_return_trap(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn maybe_set_debug_trap(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn maybe_set_error_trap(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn maybe_set_return_trap(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn set_sigint_trap(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn set_signal(arg1: ::std::os::raw::c_int, arg2: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn restore_default_signal(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn ignore_signal(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn run_exit_trap() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn run_trap_cleanup(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn run_debug_trap() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn run_error_trap(); -} -extern "C" { - pub fn run_return_trap(); -} -extern "C" { - pub fn free_trap_strings(); -} -extern "C" { - pub fn reset_signal_handlers(); -} -extern "C" { - pub fn restore_original_signals(); -} -extern "C" { - pub fn get_original_signal(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn get_all_original_signals(); -} -extern "C" { - pub fn signal_name(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn decode_signal( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn run_interrupt_trap(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn maybe_call_trap_handler(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn signal_is_special(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn signal_is_trapped(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn signal_is_pending(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn signal_is_ignored(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn signal_is_hard_ignored(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_signal_hard_ignored(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn set_signal_ignored(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn signal_in_progress(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_trap_state(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn next_pending_trap(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn first_pending_trap() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clear_pending_traps(); -} -extern "C" { - pub fn any_signals_trapped() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn check_signals(); -} -extern "C" { - pub fn check_signals_and_traps(); -} -pub type SigHandler = ::std::option::Option; -extern "C" { - pub fn set_signal_handler(arg1: libc::c_int, arg2: *mut SigHandler) -> *mut SigHandler; -} -extern "C" { - #[link_name = "\u{1}sigwinch_received"] - pub static mut sigwinch_received: sig_atomic_t; -} -extern "C" { - #[link_name = "\u{1}sigterm_received"] - pub static mut sigterm_received: sig_atomic_t; -} -extern "C" { - #[link_name = "\u{1}interrupt_immediately"] - pub static mut interrupt_immediately: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}terminate_immediately"] - pub static mut terminate_immediately: ::std::os::raw::c_int; -} -extern "C" { - pub fn termsig_sighandler(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn termsig_handler(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn sigint_sighandler(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn initialize_signals(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn initialize_terminating_signals(); -} -extern "C" { - pub fn reset_terminating_signals(); -} -extern "C" { - pub fn top_level_cleanup(); -} -extern "C" { - pub fn throw_to_top_level(); -} -extern "C" { - pub fn jump_to_top_level(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn restore_sigmask(); -} -extern "C" { - pub fn sigwinch_sighandler(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn set_sigwinch_handler(); -} -extern "C" { - pub fn unset_sigwinch_handler(); -} -extern "C" { - pub fn sigterm_sighandler(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn set_sigint_handler() -> SigHandler; -} -extern "C" { - pub fn trap_to_sighandler(arg1: ::std::os::raw::c_int) -> SigHandler; -} -extern "C" { - pub fn trap_handler(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn block_trapped_signals(arg1: *mut sigset_t, arg2: *mut sigset_t) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unblock_trapped_signals(arg1: *mut sigset_t) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}interrupt_state"] - pub static mut interrupt_state: sig_atomic_t; -} -extern "C" { - #[link_name = "\u{1}terminating_signal"] - pub static mut terminating_signal: sig_atomic_t; -} -extern "C" { - pub fn gettext(__msgid: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn dgettext( - __domainname: *const ::std::os::raw::c_char, - __msgid: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __dgettext( - __domainname: *const ::std::os::raw::c_char, - __msgid: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn dcgettext( - __domainname: *const ::std::os::raw::c_char, - __msgid: *const ::std::os::raw::c_char, - __category: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __dcgettext( - __domainname: *const ::std::os::raw::c_char, - __msgid: *const ::std::os::raw::c_char, - __category: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ngettext( - __msgid1: *const ::std::os::raw::c_char, - __msgid2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn dngettext( - __domainname: *const ::std::os::raw::c_char, - __msgid1: *const ::std::os::raw::c_char, - __msgid2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn dcngettext( - __domainname: *const ::std::os::raw::c_char, - __msgid1: *const ::std::os::raw::c_char, - __msgid2: *const ::std::os::raw::c_char, - __n: ::std::os::raw::c_ulong, - __category: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn textdomain(__domainname: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bindtextdomain( - __domainname: *const ::std::os::raw::c_char, - __dirname: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bind_textdomain_codeset( - __domainname: *const ::std::os::raw::c_char, - __codeset: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct lconv { - pub decimal_point: *mut ::std::os::raw::c_char, - pub thousands_sep: *mut ::std::os::raw::c_char, - pub grouping: *mut ::std::os::raw::c_char, - pub int_curr_symbol: *mut ::std::os::raw::c_char, - pub currency_symbol: *mut ::std::os::raw::c_char, - pub mon_decimal_point: *mut ::std::os::raw::c_char, - pub mon_thousands_sep: *mut ::std::os::raw::c_char, - pub mon_grouping: *mut ::std::os::raw::c_char, - pub positive_sign: *mut ::std::os::raw::c_char, - pub negative_sign: *mut ::std::os::raw::c_char, - pub int_frac_digits: ::std::os::raw::c_char, - pub frac_digits: ::std::os::raw::c_char, - pub p_cs_precedes: ::std::os::raw::c_char, - pub p_sep_by_space: ::std::os::raw::c_char, - pub n_cs_precedes: ::std::os::raw::c_char, - pub n_sep_by_space: ::std::os::raw::c_char, - pub p_sign_posn: ::std::os::raw::c_char, - pub n_sign_posn: ::std::os::raw::c_char, - pub int_p_cs_precedes: ::std::os::raw::c_char, - pub int_p_sep_by_space: ::std::os::raw::c_char, - pub int_n_cs_precedes: ::std::os::raw::c_char, - pub int_n_sep_by_space: ::std::os::raw::c_char, - pub int_p_sign_posn: ::std::os::raw::c_char, - pub int_n_sign_posn: ::std::os::raw::c_char, -} -extern "C" { - pub fn setlocale( - __category: ::std::os::raw::c_int, - __locale: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn localeconv() -> *mut lconv; -} -extern "C" { - pub fn newlocale( - __category_mask: ::std::os::raw::c_int, - __locale: *const ::std::os::raw::c_char, - __base: locale_t, - ) -> locale_t; -} -extern "C" { - pub fn duplocale(__dataset: locale_t) -> locale_t; -} -extern "C" { - pub fn freelocale(__dataset: locale_t); -} -extern "C" { - pub fn uselocale(__dataset: locale_t) -> locale_t; -} -extern "C" { - pub fn evalexp( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - ) -> intmax_t; -} -extern "C" { - pub fn make_command_string(arg1: *mut COMMAND) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn named_function_string( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut COMMAND, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn print_command(arg1: *mut COMMAND); -} -extern "C" { - pub fn print_simple_command(arg1: *mut SIMPLE_COM); -} -extern "C" { - pub fn print_word_list(arg1: *mut WORD_LIST, arg2: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn print_for_command_head(arg1: *mut FOR_COM); -} -extern "C" { - pub fn print_select_command_head(arg1: *mut SELECT_COM); -} -extern "C" { - pub fn print_case_command_head(arg1: *mut CASE_COM); -} -extern "C" { - pub fn print_arith_command(arg1: *mut WORD_LIST); -} -extern "C" { - pub fn print_cond_command(arg1: *mut COND_COM); -} -extern "C" { - pub fn xtrace_init(); -} -extern "C" { - pub fn xtrace_fdchk(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn xtrace_reset(); -} -extern "C" { - pub fn indirection_level_string() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn xtrace_print_assignment( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn xtrace_print_word_list(arg1: *mut WORD_LIST, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn xtrace_print_for_command_head(arg1: *mut FOR_COM); -} -extern "C" { - pub fn xtrace_print_select_command_head(arg1: *mut SELECT_COM); -} -extern "C" { - pub fn xtrace_print_case_command_head(arg1: *mut CASE_COM); -} -extern "C" { - pub fn xtrace_print_arith_cmd(arg1: *mut WORD_LIST); -} -extern "C" { - pub fn xtrace_print_cond_term( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: *mut WORD_DESC, - arg4: *mut ::std::os::raw::c_char, - arg5: *mut ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn exit_shell(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn sh_exit(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn subshell_exit(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn set_exit_status(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn disable_priv_mode(); -} -extern "C" { - pub fn unbind_args(); -} -extern "C" { - pub fn shell_is_restricted(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn maybe_make_restricted(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unset_bash_input(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn get_current_user_info(); -} -extern "C" { - pub fn reader_loop() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pretty_print_loop() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn parse_command() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn read_command() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn brace_expand(arg1: *mut ::std::os::raw::c_char) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn yyparse() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn return_EOF() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn push_token(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn xparse_dolparen( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn reset_parser(); -} -extern "C" { - pub fn reset_readahead_token(); -} -extern "C" { - pub fn parse_string_to_word_list( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - ) -> *mut WORD_LIST; -} -extern "C" { - pub fn parser_will_prompt() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn parser_in_command_position() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn free_pushed_string_input(); -} -extern "C" { - pub fn parser_expanding_alias() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn parser_save_alias(); -} -extern "C" { - pub fn parser_restore_alias(); -} -extern "C" { - pub fn clear_shell_input_line(); -} -extern "C" { - pub fn decode_prompt_string(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_current_prompt_level() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_current_prompt_level(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn history_delimiting_chars( - arg1: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn set_default_locale(); -} -extern "C" { - pub fn set_default_locale_vars(); -} -extern "C" { - pub fn set_locale_var( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_lang( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_default_lang(); -} -extern "C" { - pub fn get_locale_var(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn localetrans( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn mk_msgstr( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn localeexpand( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn locale_decpoint() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn list_walk(arg1: *mut GENERIC_LIST, arg2: sh_glist_func_t); -} -extern "C" { - pub fn wlist_walk(arg1: *mut WORD_LIST, arg2: sh_icpfunc_t); -} -extern "C" { - pub fn list_reverse() -> *mut GENERIC_LIST; -} -extern "C" { - pub fn list_length() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn list_append() -> *mut GENERIC_LIST; -} -extern "C" { - pub fn list_remove() -> *mut GENERIC_LIST; -} -extern "C" { - pub fn find_string_in_alist( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut STRING_INT_ALIST, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn find_token_in_alist( - arg1: ::std::os::raw::c_int, - arg2: *mut STRING_INT_ALIST, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn find_index_in_alist( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut STRING_INT_ALIST, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn substring( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strsub( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strcreplace( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strip_leading(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn strip_trailing( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn xbcopy( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn shell_version_string() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn show_shell_version(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn sh_modcase( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_clk_tck() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn clock_t_to_secs(); -} -extern "C" { - pub fn print_clock_t(); -} -extern "C" { - pub fn fmtulong( - arg1: ::std::os::raw::c_ulong, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - arg4: usize, - arg5: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fmtullong( - arg1: ::std::os::raw::c_ulonglong, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - arg4: usize, - arg5: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fmtumax( - arg1: uintmax_t, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - arg4: usize, - arg5: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fnx_fromfs( - arg1: *mut ::std::os::raw::c_char, - arg2: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fnx_tofs(arg1: *mut ::std::os::raw::c_char, arg2: usize) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn input_avail(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn inttostr( - arg1: intmax_t, - arg2: *mut ::std::os::raw::c_char, - arg3: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn itos(arg1: intmax_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn mitos(arg1: intmax_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn uinttostr( - arg1: uintmax_t, - arg2: *mut ::std::os::raw::c_char, - arg3: usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn uitos(arg1: uintmax_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_makepath( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn mbscasecmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn mbschr( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn mbscmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn isnetconn(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn netopen(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getmaxgroups() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getmaxchild() -> ::std::os::raw::c_long; -} -extern "C" { - pub fn sh_canonpath( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_physpath( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_realpath( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn brand() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sbrand(arg1: ::std::os::raw::c_ulong); -} -extern "C" { - pub fn seedrand(); -} -extern "C" { - pub fn seedrand32(); -} -extern "C" { - pub fn get_urandom32() -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn sh_eaccess( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_regmatch( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mbstrlen(arg1: *const ::std::os::raw::c_char) -> usize; -} -extern "C" { - pub fn mbsmbchar(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_mbsnlen( - arg1: *const ::std::os::raw::c_char, - arg2: usize, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_single_quote(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_double_quote(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_mkdoublequoted( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_un_double_quote(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_backslash_quote( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_backslash_quote_for_double_quotes( - arg1: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_quote_reusable( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_contains_shell_metas(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_contains_quotes(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn spname( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dirspell(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _list_of_strings { - pub list: *mut *mut ::std::os::raw::c_char, - pub list_size: ::std::os::raw::c_int, - pub list_len: ::std::os::raw::c_int, -} -pub type STRINGLIST = _list_of_strings; -pub type sh_strlist_map_func_t = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn strlist_create(arg1: ::std::os::raw::c_int) -> *mut STRINGLIST; -} -extern "C" { - pub fn strlist_resize(arg1: *mut STRINGLIST, arg2: ::std::os::raw::c_int) -> *mut STRINGLIST; -} -extern "C" { - pub fn strlist_flush(arg1: *mut STRINGLIST); -} -extern "C" { - pub fn strlist_dispose(arg1: *mut STRINGLIST); -} -extern "C" { - pub fn strlist_remove( - arg1: *mut STRINGLIST, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strlist_copy(arg1: *mut STRINGLIST) -> *mut STRINGLIST; -} -extern "C" { - pub fn strlist_merge(arg1: *mut STRINGLIST, arg2: *mut STRINGLIST) -> *mut STRINGLIST; -} -extern "C" { - pub fn strlist_append(arg1: *mut STRINGLIST, arg2: *mut STRINGLIST) -> *mut STRINGLIST; -} -extern "C" { - pub fn strlist_prefix_suffix( - arg1: *mut STRINGLIST, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - ) -> *mut STRINGLIST; -} -extern "C" { - pub fn strlist_print(arg1: *mut STRINGLIST, arg2: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn strlist_walk(arg1: *mut STRINGLIST, arg2: sh_strlist_map_func_t); -} -extern "C" { - pub fn strlist_sort(arg1: *mut STRINGLIST); -} -extern "C" { - pub fn strvec_create(arg1: ::std::os::raw::c_int) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strvec_resize( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strvec_mcreate(arg1: ::std::os::raw::c_int) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strvec_mresize( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strvec_flush(arg1: *mut *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn strvec_dispose(arg1: *mut *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn strvec_remove( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strvec_len(arg1: *mut *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strvec_search( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strvec_copy(arg1: *mut *mut ::std::os::raw::c_char) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strvec_posixcmp( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strvec_strcmp( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn strvec_sort(arg1: *mut *mut ::std::os::raw::c_char, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn strvec_from_word_list( - arg1: *mut WORD_LIST, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strvec_to_word_list( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut WORD_LIST; -} -extern "C" { - pub fn ansicstr( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - arg5: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ansic_quote( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ansic_shouldquote(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ansiexpand( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn timeval_to_secs(); -} -extern "C" { - pub fn print_timeval(); -} -extern "C" { - pub fn sh_mktmpname( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_mktmpfd( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_mktmpdir( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn uconvert( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_long, - arg3: *mut ::std::os::raw::c_long, - arg4: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn falarm( - arg1: ::std::os::raw::c_uint, - arg2: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn fsleep( - arg1: ::std::os::raw::c_uint, - arg2: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_uint; -} -extern "C" { - pub fn u32cconv( - arg1: ::std::os::raw::c_ulong, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn u32reset(); -} -extern "C" { - pub fn utf8_mbschr( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn utf8_mbscmp( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn utf8_mbsmbchar(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn utf8_mbsnlen( - arg1: *const ::std::os::raw::c_char, - arg2: usize, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn utf8_mblen(arg1: *const ::std::os::raw::c_char, arg2: usize) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn utf8_mbstrlen(arg1: *const ::std::os::raw::c_char) -> usize; -} -extern "C" { - pub fn wcsnwidth( - arg1: *const wchar_t, - arg2: usize, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn get_new_window_size( - arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn zcatfd( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn zgetline( - arg1: ::std::os::raw::c_int, - arg2: *mut *mut ::std::os::raw::c_char, - arg3: *mut usize, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - ) -> isize; -} -extern "C" { - pub fn zmapfd( - arg1: ::std::os::raw::c_int, - arg2: *mut *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn zread( - arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - arg3: usize, - ) -> isize; -} -extern "C" { - pub fn zreadretry( - arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - arg3: usize, - ) -> isize; -} -extern "C" { - pub fn zreadintr( - arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - arg3: usize, - ) -> isize; -} -extern "C" { - pub fn zreadc(arg1: ::std::os::raw::c_int, arg2: *mut ::std::os::raw::c_char) -> isize; -} -extern "C" { - pub fn zreadcintr(arg1: ::std::os::raw::c_int, arg2: *mut ::std::os::raw::c_char) -> isize; -} -extern "C" { - pub fn zreadn( - arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - arg3: usize, - ) -> isize; -} -extern "C" { - pub fn zreset(); -} -extern "C" { - pub fn zsyncfd(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn zwrite( - arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - arg3: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn match_pattern_char( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn umatchlen(arg1: *mut ::std::os::raw::c_char, arg2: usize) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn match_pattern_wchar( - arg1: *mut wchar_t, - arg2: *mut wchar_t, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wmatchlen(arg1: *mut wchar_t, arg2: usize) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bucket_contents { - pub next: *mut bucket_contents, - pub key: *mut ::std::os::raw::c_char, - pub data: *mut ::std::os::raw::c_void, - pub khash: ::std::os::raw::c_uint, - pub times_found: ::std::os::raw::c_int, -} -pub type BUCKET_CONTENTS = bucket_contents; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct hash_table { - pub bucket_array: *mut *mut BUCKET_CONTENTS, - pub nbuckets: ::std::os::raw::c_int, - pub nentries: ::std::os::raw::c_int, -} -pub type HASH_TABLE = hash_table; -pub type hash_wfunc = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut BUCKET_CONTENTS) -> ::std::os::raw::c_int, ->; -extern "C" { - pub fn hash_create(arg1: ::std::os::raw::c_int) -> *mut HASH_TABLE; -} -extern "C" { - pub fn hash_copy(arg1: *mut HASH_TABLE, arg2: sh_string_func_t) -> *mut HASH_TABLE; -} -extern "C" { - pub fn hash_flush(arg1: *mut HASH_TABLE, arg2: sh_free_func_t); -} -extern "C" { - pub fn hash_dispose(arg1: *mut HASH_TABLE); -} -extern "C" { - pub fn hash_walk(arg1: *mut HASH_TABLE, arg2: hash_wfunc); -} -extern "C" { - pub fn hash_bucket( - arg1: *const ::std::os::raw::c_char, - arg2: *mut HASH_TABLE, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hash_size(arg1: *mut HASH_TABLE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn hash_search( - arg1: *const ::std::os::raw::c_char, - arg2: *mut HASH_TABLE, - arg3: ::std::os::raw::c_int, - ) -> *mut BUCKET_CONTENTS; -} -extern "C" { - pub fn hash_insert( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut HASH_TABLE, - arg3: ::std::os::raw::c_int, - ) -> *mut BUCKET_CONTENTS; -} -extern "C" { - pub fn hash_remove( - arg1: *const ::std::os::raw::c_char, - arg2: *mut HASH_TABLE, - arg3: ::std::os::raw::c_int, - ) -> *mut BUCKET_CONTENTS; -} -extern "C" { - pub fn assoc_dispose(arg1: *mut HASH_TABLE); -} -extern "C" { - pub fn assoc_flush(arg1: *mut HASH_TABLE); -} -extern "C" { - pub fn assoc_insert( - arg1: *mut HASH_TABLE, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn assoc_replace( - arg1: *mut HASH_TABLE, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn assoc_remove(arg1: *mut HASH_TABLE, arg2: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn assoc_reference( - arg1: *mut HASH_TABLE, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn assoc_subrange( - arg1: *mut HASH_TABLE, - arg2: arrayind_t, - arg3: arrayind_t, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn assoc_patsub( - arg1: *mut HASH_TABLE, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn assoc_modcase( - arg1: *mut HASH_TABLE, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn assoc_quote(arg1: *mut HASH_TABLE) -> *mut HASH_TABLE; -} -extern "C" { - pub fn assoc_quote_escapes(arg1: *mut HASH_TABLE) -> *mut HASH_TABLE; -} -extern "C" { - pub fn assoc_dequote(arg1: *mut HASH_TABLE) -> *mut HASH_TABLE; -} -extern "C" { - pub fn assoc_dequote_escapes(arg1: *mut HASH_TABLE) -> *mut HASH_TABLE; -} -extern "C" { - pub fn assoc_remove_quoted_nulls(arg1: *mut HASH_TABLE) -> *mut HASH_TABLE; -} -extern "C" { - pub fn assoc_to_kvpair( - arg1: *mut HASH_TABLE, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn assoc_to_assign( - arg1: *mut HASH_TABLE, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn assoc_to_word_list(arg1: *mut HASH_TABLE) -> *mut WORD_LIST; -} -extern "C" { - pub fn assoc_keys_to_word_list(arg1: *mut HASH_TABLE) -> *mut WORD_LIST; -} -extern "C" { - pub fn assoc_to_string( - arg1: *mut HASH_TABLE, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct var_context { - pub name: *mut ::std::os::raw::c_char, - pub scope: ::std::os::raw::c_int, - pub flags: ::std::os::raw::c_int, - pub up: *mut var_context, - pub down: *mut var_context, - pub table: *mut HASH_TABLE, -} -pub type VAR_CONTEXT = var_context; -pub type sh_var_value_func_t = - ::core::option::Option *mut variable>; -pub type sh_var_assign_func_t = ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut variable, - arg2: *mut ::std::os::raw::c_char, - arg3: arrayind_t, - arg4: *mut ::std::os::raw::c_char, - ) -> *mut variable, ->; -#[repr(C)] -#[derive(Copy, Clone)] -pub union _value { - pub s: *mut ::std::os::raw::c_char, - pub i: intmax_t, - pub f: *mut COMMAND, - pub a: *mut ARRAY, - pub h: *mut HASH_TABLE, - pub d: f64, - pub ld: f64, - pub v: *mut variable, - pub opaque: *mut ::std::os::raw::c_void, - _bindgen_union_align: [u8; 16usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct variable { - pub name: *mut ::std::os::raw::c_char, - pub value: *mut ::std::os::raw::c_char, - pub exportstr: *mut ::std::os::raw::c_char, - pub dynamic_value: sh_var_value_func_t, - pub assign_func: sh_var_assign_func_t, - pub attributes: ::std::os::raw::c_int, - pub context: ::std::os::raw::c_int, -} -pub type SHELL_VAR = variable; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _vlist { - pub list: *mut *mut SHELL_VAR, - pub list_size: usize, - pub list_len: usize, -} -pub type VARLIST = _vlist; -extern "C" { - #[link_name = "\u{1}nameref_invalid_value"] - pub static mut nameref_invalid_value: SHELL_VAR; -} -pub type sh_var_map_func_t = - ::core::option::Option ::std::os::raw::c_int>; -extern "C" { - #[link_name = "\u{1}global_variables"] - pub static mut global_variables: *mut VAR_CONTEXT; -} -extern "C" { - #[link_name = "\u{1}shell_variables"] - pub static mut shell_variables: *mut VAR_CONTEXT; -} -extern "C" { - #[link_name = "\u{1}shell_functions"] - pub static mut shell_functions: *mut HASH_TABLE; -} -extern "C" { - #[link_name = "\u{1}temporary_env"] - pub static mut temporary_env: *mut HASH_TABLE; -} -extern "C" { - #[link_name = "\u{1}variable_context"] - pub static mut variable_context: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}dollar_vars"] - pub static mut dollar_vars: [*mut ::std::os::raw::c_char; 0usize]; -} -extern "C" { - #[link_name = "\u{1}export_env"] - pub static mut export_env: *mut *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}tempenv_assign_error"] - pub static mut tempenv_assign_error: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}array_needs_making"] - pub static mut array_needs_making: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}shell_level"] - pub static mut shell_level: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}rest_of_args"] - pub static mut rest_of_args: *mut WORD_LIST; -} -extern "C" { - #[link_name = "\u{1}posparam_count"] - pub static mut posparam_count: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}dollar_dollar_pid"] - pub static mut dollar_dollar_pid: pid_t; -} -extern "C" { - #[link_name = "\u{1}localvar_inherit"] - pub static mut localvar_inherit: ::std::os::raw::c_int; -} -extern "C" { - pub fn initialize_shell_variables( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn validate_inherited_value( - arg1: *mut SHELL_VAR, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_if_not( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn sh_set_lines_and_columns(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn set_pwd(); -} -extern "C" { - pub fn set_ppid(); -} -extern "C" { - pub fn make_funcname_visible(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn var_lookup( - arg1: *const ::std::os::raw::c_char, - arg2: *mut VAR_CONTEXT, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_function(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_function_def(arg1: *const ::std::os::raw::c_char) -> *mut FUNCTION_DEF; -} -extern "C" { - pub fn find_variable(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_variable_noref(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_variable_last_nameref( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_global_variable_last_nameref( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_variable_nameref(arg1: *mut SHELL_VAR) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_variable_nameref_for_create( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_variable_nameref_for_assignment( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_variable_tempenv(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_variable_notempenv(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_global_variable(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_global_variable_noref(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_shell_variable(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_tempenv_variable(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_variable_no_invisible(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_variable_for_assignment(arg1: *const ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn nameref_transform_name( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn copy_variable(arg1: *mut SHELL_VAR) -> *mut SHELL_VAR; -} -extern "C" { - pub fn make_local_variable( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn bind_variable( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn bind_global_variable( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn bind_function(arg1: *const ::std::os::raw::c_char, arg2: *mut COMMAND) - -> *mut SHELL_VAR; -} -extern "C" { - pub fn bind_function_def( - arg1: *const ::std::os::raw::c_char, - arg2: *mut FUNCTION_DEF, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn map_over(arg1: sh_var_map_func_t, arg2: *mut VAR_CONTEXT) -> *mut *mut SHELL_VAR; -} -extern "C" { - pub fn map_over_funcs(arg1: sh_var_map_func_t) -> *mut *mut SHELL_VAR; -} -extern "C" { - pub fn all_shell_variables() -> *mut *mut SHELL_VAR; -} -extern "C" { - pub fn all_shell_functions() -> *mut *mut SHELL_VAR; -} -extern "C" { - pub fn all_visible_variables() -> *mut *mut SHELL_VAR; -} -extern "C" { - pub fn all_visible_functions() -> *mut *mut SHELL_VAR; -} -extern "C" { - pub fn all_exported_variables() -> *mut *mut SHELL_VAR; -} -extern "C" { - pub fn local_exported_variables() -> *mut *mut SHELL_VAR; -} -extern "C" { - pub fn all_local_variables(arg1: ::std::os::raw::c_int) -> *mut *mut SHELL_VAR; -} -extern "C" { - pub fn all_array_variables() -> *mut *mut SHELL_VAR; -} -extern "C" { - pub fn all_variables_matching_prefix( - arg1: *const ::std::os::raw::c_char, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn make_var_array(arg1: *mut HASH_TABLE) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn add_or_supercede_exported_var( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_variable_value(arg1: *mut SHELL_VAR) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_string_value(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sh_get_env_value(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn make_variable_value( - arg1: *mut SHELL_VAR, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bind_variable_value( - arg1: *mut SHELL_VAR, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn bind_int_variable( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn bind_var_to_int(arg1: *mut ::std::os::raw::c_char, arg2: intmax_t) -> *mut SHELL_VAR; -} -extern "C" { - pub fn assign_in_env( - arg1: *mut WORD_DESC, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unbind_variable(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn check_unbind_variable(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unbind_nameref(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unbind_variable_noref(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unbind_func(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unbind_function_def(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn delete_var( - arg1: *const ::std::os::raw::c_char, - arg2: *mut VAR_CONTEXT, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn makunbound( - arg1: *const ::std::os::raw::c_char, - arg2: *mut VAR_CONTEXT, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn kill_local_variable(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn delete_all_variables(arg1: *mut HASH_TABLE); -} -extern "C" { - pub fn delete_all_contexts(arg1: *mut VAR_CONTEXT); -} -extern "C" { - pub fn new_var_context( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut VAR_CONTEXT; -} -extern "C" { - pub fn dispose_var_context(arg1: *mut VAR_CONTEXT); -} -extern "C" { - pub fn push_var_context( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut HASH_TABLE, - ) -> *mut VAR_CONTEXT; -} -extern "C" { - pub fn pop_var_context(); -} -extern "C" { - pub fn push_scope(arg1: ::std::os::raw::c_int, arg2: *mut HASH_TABLE) -> *mut VAR_CONTEXT; -} -extern "C" { - pub fn pop_scope(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn clear_dollar_vars(); -} -extern "C" { - pub fn push_context( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut HASH_TABLE, - ); -} -extern "C" { - pub fn pop_context(); -} -extern "C" { - pub fn push_dollar_vars(); -} -extern "C" { - pub fn pop_dollar_vars(); -} -extern "C" { - pub fn dispose_saved_dollar_vars(); -} -extern "C" { - pub fn init_bash_argv(); -} -extern "C" { - pub fn save_bash_argv(); -} -extern "C" { - pub fn push_args(arg1: *mut WORD_LIST); -} -extern "C" { - pub fn pop_args(); -} -extern "C" { - pub fn adjust_shell_level(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn non_unsettable(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn dispose_variable(arg1: *mut SHELL_VAR); -} -extern "C" { - pub fn dispose_used_env_vars(); -} -extern "C" { - pub fn dispose_function_env(); -} -extern "C" { - pub fn dispose_builtin_env(); -} -extern "C" { - pub fn merge_temporary_env(); -} -extern "C" { - pub fn flush_temporary_env(); -} -extern "C" { - pub fn merge_builtin_env(); -} -extern "C" { - pub fn kill_all_local_variables(); -} -extern "C" { - pub fn set_var_read_only(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn set_func_read_only(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn set_var_auto_export(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn set_func_auto_export(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn sort_variables(arg1: *mut *mut SHELL_VAR); -} -extern "C" { - pub fn chkexport(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn maybe_make_export_env(); -} -extern "C" { - pub fn update_export_env_inplace( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn put_command_name_into_env(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn put_gnu_argv_flags_into_env(arg1: intmax_t, arg2: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn print_var_list(arg1: *mut *mut SHELL_VAR); -} -extern "C" { - pub fn print_func_list(arg1: *mut *mut SHELL_VAR); -} -extern "C" { - pub fn print_assignment(arg1: *mut SHELL_VAR); -} -extern "C" { - pub fn print_var_value(arg1: *mut SHELL_VAR, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn print_var_function(arg1: *mut SHELL_VAR); -} -extern "C" { - pub fn make_new_array_variable(arg1: *mut ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn make_local_array_variable( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn make_new_assoc_variable(arg1: *mut ::std::os::raw::c_char) -> *mut SHELL_VAR; -} -extern "C" { - pub fn make_local_assoc_variable( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn set_pipestatus_array(arg1: *mut ::std::os::raw::c_int, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn save_pipestatus_array() -> *mut ARRAY; -} -extern "C" { - pub fn restore_pipestatus_array(arg1: *mut ARRAY); -} -extern "C" { - pub fn set_pipestatus_from_exit(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn stupidly_hack_special_variables(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn reinit_special_variables(); -} -extern "C" { - pub fn get_random_number() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sv_ifs(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_path(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_mail(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_funcnest(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_execignore(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_globignore(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_ignoreeof(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_strict_posix(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_optind(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_opterr(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_locale(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_xtracefd(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_shcompat(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_comp_wordbreaks(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_terminal(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_hostfile(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_winsize(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_histsize(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_histignore(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_history_control(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_histchars(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_histtimefmt(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_tz(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sv_childmax(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - #[link_name = "\u{1}assoc_expand_once"] - pub static mut assoc_expand_once: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}array_expand_once"] - pub static mut array_expand_once: ::std::os::raw::c_int; -} -extern "C" { - pub fn convert_var_to_array(arg1: *mut SHELL_VAR) -> *mut SHELL_VAR; -} -extern "C" { - pub fn convert_var_to_assoc(arg1: *mut SHELL_VAR) -> *mut SHELL_VAR; -} -extern "C" { - pub fn make_array_variable_value( - arg1: *mut SHELL_VAR, - arg2: arrayind_t, - arg3: *mut ::std::os::raw::c_char, - arg4: *mut ::std::os::raw::c_char, - arg5: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bind_array_variable( - arg1: *mut ::std::os::raw::c_char, - arg2: arrayind_t, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn bind_array_element( - arg1: *mut SHELL_VAR, - arg2: arrayind_t, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn assign_array_element( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn bind_assoc_variable( - arg1: *mut SHELL_VAR, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - arg4: *mut ::std::os::raw::c_char, - arg5: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn find_or_make_array_variable( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn assign_array_from_string( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn assign_array_var_from_word_list( - arg1: *mut SHELL_VAR, - arg2: *mut WORD_LIST, - arg3: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn expand_compound_array_assignment( - arg1: *mut SHELL_VAR, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut WORD_LIST; -} -extern "C" { - pub fn assign_compound_array_list( - arg1: *mut SHELL_VAR, - arg2: *mut WORD_LIST, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn assign_array_var_from_string( - arg1: *mut SHELL_VAR, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn expand_and_quote_assoc_word( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn quote_compound_array_list(arg1: *mut WORD_LIST, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn kvpair_assignment_p(arg1: *mut WORD_LIST) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn expand_and_quote_kvpair_word( - arg1: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn unbind_array_element( - arg1: *mut SHELL_VAR, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn skipsubscript( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn print_array_assignment(arg1: *mut SHELL_VAR, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn print_assoc_assignment(arg1: *mut SHELL_VAR, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn array_expand_index( - arg1: *mut SHELL_VAR, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> arrayind_t; -} -extern "C" { - pub fn valid_array_reference( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn array_value( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - arg5: *mut arrayind_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_array_value( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut arrayind_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_keys( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_variable_name( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut ::std::os::raw::c_char, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn array_variable_part( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut ::std::os::raw::c_char, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn redirection_error( - arg1: *mut REDIRECT, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn do_redirections( - arg1: *mut REDIRECT, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn redirection_expand(arg1: *mut WORD_DESC) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn stdin_redirects(arg1: *mut REDIRECT) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}remember_on_history"] - pub static mut remember_on_history: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}enable_history_list"] - pub static mut enable_history_list: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}literal_history"] - pub static mut literal_history: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}force_append_history"] - pub static mut force_append_history: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}history_lines_this_session"] - pub static mut history_lines_this_session: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}history_lines_in_file"] - pub static mut history_lines_in_file: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}history_expansion"] - pub static mut history_expansion: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}history_control"] - pub static mut history_control: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}command_oriented_history"] - pub static mut command_oriented_history: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}current_command_first_line_saved"] - pub static mut current_command_first_line_saved: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}current_command_first_line_comment"] - pub static mut current_command_first_line_comment: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}hist_last_line_added"] - pub static mut hist_last_line_added: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}hist_last_line_pushed"] - pub static mut hist_last_line_pushed: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}dont_save_function_defs"] - pub static mut dont_save_function_defs: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}hist_verify"] - pub static mut hist_verify: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}history_expansion_inhibited"] - pub static mut history_expansion_inhibited: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}double_quotes_inhibit_history_expansion"] - pub static mut double_quotes_inhibit_history_expansion: ::std::os::raw::c_int; -} -extern "C" { - pub fn bash_initialize_history(); -} -extern "C" { - pub fn bash_history_reinit(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn bash_history_disable(); -} -extern "C" { - pub fn bash_history_enable(); -} -extern "C" { - pub fn bash_clear_history(); -} -extern "C" { - pub fn bash_delete_histent(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bash_delete_history_range( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bash_delete_last_history() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn load_history(); -} -extern "C" { - pub fn save_history(); -} -extern "C" { - pub fn maybe_append_history(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn maybe_save_shell_history() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn pre_process_line( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn maybe_add_history(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn bash_add_history(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn check_add_history( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn history_number() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setup_history_ignore(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn last_history_line() -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct compspec { - pub refcount: ::std::os::raw::c_int, - pub actions: ::std::os::raw::c_ulong, - pub options: ::std::os::raw::c_ulong, - pub globpat: *mut ::std::os::raw::c_char, - pub words: *mut ::std::os::raw::c_char, - pub prefix: *mut ::std::os::raw::c_char, - pub suffix: *mut ::std::os::raw::c_char, - pub funcname: *mut ::std::os::raw::c_char, - pub command: *mut ::std::os::raw::c_char, - pub lcommand: *mut ::std::os::raw::c_char, - pub filterpat: *mut ::std::os::raw::c_char, -} -pub type COMPSPEC = compspec; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _list_of_items { - pub flags: ::std::os::raw::c_int, - pub list_getter: ::core::option::Option< - unsafe extern "C" fn(arg1: *mut _list_of_items) -> ::std::os::raw::c_int, - >, - pub slist: *mut STRINGLIST, - pub genlist: *mut STRINGLIST, - pub genindex: ::std::os::raw::c_int, -} -pub type ITEMLIST = _list_of_items; -extern "C" { - #[link_name = "\u{1}prog_completes"] - pub static mut prog_completes: *mut HASH_TABLE; -} -extern "C" { - #[link_name = "\u{1}pcomp_line"] - pub static mut pcomp_line: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}pcomp_ind"] - pub static mut pcomp_ind: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}prog_completion_enabled"] - pub static mut prog_completion_enabled: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}progcomp_alias"] - pub static mut progcomp_alias: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}it_aliases"] - pub static mut it_aliases: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_arrayvars"] - pub static mut it_arrayvars: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_bindings"] - pub static mut it_bindings: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_builtins"] - pub static mut it_builtins: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_commands"] - pub static mut it_commands: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_directories"] - pub static mut it_directories: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_disabled"] - pub static mut it_disabled: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_enabled"] - pub static mut it_enabled: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_exports"] - pub static mut it_exports: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_files"] - pub static mut it_files: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_functions"] - pub static mut it_functions: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_groups"] - pub static mut it_groups: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_helptopics"] - pub static mut it_helptopics: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_hostnames"] - pub static mut it_hostnames: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_jobs"] - pub static mut it_jobs: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_keywords"] - pub static mut it_keywords: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_running"] - pub static mut it_running: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_services"] - pub static mut it_services: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_setopts"] - pub static mut it_setopts: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_shopts"] - pub static mut it_shopts: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_signals"] - pub static mut it_signals: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_stopped"] - pub static mut it_stopped: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_users"] - pub static mut it_users: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}it_variables"] - pub static mut it_variables: ITEMLIST; -} -extern "C" { - #[link_name = "\u{1}pcomp_curcs"] - pub static mut pcomp_curcs: *mut COMPSPEC; -} -extern "C" { - #[link_name = "\u{1}pcomp_curcmd"] - pub static mut pcomp_curcmd: *const ::std::os::raw::c_char; -} -extern "C" { - pub fn compspec_create() -> *mut COMPSPEC; -} -extern "C" { - pub fn compspec_dispose(arg1: *mut COMPSPEC); -} -extern "C" { - pub fn compspec_copy(arg1: *mut COMPSPEC) -> *mut COMPSPEC; -} -extern "C" { - pub fn progcomp_create(); -} -extern "C" { - pub fn progcomp_flush(); -} -extern "C" { - pub fn progcomp_dispose(); -} -extern "C" { - pub fn progcomp_size() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn progcomp_insert( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut COMPSPEC, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn progcomp_remove(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn progcomp_search(arg1: *const ::std::os::raw::c_char) -> *mut COMPSPEC; -} -extern "C" { - pub fn progcomp_walk(arg1: hash_wfunc); -} -extern "C" { - pub fn set_itemlist_dirty(arg1: *mut ITEMLIST); -} -extern "C" { - pub fn completions_to_stringlist(arg1: *mut *mut ::std::os::raw::c_char) -> *mut STRINGLIST; -} -extern "C" { - pub fn gen_compspec_completions( - arg1: *mut COMPSPEC, - arg2: *const ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_int, - ) -> *mut STRINGLIST; -} -extern "C" { - pub fn programmable_completions( - arg1: *const ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn pcomp_set_readline_variables(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn pcomp_set_compspec_options( - arg1: *mut COMPSPEC, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ); -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _G_fpos_t { - pub __pos: __off_t, - pub __state: __mbstate_t, -} -pub type __fpos_t = _G_fpos_t; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct _G_fpos64_t { - pub __pos: __off64_t, - pub __state: __mbstate_t, -} -pub type __fpos64_t = _G_fpos64_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_marker { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_codecvt { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_wide_data { - _unused: [u8; 0], -} -pub type _IO_lock_t = ::std::os::raw::c_void; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_FILE { - pub _flags: ::std::os::raw::c_int, - pub _IO_read_ptr: *mut ::std::os::raw::c_char, - pub _IO_read_end: *mut ::std::os::raw::c_char, - pub _IO_read_base: *mut ::std::os::raw::c_char, - pub _IO_write_base: *mut ::std::os::raw::c_char, - pub _IO_write_ptr: *mut ::std::os::raw::c_char, - pub _IO_write_end: *mut ::std::os::raw::c_char, - pub _IO_buf_base: *mut ::std::os::raw::c_char, - pub _IO_buf_end: *mut ::std::os::raw::c_char, - pub _IO_save_base: *mut ::std::os::raw::c_char, - pub _IO_backup_base: *mut ::std::os::raw::c_char, - pub _IO_save_end: *mut ::std::os::raw::c_char, - pub _markers: *mut _IO_marker, - pub _chain: *mut _IO_FILE, - pub _fileno: ::std::os::raw::c_int, - pub _flags2: ::std::os::raw::c_int, - pub _old_offset: __off_t, - pub _cur_column: ::std::os::raw::c_ushort, - pub _vtable_offset: ::std::os::raw::c_schar, - pub _shortbuf: [::std::os::raw::c_char; 1usize], - pub _lock: *mut _IO_lock_t, - pub _offset: __off64_t, - pub _codecvt: *mut _IO_codecvt, - pub _wide_data: *mut _IO_wide_data, - pub _freeres_list: *mut _IO_FILE, - pub _freeres_buf: *mut ::std::os::raw::c_void, - pub __pad5: usize, - pub _mode: ::std::os::raw::c_int, - pub _unused2: [::std::os::raw::c_char; 20usize], -} -pub type cookie_read_function_t = ::core::option::Option< - unsafe extern "C" fn( - __cookie: *mut ::std::os::raw::c_void, - __buf: *mut ::std::os::raw::c_char, - __nbytes: usize, - ) -> __ssize_t, ->; -pub type cookie_write_function_t = ::core::option::Option< - unsafe extern "C" fn( - __cookie: *mut ::std::os::raw::c_void, - __buf: *const ::std::os::raw::c_char, - __nbytes: usize, - ) -> __ssize_t, ->; -pub type cookie_seek_function_t = ::core::option::Option< - unsafe extern "C" fn( - __cookie: *mut ::std::os::raw::c_void, - __pos: *mut __off64_t, - __w: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, ->; -pub type cookie_close_function_t = ::core::option::Option< - unsafe extern "C" fn(__cookie: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int, ->; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _IO_cookie_io_functions_t { - pub read: cookie_read_function_t, - pub write: cookie_write_function_t, - pub seek: cookie_seek_function_t, - pub close: cookie_close_function_t, -} -pub type cookie_io_functions_t = _IO_cookie_io_functions_t; -pub type fpos_t = __fpos_t; -pub type fpos64_t = __fpos64_t; -extern "C" { - #[link_name = "\u{1}stdin"] - pub static mut stdin: *mut FILE; -} -extern "C" { - #[link_name = "\u{1}stdout"] - pub static mut stdout: *mut FILE; -} -extern "C" { - #[link_name = "\u{1}stderr"] - pub static mut stderr: *mut FILE; -} -extern "C" { - pub fn remove(__filename: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rename( - __old: *const ::std::os::raw::c_char, - __new: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn renameat( - __oldfd: ::std::os::raw::c_int, - __old: *const ::std::os::raw::c_char, - __newfd: ::std::os::raw::c_int, - __new: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn renameat2( - __oldfd: ::std::os::raw::c_int, - __old: *const ::std::os::raw::c_char, - __newfd: ::std::os::raw::c_int, - __new: *const ::std::os::raw::c_char, - __flags: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tmpfile() -> *mut FILE; -} -extern "C" { - pub fn tmpfile64() -> *mut FILE; -} -extern "C" { - pub fn tmpnam(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn tmpnam_r(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn tempnam( - __dir: *const ::std::os::raw::c_char, - __pfx: *const ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fclose(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fflush(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fflush_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fcloseall() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fopen( - __filename: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn freopen( - __filename: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - __stream: *mut FILE, - ) -> *mut FILE; -} -extern "C" { - pub fn fopen64( - __filename: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn freopen64( - __filename: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - __stream: *mut FILE, - ) -> *mut FILE; -} -extern "C" { - pub fn fdopen(__fd: ::std::os::raw::c_int, __modes: *const ::std::os::raw::c_char) - -> *mut FILE; -} -extern "C" { - pub fn fopencookie( - __magic_cookie: *mut ::std::os::raw::c_void, - __modes: *const ::std::os::raw::c_char, - __io_funcs: cookie_io_functions_t, - ) -> *mut FILE; -} -extern "C" { - pub fn fmemopen( - __s: *mut ::std::os::raw::c_void, - __len: usize, - __modes: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn open_memstream( - __bufloc: *mut *mut ::std::os::raw::c_char, - __sizeloc: *mut usize, - ) -> *mut FILE; -} -extern "C" { - pub fn setbuf(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn setvbuf( - __stream: *mut FILE, - __buf: *mut ::std::os::raw::c_char, - __modes: ::std::os::raw::c_int, - __n: usize, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setbuffer(__stream: *mut FILE, __buf: *mut ::std::os::raw::c_char, __size: usize); -} -extern "C" { - pub fn setlinebuf(__stream: *mut FILE); -} -extern "C" { - pub fn fprintf( - __stream: *mut FILE, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn printf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sprintf( - __s: *mut ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vfprintf( - __s: *mut FILE, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vprintf( - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsprintf( - __s: *mut ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn snprintf( - __s: *mut ::std::os::raw::c_char, - __maxlen: usize, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsnprintf( - __s: *mut ::std::os::raw::c_char, - __maxlen: usize, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vasprintf( - __ptr: *mut *mut ::std::os::raw::c_char, - __f: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __asprintf( - __ptr: *mut *mut ::std::os::raw::c_char, - __fmt: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn asprintf( - __ptr: *mut *mut ::std::os::raw::c_char, - __fmt: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vdprintf( - __fd: ::std::os::raw::c_int, - __fmt: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dprintf( - __fd: ::std::os::raw::c_int, - __fmt: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fscanf( - __stream: *mut FILE, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn scanf(__format: *const ::std::os::raw::c_char, ...) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sscanf( - __s: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vfscanf( - __s: *mut FILE, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vscanf( - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vsscanf( - __s: *const ::std::os::raw::c_char, - __format: *const ::std::os::raw::c_char, - __arg: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgetc(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getc(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getchar() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getchar_unlocked() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgetc_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fputc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putchar(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fputc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putc_unlocked(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putchar_unlocked(__c: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getw(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn putw(__w: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fgets( - __s: *mut ::std::os::raw::c_char, - __n: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fgets_unlocked( - __s: *mut ::std::os::raw::c_char, - __n: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn __getdelim( - __lineptr: *mut *mut ::std::os::raw::c_char, - __n: *mut usize, - __delimiter: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> __ssize_t; -} -extern "C" { - pub fn getdelim( - __lineptr: *mut *mut ::std::os::raw::c_char, - __n: *mut usize, - __delimiter: ::std::os::raw::c_int, - __stream: *mut FILE, - ) -> __ssize_t; -} -extern "C" { - pub fn getline( - __lineptr: *mut *mut ::std::os::raw::c_char, - __n: *mut usize, - __stream: *mut FILE, - ) -> __ssize_t; -} -extern "C" { - pub fn fputs(__s: *const ::std::os::raw::c_char, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn puts(__s: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ungetc(__c: ::std::os::raw::c_int, __stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fread( - __ptr: *mut ::std::os::raw::c_void, - __size: usize, - __n: usize, - __stream: *mut FILE, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn fwrite( - __ptr: *const ::std::os::raw::c_void, - __size: usize, - __n: usize, - __s: *mut FILE, - ) -> ::std::os::raw::c_ulong; -} -extern "C" { - pub fn fputs_unlocked( - __s: *const ::std::os::raw::c_char, - __stream: *mut FILE, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fread_unlocked( - __ptr: *mut ::std::os::raw::c_void, - __size: usize, - __n: usize, - __stream: *mut FILE, - ) -> usize; -} -extern "C" { - pub fn fwrite_unlocked( - __ptr: *const ::std::os::raw::c_void, - __size: usize, - __n: usize, - __stream: *mut FILE, - ) -> usize; -} -extern "C" { - pub fn fseek( - __stream: *mut FILE, - __off: ::std::os::raw::c_long, - __whence: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftell(__stream: *mut FILE) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn rewind(__stream: *mut FILE); -} -extern "C" { - pub fn fseeko( - __stream: *mut FILE, - __off: __off_t, - __whence: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftello(__stream: *mut FILE) -> __off_t; -} -extern "C" { - pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fseeko64( - __stream: *mut FILE, - __off: __off64_t, - __whence: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ftello64(__stream: *mut FILE) -> __off64_t; -} -extern "C" { - pub fn fgetpos64(__stream: *mut FILE, __pos: *mut fpos64_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fsetpos64(__stream: *mut FILE, __pos: *const fpos64_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clearerr(__stream: *mut FILE); -} -extern "C" { - pub fn feof(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ferror(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clearerr_unlocked(__stream: *mut FILE); -} -extern "C" { - pub fn feof_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ferror_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn perror(__s: *const ::std::os::raw::c_char); -} -extern "C" { - #[link_name = "\u{1}sys_nerr"] - pub static mut sys_nerr: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}sys_errlist"] - pub static mut sys_errlist: [*const ::std::os::raw::c_char; 0usize]; -} -extern "C" { - #[link_name = "\u{1}_sys_nerr"] - pub static mut _sys_nerr: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}_sys_errlist"] - pub static mut _sys_errlist: [*const ::std::os::raw::c_char; 0usize]; -} -extern "C" { - pub fn fileno(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fileno_unlocked(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn popen( - __command: *const ::std::os::raw::c_char, - __modes: *const ::std::os::raw::c_char, - ) -> *mut FILE; -} -extern "C" { - pub fn pclose(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ctermid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn cuserid(__s: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct obstack { - _unused: [u8; 0], -} -extern "C" { - pub fn obstack_printf( - __obstack: *mut obstack, - __format: *const ::std::os::raw::c_char, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn obstack_vprintf( - __obstack: *mut obstack, - __format: *const ::std::os::raw::c_char, - __args: *mut __va_list_tag, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn flockfile(__stream: *mut FILE); -} -extern "C" { - pub fn ftrylockfile(__stream: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn funlockfile(__stream: *mut FILE); -} -extern "C" { - pub fn __uflow(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __overflow(arg1: *mut FILE, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn r_execute_cmd() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn r_execute_cmd2(l: *mut WORD_LIST) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}hashed_filenames"] - pub static mut hashed_filenames: *mut HASH_TABLE; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _pathdata { - pub path: *mut ::std::os::raw::c_char, - pub flags: ::std::os::raw::c_int, -} -pub type PATH_DATA = _pathdata; -extern "C" { - pub fn phash_create(); -} -extern "C" { - pub fn phash_flush(); -} -extern "C" { - pub fn phash_insert( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn phash_remove(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn phash_search(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct alias { - pub name: *mut ::std::os::raw::c_char, - pub value: *mut ::std::os::raw::c_char, - pub flags: ::std::os::raw::c_char, -} -pub type alias_t = alias; -extern "C" { - #[link_name = "\u{1}aliases"] - pub static mut aliases: *mut HASH_TABLE; -} -extern "C" { - pub fn initialize_aliases(); -} -extern "C" { - pub fn find_alias(arg1: *mut ::std::os::raw::c_char) -> *mut alias_t; -} -extern "C" { - pub fn get_alias_value(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn add_alias(arg1: *mut ::std::os::raw::c_char, arg2: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn remove_alias(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn delete_all_aliases(); -} -extern "C" { - pub fn all_aliases() -> *mut *mut alias_t; -} -extern "C" { - pub fn alias_expand_word(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn alias_expand(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn clear_string_list_expander(arg1: *mut alias_t); -} -extern "C" { - #[link_name = "\u{1}noglob_dot_filenames"] - pub static mut noglob_dot_filenames: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}glob_error_return"] - pub static mut glob_error_return: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}glob_dot_filenames"] - pub static mut glob_dot_filenames: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}extended_glob"] - pub static mut extended_glob: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}glob_star"] - pub static mut glob_star: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}match_ignore_case"] - pub static mut match_ignore_case: ::std::os::raw::c_int; -} -extern "C" { - pub fn unquoted_glob_pattern_p(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn quote_string_for_globbing( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn glob_char_p(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn quote_globbing_chars(arg1: *const ::std::os::raw::c_char) - -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn shell_glob_filename( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ign { - pub val: *mut ::std::os::raw::c_char, - pub len: ::std::os::raw::c_int, - pub flags: ::std::os::raw::c_int, -} -pub type sh_iv_item_func_t = - ::core::option::Option ::std::os::raw::c_int>; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ignorevar { - pub varname: *mut ::std::os::raw::c_char, - pub ignores: *mut ign, - pub num_ignores: ::std::os::raw::c_int, - pub last_ignoreval: *mut ::std::os::raw::c_char, - pub item_func: sh_iv_item_func_t, -} -extern "C" { - pub fn setup_ignore_patterns(arg1: *mut ignorevar); -} -extern "C" { - pub fn setup_glob_ignore(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn should_ignore_glob_matches() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ignore_glob_matches(arg1: *mut *mut ::std::os::raw::c_char); -} -extern "C" { - #[link_name = "\u{1}bash_readline_initialized"] - pub static mut bash_readline_initialized: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}hostname_list_initialized"] - pub static mut hostname_list_initialized: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}perform_hostname_completion"] - pub static mut perform_hostname_completion: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}no_empty_command_completion"] - pub static mut no_empty_command_completion: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}force_fignore"] - pub static mut force_fignore: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}dircomplete_spelling"] - pub static mut dircomplete_spelling: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}dircomplete_expand"] - pub static mut dircomplete_expand: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}dircomplete_expand_relpath"] - pub static mut dircomplete_expand_relpath: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}complete_fullquote"] - pub static mut complete_fullquote: ::std::os::raw::c_int; -} -extern "C" { - pub fn posix_readline_initialize(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn reset_completer_word_break_chars(); -} -extern "C" { - pub fn enable_hostname_completion(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn initialize_readline(); -} -extern "C" { - pub fn bashline_reset(); -} -extern "C" { - pub fn bashline_reinitialize(); -} -extern "C" { - pub fn bash_re_edit(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bashline_set_event_hook(); -} -extern "C" { - pub fn bashline_reset_event_hook(); -} -extern "C" { - pub fn bind_keyseq_to_unix_command(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bash_execute_unix_command( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn print_unix_command_map() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unbind_unix_command(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn bash_default_completion( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn set_directory_hook(); -} -extern "C" { - pub fn command_word_completion_function( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bash_groupname_completion_function( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bash_servicename_completion_function( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_hostname_list() -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn clear_hostname_list(); -} -extern "C" { - pub fn bash_directory_completion_matches( - arg1: *const ::std::os::raw::c_char, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn bash_dequote_text(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -pub type tilde_hook_func_t = ::core::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char, ->; -extern "C" { - #[link_name = "\u{1}tilde_expansion_preexpansion_hook"] - pub static mut tilde_expansion_preexpansion_hook: tilde_hook_func_t; -} -extern "C" { - #[link_name = "\u{1}tilde_expansion_failure_hook"] - pub static mut tilde_expansion_failure_hook: tilde_hook_func_t; -} -extern "C" { - #[link_name = "\u{1}tilde_additional_prefixes"] - pub static mut tilde_additional_prefixes: *mut *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}tilde_additional_suffixes"] - pub static mut tilde_additional_suffixes: *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn tilde_expand(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn tilde_expand_word(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn tilde_find_word( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct flags_alist { - pub name: ::std::os::raw::c_char, - pub value: *mut ::std::os::raw::c_int, -} -extern "C" { - #[link_name = "\u{1}shell_flags"] - pub static mut shell_flags: [flags_alist; 0usize]; -} -extern "C" { - #[link_name = "\u{1}optflags"] - pub static mut optflags: [::std::os::raw::c_char; 0usize]; -} -extern "C" { - #[link_name = "\u{1}mark_modified_vars"] - pub static mut mark_modified_vars: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}errexit_flag"] - pub static mut errexit_flag: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}exit_immediately_on_error"] - pub static mut exit_immediately_on_error: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}disallow_filename_globbing"] - pub static mut disallow_filename_globbing: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}place_keywords_in_env"] - pub static mut place_keywords_in_env: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}read_but_dont_execute"] - pub static mut read_but_dont_execute: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}just_one_command"] - pub static mut just_one_command: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}unbound_vars_is_error"] - pub static mut unbound_vars_is_error: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}echo_input_at_read"] - pub static mut echo_input_at_read: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}verbose_flag"] - pub static mut verbose_flag: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}echo_command_at_execute"] - pub static mut echo_command_at_execute: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}noclobber"] - pub static mut noclobber: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}hashing_enabled"] - pub static mut hashing_enabled: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}forced_interactive"] - pub static mut forced_interactive: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}privileged_mode"] - pub static mut privileged_mode: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}jobs_m_flag"] - pub static mut jobs_m_flag: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}asynchronous_notification"] - pub static mut asynchronous_notification: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}interactive_comments"] - pub static mut interactive_comments: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}no_symbolic_links"] - pub static mut no_symbolic_links: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}function_trace_mode"] - pub static mut function_trace_mode: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}error_trace_mode"] - pub static mut error_trace_mode: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}pipefail_opt"] - pub static mut pipefail_opt: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}want_pending_command"] - pub static mut want_pending_command: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}read_from_stdin"] - pub static mut read_from_stdin: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}brace_expansion"] - pub static mut brace_expansion: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}histexp_flag"] - pub static mut histexp_flag: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}restricted"] - pub static mut restricted: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}restricted_shell"] - pub static mut restricted_shell: ::std::os::raw::c_int; -} -extern "C" { - pub fn find_flag(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_int; -} -extern "C" { - pub fn change_flag( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn which_set_flags() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn reset_shell_flags(); -} -extern "C" { - pub fn get_current_flags() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn set_current_flags(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn initialize_flags(); -} -extern "C" { - pub fn de_backslash(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn unquote_bang(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn extract_command_subst( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn extract_arithmetic_subst( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn extract_process_subst( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn assignment_name(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn string_list_internal( - arg1: *mut WORD_LIST, - arg2: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn string_list(arg1: *mut WORD_LIST) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn string_list_dollar_star( - arg1: *mut WORD_LIST, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn string_list_dollar_at( - arg1: *mut WORD_LIST, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn string_list_pos_params( - arg1: ::std::os::raw::c_int, - arg2: *mut WORD_LIST, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn word_list_remove_quoted_nulls(arg1: *mut WORD_LIST); -} -extern "C" { - pub fn list_string( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut WORD_LIST; -} -extern "C" { - pub fn ifs_firstchar(arg1: *mut ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_word_from_string( - arg1: *mut *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strip_trailing_ifs_whitespace( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn do_assignment(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn do_assignment_no_expand(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn do_word_assignment( - arg1: *mut WORD_DESC, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sub_append_string( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut usize, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn sub_append_number( - arg1: intmax_t, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_int, - arg4: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn list_rest_of_args() -> *mut WORD_LIST; -} -extern "C" { - pub fn string_rest_of_args(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn expand_string_unsplit( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut WORD_LIST; -} -extern "C" { - pub fn expand_string_assignment( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut WORD_LIST; -} -extern "C" { - pub fn expand_prompt_string( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut WORD_LIST; -} -extern "C" { - pub fn expand_string( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut WORD_LIST; -} -extern "C" { - pub fn expand_string_to_string( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn expand_string_unsplit_to_string( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn expand_assignment_string_to_string( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn expand_arith_string( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn dequote_string(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn dequote_escapes(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn dequote_word(arg1: *mut WORD_DESC) -> *mut WORD_DESC; -} -extern "C" { - pub fn dequote_list(arg1: *mut WORD_LIST) -> *mut WORD_LIST; -} -extern "C" { - pub fn expand_word(arg1: *mut WORD_DESC, arg2: ::std::os::raw::c_int) -> *mut WORD_LIST; -} -extern "C" { - pub fn expand_word_unsplit(arg1: *mut WORD_DESC, arg2: ::std::os::raw::c_int) - -> *mut WORD_LIST; -} -extern "C" { - pub fn expand_word_leave_quoted( - arg1: *mut WORD_DESC, - arg2: ::std::os::raw::c_int, - ) -> *mut WORD_LIST; -} -extern "C" { - pub fn get_dollar_var_value(arg1: intmax_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn quote_string(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn quote_escapes(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn remove_quoted_escapes(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn remove_quoted_nulls(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn string_quote_removal( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn word_quote_removal(arg1: *mut WORD_DESC, arg2: ::std::os::raw::c_int) -> *mut WORD_DESC; -} -extern "C" { - pub fn word_list_quote_removal( - arg1: *mut WORD_LIST, - arg2: ::std::os::raw::c_int, - ) -> *mut WORD_LIST; -} -extern "C" { - pub fn setifs(arg1: *mut SHELL_VAR); -} -extern "C" { - pub fn getifs() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn word_split(arg1: *mut WORD_DESC, arg2: *mut ::std::os::raw::c_char) -> *mut WORD_LIST; -} -extern "C" { - pub fn expand_words(arg1: *mut WORD_LIST) -> *mut WORD_LIST; -} -extern "C" { - pub fn expand_words_no_vars(arg1: *mut WORD_LIST) -> *mut WORD_LIST; -} -extern "C" { - pub fn expand_words_shellexp(arg1: *mut WORD_LIST) -> *mut WORD_LIST; -} -extern "C" { - pub fn command_substitute( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut WORD_DESC; -} -extern "C" { - pub fn pat_subst( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn fifos_pending() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn num_fifos() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unlink_fifo_list(); -} -extern "C" { - pub fn unlink_all_fifos(); -} -extern "C" { - pub fn unlink_fifo(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn copy_fifo_list(arg1: *mut ::std::os::raw::c_int) -> *mut ::std::os::raw::c_void; -} -extern "C" { - pub fn close_new_fifos(arg1: *mut ::std::os::raw::c_void, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn clear_fifo_list(); -} -extern "C" { - pub fn find_procsub_child(arg1: pid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_procsub_status( - arg1: ::std::os::raw::c_int, - arg2: pid_t, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn wait_procsubs(); -} -extern "C" { - pub fn reap_procsubs(); -} -extern "C" { - pub fn list_string_with_quotes(arg1: *mut ::std::os::raw::c_char) -> *mut WORD_LIST; -} -extern "C" { - pub fn extract_array_assignment_list( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn remove_backslashes(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn cond_expand_word( - arg1: *mut WORD_DESC, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn skip_to_delim( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn skip_to_histexp( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn char_is_quoted( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unclosed_pair( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn split_at_delims( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - arg5: ::std::os::raw::c_int, - arg6: *mut ::std::os::raw::c_int, - arg7: *mut ::std::os::raw::c_int, - ) -> *mut WORD_LIST; -} -extern "C" { - #[link_name = "\u{1}ifs_var"] - pub static mut ifs_var: *mut SHELL_VAR; -} -extern "C" { - #[link_name = "\u{1}ifs_value"] - pub static mut ifs_value: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}ifs_cmap"] - pub static mut ifs_cmap: [::std::os::raw::c_uchar; 0usize]; -} -extern "C" { - #[link_name = "\u{1}ifs_is_set"] - pub static mut ifs_is_set: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}ifs_is_null"] - pub static mut ifs_is_null: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}ifs_firstc"] - pub static mut ifs_firstc: [::std::os::raw::c_uchar; 0usize]; -} -extern "C" { - #[link_name = "\u{1}ifs_firstc_len"] - pub static mut ifs_firstc_len: usize; -} -extern "C" { - #[link_name = "\u{1}assigning_in_environment"] - pub static mut assigning_in_environment: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}expanding_redir"] - pub static mut expanding_redir: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}inherit_errexit"] - pub static mut inherit_errexit: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}last_command_subst_pid"] - pub static mut last_command_subst_pid: pid_t; -} -extern "C" { - pub fn invalidate_cached_quoted_dollar_at(); -} -extern "C" { - pub fn time_to_check_mail() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn reset_mail_timer(); -} -extern "C" { - pub fn reset_mail_files(); -} -extern "C" { - pub fn free_mail_files(); -} -extern "C" { - pub fn make_default_mailpath() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn remember_mail_dates(); -} -extern "C" { - pub fn init_mail_dates(); -} -extern "C" { - pub fn check_mail(); -} -extern "C" { - pub fn wait(__stat_loc: *mut ::std::os::raw::c_int) -> __pid_t; -} -extern "C" { - pub fn waitpid( - __pid: __pid_t, - __stat_loc: *mut ::std::os::raw::c_int, - __options: ::std::os::raw::c_int, - ) -> __pid_t; -} -extern "C" { - pub fn waitid( - __idtype: idtype_t, - __id: __id_t, - __infop: *mut siginfo_t, - __options: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wait3( - __stat_loc: *mut ::std::os::raw::c_int, - __options: ::std::os::raw::c_int, - __usage: *mut rusage, - ) -> __pid_t; -} -extern "C" { - pub fn wait4( - __pid: __pid_t, - __stat_loc: *mut ::std::os::raw::c_int, - __options: ::std::os::raw::c_int, - __usage: *mut rusage, - ) -> __pid_t; -} -pub type WAIT = ::std::os::raw::c_int; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct process { - pub next: *mut process, - pub pid: pid_t, - pub status: WAIT, - pub running: ::std::os::raw::c_int, - pub command: *mut ::std::os::raw::c_char, -} -pub type PROCESS = process; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pipeline_saver { - pub pipeline: *mut process, - pub next: *mut pipeline_saver, -} -#[no_mangle] -pub static mut wait_intr_flag: ::std::os::raw::c_int = 0; -pub const JOB_STATE_JNONE: JOB_STATE = -1; -pub const JOB_STATE_JRUNNING: JOB_STATE = 1; -pub const JOB_STATE_JSTOPPED: JOB_STATE = 2; -pub const JOB_STATE_JDEAD: JOB_STATE = 4; -pub const JOB_STATE_JMIXED: JOB_STATE = 8; -pub type JOB_STATE = i32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct job { - pub wd: *mut ::std::os::raw::c_char, - pub pipe: *mut PROCESS, - pub pgrp: pid_t, - pub state: JOB_STATE, - pub flags: ::std::os::raw::c_int, - pub deferred: *mut COMMAND, - pub j_cleanup: sh_vptrfunc_t, - pub cleanarg: *mut ::std::os::raw::c_void, -} -pub type JOB = job; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct jobstats { - pub c_childmax: ::std::os::raw::c_long, - pub c_living: ::std::os::raw::c_int, - pub c_reaped: ::std::os::raw::c_int, - pub c_injobs: ::std::os::raw::c_int, - pub c_totforked: ::std::os::raw::c_int, - pub c_totreaped: ::std::os::raw::c_int, - pub j_jobslots: ::std::os::raw::c_int, - pub j_lastj: ::std::os::raw::c_int, - pub j_firstj: ::std::os::raw::c_int, - pub j_njobs: ::std::os::raw::c_int, - pub j_ndead: ::std::os::raw::c_int, - pub j_current: ::std::os::raw::c_int, - pub j_previous: ::std::os::raw::c_int, - pub j_lastmade: *mut JOB, - pub j_lastasync: *mut JOB, -} -pub type ps_index_t = pid_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct pidstat { - pub bucket_next: ps_index_t, - pub bucket_prev: ps_index_t, - pub pid: pid_t, - pub status: ::std::os::raw::c_short, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct bgpids { - pub storage: *mut pidstat, - pub head: ps_index_t, - pub nalloc: ps_index_t, - pub npid: ::std::os::raw::c_int, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct procstat { - pub pid: pid_t, - pub status: ::std::os::raw::c_short, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct procchain { - pub head: *mut PROCESS, - pub end: *mut PROCESS, - pub nproc: ::std::os::raw::c_int, -} -extern "C" { - #[link_name = "\u{1}js"] - pub static mut js: jobstats; -} -extern "C" { - #[link_name = "\u{1}original_pgrp"] - pub static mut original_pgrp: pid_t; -} -extern "C" { - #[link_name = "\u{1}shell_pgrp"] - pub static mut shell_pgrp: pid_t; -} -extern "C" { - #[link_name = "\u{1}pipeline_pgrp"] - pub static mut pipeline_pgrp: pid_t; -} -extern "C" { - #[link_name = "\u{1}last_made_pid"] - pub static mut last_made_pid: pid_t; -} -extern "C" { - #[link_name = "\u{1}last_asynchronous_pid"] - pub static mut last_asynchronous_pid: pid_t; -} -extern "C" { - #[link_name = "\u{1}already_making_children"] - pub static mut already_making_children: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}running_in_background"] - pub static mut running_in_background: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}last_procsub_child"] - pub static mut last_procsub_child: *mut PROCESS; -} -extern "C" { - #[link_name = "\u{1}jobs"] - pub static mut jobs: *mut *mut JOB; -} -extern "C" { - pub fn making_children(); -} -extern "C" { - pub fn stop_making_children(); -} -extern "C" { - pub fn cleanup_the_pipeline(); -} -extern "C" { - pub fn discard_last_procsub_child(); -} -extern "C" { - pub fn save_pipeline(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn restore_pipeline(arg1: ::std::os::raw::c_int) -> *mut PROCESS; -} -extern "C" { - pub fn start_pipeline(); -} -extern "C" { - pub fn stop_pipeline(arg1: ::std::os::raw::c_int, arg2: *mut COMMAND) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn discard_pipeline(arg1: *mut PROCESS) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn append_process( - arg1: *mut ::std::os::raw::c_char, - arg2: pid_t, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn save_proc_status(arg1: pid_t, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn procsub_add(arg1: *mut PROCESS) -> *mut PROCESS; -} -extern "C" { - pub fn procsub_search(arg1: pid_t) -> *mut PROCESS; -} -extern "C" { - pub fn procsub_delete(arg1: pid_t) -> *mut PROCESS; -} -extern "C" { - pub fn procsub_waitpid(arg1: pid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn procsub_waitall(); -} -extern "C" { - pub fn procsub_clear(); -} -extern "C" { - pub fn procsub_prune(); -} -extern "C" { - pub fn delete_job(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn nohup_job(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn delete_all_jobs(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn nohup_all_jobs(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn count_all_jobs() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn terminate_current_pipeline(); -} -extern "C" { - pub fn terminate_stopped_jobs(); -} -extern "C" { - pub fn hangup_all_jobs(); -} -extern "C" { - pub fn kill_current_pipeline(); -} -extern "C" { - pub fn get_job_by_pid( - arg1: pid_t, - arg2: ::std::os::raw::c_int, - arg3: *mut *mut PROCESS, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn describe_pid(arg1: pid_t); -} -extern "C" { - pub fn list_one_job( - arg1: *mut JOB, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn list_all_jobs(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn list_stopped_jobs(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn list_running_jobs(arg1: ::std::os::raw::c_int); -} -// extern "C" { -// pub fn make_child(arg1: *mut ::std::os::raw::c_char, arg2: ::std::os::raw::c_int) -> pid_t; -// } -extern "C" { - pub fn get_tty_state() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_tty_state() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn job_exit_status(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn job_exit_signal(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wait_for_single_pid(arg1: pid_t, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wait_for_background_pids(arg1: *mut procstat); -} -extern "C" { - pub fn wait_for(arg1: pid_t, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wait_for_job( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - arg3: *mut procstat, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wait_for_any_job( - arg1: ::std::os::raw::c_int, - arg2: *mut procstat, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn wait_sigint_cleanup(); -} -extern "C" { - pub fn notify_and_cleanup(); -} -extern "C" { - pub fn reap_dead_jobs(); -} -extern "C" { - pub fn start_job( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn kill_pid( - arg1: pid_t, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn initialize_job_control(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn initialize_job_signals(); -} -extern "C" { - pub fn give_terminal_to(arg1: pid_t, arg2: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn run_sigchld_trap(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn freeze_jobs_list() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unfreeze_jobs_list(); -} -extern "C" { - pub fn set_jobs_list_frozen(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn set_job_control(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn without_job_control(); -} -extern "C" { - pub fn end_job_control(); -} -extern "C" { - pub fn restart_job_control(); -} -extern "C" { - pub fn set_sigchld_handler(); -} -extern "C" { - pub fn ignore_tty_job_signals(); -} -extern "C" { - pub fn default_tty_job_signals(); -} -extern "C" { - pub fn get_original_tty_job_signals(); -} -extern "C" { - pub fn init_job_stats(); -} -extern "C" { - pub fn close_pgrp_pipe(); -} -extern "C" { - pub fn save_pgrp_pipe(arg1: *mut ::std::os::raw::c_int, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn restore_pgrp_pipe(arg1: *mut ::std::os::raw::c_int); -} -extern "C" { - pub fn set_maxchild(arg1: ::std::os::raw::c_int); -} -extern "C" { - #[link_name = "\u{1}job_control"] - pub static mut job_control: ::std::os::raw::c_int; -} -extern "C" { - pub fn file_status(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn executable_file(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn is_directory(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn executable_or_directory(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn find_user_command(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn find_in_path( - arg1: *const ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn find_path_file(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn search_for_command( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn user_command_matches( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn setup_exec_ignore(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - #[link_name = "\u{1}dot_found_in_search"] - pub static mut dot_found_in_search: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}check_hashed_filenames"] - pub static mut check_hashed_filenames: ::std::os::raw::c_int; -} -pub type __jmp_buf = [::std::os::raw::c_long; 8usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __jmp_buf_tag { - pub __jmpbuf: __jmp_buf, - pub __mask_was_saved: ::std::os::raw::c_int, - pub __saved_mask: __sigset_t, -} -pub type jmp_buf = [__jmp_buf_tag; 1usize]; -extern "C" { - pub fn setjmp(__env: *mut __jmp_buf_tag) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __sigsetjmp( - __env: *mut __jmp_buf_tag, - __savemask: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn _setjmp(__env: *mut __jmp_buf_tag) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn longjmp(__env: *mut __jmp_buf_tag, __val: ::std::os::raw::c_int); -} -extern "C" { - pub fn _longjmp(__env: *mut __jmp_buf_tag, __val: ::std::os::raw::c_int); -} -pub type sigjmp_buf = [__jmp_buf_tag; 1usize]; -extern "C" { - pub fn siglongjmp(__env: *mut __jmp_buf_tag, __val: ::std::os::raw::c_int); -} -extern "C" { - #[link_name = "\u{1}top_level"] - pub static mut top_level: sigjmp_buf; -} -extern "C" { - #[link_name = "\u{1}subshell_top_level"] - pub static mut subshell_top_level: sigjmp_buf; -} -extern "C" { - #[link_name = "\u{1}return_catch"] - pub static mut return_catch: sigjmp_buf; -} -extern "C" { - #[link_name = "\u{1}wait_intr_buf"] - pub static mut wait_intr_buf: sigjmp_buf; -} -extern "C" { - #[link_name = "\u{1}no_longjmp_on_fatal_error"] - pub static mut no_longjmp_on_fatal_error: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}sh_syntaxtab"] - pub static mut sh_syntaxtab: [::std::os::raw::c_int; 0usize]; -} -extern "C" { - #[link_name = "\u{1}sh_syntabsiz"] - pub static mut sh_syntabsiz: ::std::os::raw::c_int; -} -extern "C" { - pub fn get_name_for_error() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn file_error(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn programming_error(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn report_error(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn parser_error(arg1: ::std::os::raw::c_int, arg2: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn fatal_error(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn sys_error(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn internal_error(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn internal_warning(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn internal_inform(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn strescape(arg1: *const ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn itrace(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn trace(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn command_error( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn command_errstr(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn err_badarraysub(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn err_unboundvar(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn err_readonly(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn uwp_init(); -} -extern "C" { - pub fn begin_unwind_frame(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn discard_unwind_frame(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn run_unwind_frame(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn add_unwind_protect(); -} -extern "C" { - pub fn remove_unwind_protect(); -} -extern "C" { - pub fn run_unwind_protects(); -} -extern "C" { - pub fn clear_unwind_protect_list(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn have_unwind_protects() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unwind_protect_tag_on_stack( - arg1: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unwind_protect_mem(arg1: *mut ::std::os::raw::c_char, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn dispose_command(arg1: *mut COMMAND); -} -extern "C" { - pub fn dispose_word_desc(arg1: *mut WORD_DESC); -} -extern "C" { - pub fn dispose_word(arg1: *mut WORD_DESC); -} -extern "C" { - pub fn dispose_words(arg1: *mut WORD_LIST); -} -extern "C" { - pub fn dispose_word_array(arg1: *mut *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn dispose_redirects(arg1: *mut REDIRECT); -} -extern "C" { - pub fn dispose_cond_node(arg1: *mut COND_COM); -} -extern "C" { - pub fn dispose_function_def_contents(arg1: *mut FUNCTION_DEF); -} -extern "C" { - pub fn dispose_function_def(arg1: *mut FUNCTION_DEF); -} -extern "C" { - #[link_name = "\u{1}here_doc_first_line"] - pub static mut here_doc_first_line: ::std::os::raw::c_int; -} -extern "C" { - pub fn cmd_init(); -} -extern "C" { - pub fn alloc_word_desc() -> *mut WORD_DESC; -} -extern "C" { - pub fn make_bare_word(arg1: *const ::std::os::raw::c_char) -> *mut WORD_DESC; -} -extern "C" { - pub fn make_word_flags( - arg1: *mut WORD_DESC, - arg2: *const ::std::os::raw::c_char, - ) -> *mut WORD_DESC; -} -extern "C" { - pub fn make_word(arg1: *const ::std::os::raw::c_char) -> *mut WORD_DESC; -} -extern "C" { - pub fn make_word_from_token(arg1: ::std::os::raw::c_int) -> *mut WORD_DESC; -} -extern "C" { - pub fn make_word_list(arg1: *mut WORD_DESC, arg2: *mut WORD_LIST) -> *mut WORD_LIST; -} -extern "C" { - pub fn make_command(arg1: command_type, arg2: *mut SIMPLE_COM) -> *mut COMMAND; -} -extern "C" { - pub fn command_connect( - arg1: *mut COMMAND, - arg2: *mut COMMAND, - arg3: ::std::os::raw::c_int, - ) -> *mut COMMAND; -} -extern "C" { - pub fn make_for_command( - arg1: *mut WORD_DESC, - arg2: *mut WORD_LIST, - arg3: *mut COMMAND, - arg4: ::std::os::raw::c_int, - ) -> *mut COMMAND; -} -extern "C" { - pub fn make_group_command(arg1: *mut COMMAND) -> *mut COMMAND; -} -extern "C" { - pub fn make_case_command( - arg1: *mut WORD_DESC, - arg2: *mut PATTERN_LIST, - arg3: ::std::os::raw::c_int, - ) -> *mut COMMAND; -} -extern "C" { - pub fn make_pattern_list(arg1: *mut WORD_LIST, arg2: *mut COMMAND) -> *mut PATTERN_LIST; -} -extern "C" { - pub fn make_if_command( - arg1: *mut COMMAND, - arg2: *mut COMMAND, - arg3: *mut COMMAND, - ) -> *mut COMMAND; -} -extern "C" { - pub fn make_while_command(arg1: *mut COMMAND, arg2: *mut COMMAND) -> *mut COMMAND; -} -extern "C" { - pub fn make_until_command(arg1: *mut COMMAND, arg2: *mut COMMAND) -> *mut COMMAND; -} -extern "C" { - pub fn make_bare_simple_command() -> *mut COMMAND; -} -extern "C" { - pub fn make_simple_command(arg1: ELEMENT, arg2: *mut COMMAND) -> *mut COMMAND; -} -extern "C" { - pub fn make_here_document(arg1: *mut REDIRECT, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn make_redirection( - arg1: REDIRECTEE, - arg2: r_instruction, - arg3: REDIRECTEE, - arg4: ::std::os::raw::c_int, - ) -> *mut REDIRECT; -} -extern "C" { - pub fn make_function_def( - arg1: *mut WORD_DESC, - arg2: *mut COMMAND, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - ) -> *mut COMMAND; -} -extern "C" { - pub fn clean_simple_command(arg1: *mut COMMAND) -> *mut COMMAND; -} -extern "C" { - pub fn make_arith_command(arg1: *mut WORD_LIST) -> *mut COMMAND; -} -extern "C" { - pub fn make_select_command( - arg1: *mut WORD_DESC, - arg2: *mut WORD_LIST, - arg3: *mut COMMAND, - arg4: ::std::os::raw::c_int, - ) -> *mut COMMAND; -} -extern "C" { - pub fn make_cond_node( - arg1: ::std::os::raw::c_int, - arg2: *mut WORD_DESC, - arg3: *mut COND_COM, - arg4: *mut COND_COM, - ) -> *mut COND_COM; -} -extern "C" { - pub fn make_cond_command(arg1: *mut COND_COM) -> *mut COMMAND; -} -extern "C" { - pub fn make_arith_for_command( - arg1: *mut WORD_LIST, - arg2: *mut COMMAND, - arg3: ::std::os::raw::c_int, - ) -> *mut COMMAND; -} -extern "C" { - pub fn make_subshell_command(arg1: *mut COMMAND) -> *mut COMMAND; -} -extern "C" { - pub fn make_coproc_command( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut COMMAND, - ) -> *mut COMMAND; -} -extern "C" { - pub fn connect_async_list( - arg1: *mut COMMAND, - arg2: *mut COMMAND, - arg3: ::std::os::raw::c_int, - ) -> *mut COMMAND; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct objcache { - pub data: *mut ::std::os::raw::c_void, - pub cs: ::std::os::raw::c_int, - pub nc: ::std::os::raw::c_int, -} -pub type sh_obj_cache_t = objcache; -extern "C" { - #[link_name = "\u{1}EOF_Reached"] - pub static mut EOF_Reached: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}shell_environment"] - pub static mut shell_environment: *mut *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}command_execution_string"] - pub static mut command_execution_string: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}debugging_mode"] - pub static mut debugging_mode: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}executing"] - pub static mut executing: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}login_shell"] - pub static mut login_shell: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}interactive"] - pub static mut interactive: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}interactive_shell"] - pub static mut interactive_shell: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}startup_state"] - pub static mut startup_state: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}reading_shell_script"] - pub static mut reading_shell_script: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}shell_initialized"] - pub static mut shell_initialized: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}rpm_requires"] - pub static mut rpm_requires: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}bash_argv_initialized"] - pub static mut bash_argv_initialized: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}subshell_environment"] - pub static mut subshell_environment: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}current_command_number"] - pub static mut current_command_number: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}indirection_level"] - pub static mut indirection_level: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}shell_compatibility_level"] - pub static mut shell_compatibility_level: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}running_under_emacs"] - pub static mut running_under_emacs: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}posixly_correct"] - pub static mut posixly_correct: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}no_line_editing"] - pub static mut no_line_editing: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}shell_name"] - pub static mut shell_name: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}current_host_name"] - pub static mut current_host_name: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}subshell_argc"] - pub static mut subshell_argc: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}subshell_argv"] - pub static mut subshell_argv: *mut *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}subshell_envp"] - pub static mut subshell_envp: *mut *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}hup_on_exit"] - pub static mut hup_on_exit: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}check_jobs_at_exit"] - pub static mut check_jobs_at_exit: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}autocd"] - pub static mut autocd: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}check_window_size"] - pub static mut check_window_size: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}build_version"] - pub static mut build_version: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}patch_level"] - pub static mut patch_level: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}dist_version"] - pub static mut dist_version: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}release_status"] - pub static mut release_status: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}locale_mb_cur_max"] - pub static mut locale_mb_cur_max: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}locale_utf8locale"] - pub static mut locale_utf8locale: ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct fd_bitmap { - pub size: ::std::os::raw::c_int, - pub bitmap: *mut ::std::os::raw::c_char, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct user_info { - pub uid: uid_t, - pub euid: uid_t, - pub gid: gid_t, - pub egid: gid_t, - pub user_name: *mut ::std::os::raw::c_char, - pub shell: *mut ::std::os::raw::c_char, - pub home_dir: *mut ::std::os::raw::c_char, -} -extern "C" { - #[link_name = "\u{1}current_user"] - pub static mut current_user: user_info; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _sh_parser_state_t { - pub parser_state: ::std::os::raw::c_int, - pub token_state: *mut ::std::os::raw::c_int, - pub token: *mut ::std::os::raw::c_char, - pub token_buffer_size: ::std::os::raw::c_int, - pub input_line_terminator: ::std::os::raw::c_int, - pub eof_encountered: ::std::os::raw::c_int, - pub prompt_string_pointer: *mut *mut ::std::os::raw::c_char, - pub current_command_line_count: ::std::os::raw::c_int, - pub remember_on_history: ::std::os::raw::c_int, - pub history_expansion_inhibited: ::std::os::raw::c_int, - pub last_command_exit_value: ::std::os::raw::c_int, - pub pipestatus: *mut ARRAY, - pub last_shell_builtin: sh_builtin_func_t, - pub this_shell_builtin: sh_builtin_func_t, - pub expand_aliases: ::std::os::raw::c_int, - pub echo_input_at_read: ::std::os::raw::c_int, - pub need_here_doc: ::std::os::raw::c_int, - pub here_doc_first_line: ::std::os::raw::c_int, - pub redir_stack: [*mut REDIRECT; 16usize], -} -pub type sh_parser_state_t = _sh_parser_state_t; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct _sh_input_line_state_t { - pub input_line: *mut ::std::os::raw::c_char, - pub input_line_index: usize, - pub input_line_size: usize, - pub input_line_len: usize, - pub input_property: *mut ::std::os::raw::c_char, - pub input_propsize: usize, -} -pub type sh_input_line_state_t = _sh_input_line_state_t; -extern "C" { - pub fn parser_remaining_input() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn save_parser_state(arg1: *mut sh_parser_state_t) -> *mut sh_parser_state_t; -} -extern "C" { - pub fn restore_parser_state(arg1: *mut sh_parser_state_t); -} -extern "C" { - pub fn save_input_line_state(arg1: *mut sh_input_line_state_t) -> *mut sh_input_line_state_t; -} -extern "C" { - pub fn restore_input_line_state(arg1: *mut sh_input_line_state_t); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct func_array_state { - pub funcname_a: *mut ARRAY, - pub funcname_v: *mut SHELL_VAR, - pub source_a: *mut ARRAY, - pub source_v: *mut SHELL_VAR, - pub lineno_a: *mut ARRAY, - pub lineno_v: *mut SHELL_VAR, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct execstate { - pub pid: pid_t, - pub subshell_env: ::std::os::raw::c_int, -} -extern "C" { - #[link_name = "\u{1}return_catch_flag"] - pub static mut return_catch_flag: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}return_catch_value"] - pub static mut return_catch_value: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}last_command_exit_value"] - pub static mut last_command_exit_value: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}last_command_exit_signal"] - pub static mut last_command_exit_signal: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}builtin_ignoring_errexit"] - pub static mut builtin_ignoring_errexit: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}executing_builtin"] - pub static mut executing_builtin: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}executing_list"] - pub static mut executing_list: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}comsub_ignore_return"] - pub static mut comsub_ignore_return: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}subshell_level"] - pub static mut subshell_level: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}executing_command_builtin"] - pub static mut executing_command_builtin: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}funcnest"] - pub static mut funcnest: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}funcnest_max"] - pub static mut funcnest_max: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}evalnest"] - pub static mut evalnest: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}evalnest_max"] - pub static mut evalnest_max: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}sourcenest"] - pub static mut sourcenest: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}sourcenest_max"] - pub static mut sourcenest_max: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}stdin_redir"] - pub static mut stdin_redir: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}line_number_for_err_trap"] - pub static mut line_number_for_err_trap: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}the_printed_command_except_trap"] - pub static mut the_printed_command_except_trap: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}this_command_name"] - pub static mut this_command_name: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}this_shell_function"] - pub static mut this_shell_function: *mut SHELL_VAR; -} -extern "C" { - pub fn new_fd_bitmap(arg1: ::std::os::raw::c_int) -> *mut fd_bitmap; -} -extern "C" { - pub fn dispose_fd_bitmap(arg1: *mut fd_bitmap); -} -extern "C" { - pub fn close_fd_bitmap(arg1: *mut fd_bitmap); -} -extern "C" { - pub fn executing_line_number() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn execute_command(arg1: *mut COMMAND) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn execute_command_internal( - arg1: *mut COMMAND, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - arg4: ::std::os::raw::c_int, - arg5: *mut fd_bitmap, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn shell_execve( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut *mut ::std::os::raw::c_char, - arg3: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn setup_async_signals(); -} -extern "C" { - pub fn async_redirect_stdin(); -} -extern "C" { - pub fn undo_partial_redirects(); -} -extern "C" { - pub fn dispose_partial_redirects(); -} -extern "C" { - pub fn dispose_exec_redirects(); -} -extern "C" { - pub fn execute_shell_function( - arg1: *mut SHELL_VAR, - arg2: *mut WORD_LIST, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getcoprocbypid(arg1: pid_t) -> *mut coproc; -} -extern "C" { - pub fn getcoprocbyname(arg1: *const ::std::os::raw::c_char) -> *mut coproc; -} -extern "C" { - pub fn coproc_init(arg1: *mut coproc); -} -extern "C" { - pub fn coproc_alloc(arg1: *mut ::std::os::raw::c_char, arg2: pid_t) -> *mut coproc; -} -extern "C" { - pub fn coproc_dispose(arg1: *mut coproc); -} -extern "C" { - pub fn coproc_flush(); -} -extern "C" { - pub fn coproc_close(arg1: *mut coproc); -} -extern "C" { - pub fn coproc_closeall(); -} -extern "C" { - pub fn coproc_reap(); -} -extern "C" { - pub fn coproc_active() -> pid_t; -} -extern "C" { - pub fn coproc_rclose(arg1: *mut coproc, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn coproc_wclose(arg1: *mut coproc, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn coproc_fdclose(arg1: *mut coproc, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn coproc_checkfd(arg1: *mut coproc, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn coproc_fdchk(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn coproc_pidchk(arg1: pid_t, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn coproc_fdsave(arg1: *mut coproc); -} -extern "C" { - pub fn coproc_fdrestore(arg1: *mut coproc); -} -extern "C" { - pub fn coproc_setvars(arg1: *mut coproc); -} -extern "C" { - pub fn coproc_unsetvars(arg1: *mut coproc); -} -extern "C" { - pub fn close_all_files(); -} -extern "C" { - pub fn restore_funcarray_state(arg1: *mut func_array_state); -} -pub type sh_cget_func_t = ::core::option::Option ::std::os::raw::c_int>; -pub type sh_cunget_func_t = ::core::option::Option< - unsafe extern "C" fn(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int, ->; -pub const stream_type_st_none: stream_type = 0; -pub const stream_type_st_stdin: stream_type = 1; -pub const stream_type_st_stream: stream_type = 2; -pub const stream_type_st_string: stream_type = 3; -pub const stream_type_st_bstream: stream_type = 4; -pub type stream_type = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct BSTREAM { - pub b_fd: ::std::os::raw::c_int, - pub b_buffer: *mut ::std::os::raw::c_char, - pub b_size: usize, - pub b_used: usize, - pub b_flag: ::std::os::raw::c_int, - pub b_inputp: usize, -} -pub type BUFFERED_STREAM = BSTREAM; -extern "C" { - #[link_name = "\u{1}default_buffered_input"] - pub static mut default_buffered_input: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}bash_input_fd_changed"] - pub static mut bash_input_fd_changed: ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union INPUT_STREAM { - pub file: *mut FILE, - pub string: *mut ::std::os::raw::c_char, - pub buffered_fd: ::std::os::raw::c_int, - _bindgen_union_align: u64, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct BASH_INPUT { - pub type_: stream_type, - pub name: *mut ::std::os::raw::c_char, - pub location: INPUT_STREAM, - pub getter: sh_cget_func_t, - pub ungetter: sh_cunget_func_t, -} -extern "C" { - #[link_name = "\u{1}bash_input"] - pub static mut bash_input: BASH_INPUT; -} -extern "C" { - pub fn initialize_bash_input(); -} -extern "C" { - pub fn init_yy_io( - arg1: sh_cget_func_t, - arg2: sh_cunget_func_t, - arg3: stream_type, - arg4: *const ::std::os::raw::c_char, - arg5: INPUT_STREAM, - ); -} -extern "C" { - pub fn yy_input_name() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn with_input_from_stdin(); -} -extern "C" { - pub fn with_input_from_string( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn with_input_from_stream(arg1: *mut FILE, arg2: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn push_stream(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn pop_stream(); -} -extern "C" { - pub fn stream_on_stack(arg1: stream_type) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn read_secondary_line(arg1: ::std::os::raw::c_int) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn find_reserved_word(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn gather_here_documents(); -} -extern "C" { - pub fn execute_variable_command( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn save_token_state() -> *mut ::std::os::raw::c_int; -} -extern "C" { - pub fn restore_token_state(arg1: *mut ::std::os::raw::c_int); -} -extern "C" { - pub fn getc_with_restart(arg1: *mut FILE) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ungetc_with_restart( - arg1: ::std::os::raw::c_int, - arg2: *mut FILE, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fd_is_bash_input(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_bash_input_fd(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn save_bash_input( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn check_bash_input(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn duplicate_buffered_stream( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fd_to_buffered_stream(arg1: ::std::os::raw::c_int) -> *mut BUFFERED_STREAM; -} -extern "C" { - pub fn set_buffered_stream( - arg1: ::std::os::raw::c_int, - arg2: *mut BUFFERED_STREAM, - ) -> *mut BUFFERED_STREAM; -} -extern "C" { - pub fn open_buffered_stream(arg1: *mut ::std::os::raw::c_char) -> *mut BUFFERED_STREAM; -} -extern "C" { - pub fn free_buffered_stream(arg1: *mut BUFFERED_STREAM); -} -extern "C" { - pub fn close_buffered_stream(arg1: *mut BUFFERED_STREAM) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn close_buffered_fd(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sync_buffered_stream(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn buffered_getchar() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn buffered_ungetchar(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn with_input_from_buffered_stream( - arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - ); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct builtin { - pub name: *mut ::std::os::raw::c_char, - pub function: sh_builtin_func_t, - pub flags: ::std::os::raw::c_int, - pub long_doc: *const *mut ::std::os::raw::c_char, - pub short_doc: *const ::std::os::raw::c_char, - pub handle: *mut ::std::os::raw::c_char, -} -extern "C" { - #[link_name = "\u{1}num_shell_builtins"] - pub static mut num_shell_builtins: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}static_shell_builtins"] - pub static mut static_shell_builtins: [builtin; 0usize]; -} -extern "C" { - #[link_name = "\u{1}shell_builtins"] - pub static mut shell_builtins: *mut builtin; -} -extern "C" { - #[link_name = "\u{1}current_builtin"] - pub static mut current_builtin: *mut builtin; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct dstack { - pub delimiters: *mut ::std::os::raw::c_char, - pub delimiter_depth: ::std::os::raw::c_int, - pub delimiter_space: ::std::os::raw::c_int, -} -extern "C" { - #[link_name = "\u{1}dstack"] - pub static mut dstack: dstack; -} -extern "C" { - #[link_name = "\u{1}primary_prompt"] - pub static mut primary_prompt: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}secondary_prompt"] - pub static mut secondary_prompt: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}current_prompt_string"] - pub static mut current_prompt_string: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}ps1_prompt"] - pub static mut ps1_prompt: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}ps2_prompt"] - pub static mut ps2_prompt: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}ps0_prompt"] - pub static mut ps0_prompt: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}expand_aliases"] - pub static mut expand_aliases: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}current_command_line_count"] - pub static mut current_command_line_count: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}saved_command_line_count"] - pub static mut saved_command_line_count: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}shell_eof_token"] - pub static mut shell_eof_token: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}current_token"] - pub static mut current_token: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}parser_state"] - pub static mut parser_state: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}need_here_doc"] - pub static mut need_here_doc: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}ignoreeof"] - pub static mut ignoreeof: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}eof_encountered"] - pub static mut eof_encountered: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}eof_encountered_limit"] - pub static mut eof_encountered_limit: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}line_number"] - pub static mut line_number: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}line_number_base"] - pub static mut line_number_base: ::std::os::raw::c_int; -} -pub const yytokentype_IF: yytokentype = 258; -pub const yytokentype_THEN: yytokentype = 259; -pub const yytokentype_ELSE: yytokentype = 260; -pub const yytokentype_ELIF: yytokentype = 261; -pub const yytokentype_FI: yytokentype = 262; -pub const yytokentype_CASE: yytokentype = 263; -pub const yytokentype_ESAC: yytokentype = 264; -pub const yytokentype_FOR: yytokentype = 265; -pub const yytokentype_SELECT: yytokentype = 266; -pub const yytokentype_WHILE: yytokentype = 267; -pub const yytokentype_UNTIL: yytokentype = 268; -pub const yytokentype_DO: yytokentype = 269; -pub const yytokentype_DONE: yytokentype = 270; -pub const yytokentype_FUNCTION: yytokentype = 271; -pub const yytokentype_COPROC: yytokentype = 272; -pub const yytokentype_COND_START: yytokentype = 273; -pub const yytokentype_COND_END: yytokentype = 274; -pub const yytokentype_COND_ERROR: yytokentype = 275; -pub const yytokentype_IN: yytokentype = 276; -pub const yytokentype_BANG: yytokentype = 277; -pub const yytokentype_TIME: yytokentype = 278; -pub const yytokentype_TIMEOPT: yytokentype = 279; -pub const yytokentype_TIMEIGN: yytokentype = 280; -pub const yytokentype_WORD: yytokentype = 281; -pub const yytokentype_ASSIGNMENT_WORD: yytokentype = 282; -pub const yytokentype_REDIR_WORD: yytokentype = 283; -pub const yytokentype_NUMBER: yytokentype = 284; -pub const yytokentype_ARITH_CMD: yytokentype = 285; -pub const yytokentype_ARITH_FOR_EXPRS: yytokentype = 286; -pub const yytokentype_COND_CMD: yytokentype = 287; -pub const yytokentype_AND_AND: yytokentype = 288; -pub const yytokentype_OR_OR: yytokentype = 289; -pub const yytokentype_GREATER_GREATER: yytokentype = 290; -pub const yytokentype_LESS_LESS: yytokentype = 291; -pub const yytokentype_LESS_AND: yytokentype = 292; -pub const yytokentype_LESS_LESS_LESS: yytokentype = 293; -pub const yytokentype_GREATER_AND: yytokentype = 294; -pub const yytokentype_SEMI_SEMI: yytokentype = 295; -pub const yytokentype_SEMI_AND: yytokentype = 296; -pub const yytokentype_SEMI_SEMI_AND: yytokentype = 297; -pub const yytokentype_LESS_LESS_MINUS: yytokentype = 298; -pub const yytokentype_AND_GREATER: yytokentype = 299; -pub const yytokentype_AND_GREATER_GREATER: yytokentype = 300; -pub const yytokentype_LESS_GREATER: yytokentype = 301; -pub const yytokentype_GREATER_BAR: yytokentype = 302; -pub const yytokentype_BAR_AND: yytokentype = 303; -pub const yytokentype_yacc_EOF: yytokentype = 304; -pub type yytokentype = u32; -#[repr(C)] -#[derive(Copy, Clone)] -pub union YYSTYPE { - pub word: *mut WORD_DESC, - pub number: ::std::os::raw::c_int, - pub word_list: *mut WORD_LIST, - pub command: *mut COMMAND, - pub redirect: *mut REDIRECT, - pub element: ELEMENT, - pub pattern: *mut PATTERN_LIST, - _bindgen_union_align: [u64; 2usize], -} -extern "C" { - #[link_name = "\u{1}yylval"] - pub static mut yylval: YYSTYPE; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct flock { - pub l_type: ::std::os::raw::c_short, - pub l_whence: ::std::os::raw::c_short, - pub l_start: __off_t, - pub l_len: __off_t, - pub l_pid: __pid_t, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct flock64 { - pub l_type: ::std::os::raw::c_short, - pub l_whence: ::std::os::raw::c_short, - pub l_start: __off64_t, - pub l_len: __off64_t, - pub l_pid: __pid_t, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct iovec { - pub iov_base: *mut ::std::os::raw::c_void, - pub iov_len: usize, -} -pub const __pid_type_F_OWNER_TID: __pid_type = 0; -pub const __pid_type_F_OWNER_PID: __pid_type = 1; -pub const __pid_type_F_OWNER_PGRP: __pid_type = 2; -pub const __pid_type_F_OWNER_GID: __pid_type = 2; -pub type __pid_type = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct f_owner_ex { - pub type_: __pid_type, - pub pid: __pid_t, -} -#[repr(C)] -#[derive(Debug)] -pub struct file_handle { - pub handle_bytes: ::std::os::raw::c_uint, - pub handle_type: ::std::os::raw::c_int, - pub f_handle: __IncompleteArrayField<::std::os::raw::c_uchar>, -} -extern "C" { - pub fn readahead(__fd: ::std::os::raw::c_int, __offset: __off64_t, __count: usize) - -> __ssize_t; -} -extern "C" { - pub fn sync_file_range( - __fd: ::std::os::raw::c_int, - __offset: __off64_t, - __count: __off64_t, - __flags: ::std::os::raw::c_uint, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn vmsplice( - __fdout: ::std::os::raw::c_int, - __iov: *const iovec, - __count: usize, - __flags: ::std::os::raw::c_uint, - ) -> __ssize_t; -} -extern "C" { - pub fn splice( - __fdin: ::std::os::raw::c_int, - __offin: *mut __off64_t, - __fdout: ::std::os::raw::c_int, - __offout: *mut __off64_t, - __len: usize, - __flags: ::std::os::raw::c_uint, - ) -> __ssize_t; -} -extern "C" { - pub fn tee( - __fdin: ::std::os::raw::c_int, - __fdout: ::std::os::raw::c_int, - __len: usize, - __flags: ::std::os::raw::c_uint, - ) -> __ssize_t; -} -extern "C" { - pub fn fallocate( - __fd: ::std::os::raw::c_int, - __mode: ::std::os::raw::c_int, - __offset: __off_t, - __len: __off_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fallocate64( - __fd: ::std::os::raw::c_int, - __mode: ::std::os::raw::c_int, - __offset: __off64_t, - __len: __off64_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn name_to_handle_at( - __dfd: ::std::os::raw::c_int, - __name: *const ::std::os::raw::c_char, - __handle: *mut file_handle, - __mnt_id: *mut ::std::os::raw::c_int, - __flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn open_by_handle_at( - __mountdirfd: ::std::os::raw::c_int, - __handle: *mut file_handle, - __flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stat { - pub st_dev: __dev_t, - pub st_ino: __ino_t, - pub st_nlink: __nlink_t, - pub st_mode: __mode_t, - pub st_uid: __uid_t, - pub st_gid: __gid_t, - pub __pad0: ::std::os::raw::c_int, - pub st_rdev: __dev_t, - pub st_size: __off_t, - pub st_blksize: __blksize_t, - pub st_blocks: __blkcnt_t, - pub st_atim: timespec, - pub st_mtim: timespec, - pub st_ctim: timespec, - pub __glibc_reserved: [__syscall_slong_t; 3usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct stat64 { - pub st_dev: __dev_t, - pub st_ino: __ino64_t, - pub st_nlink: __nlink_t, - pub st_mode: __mode_t, - pub st_uid: __uid_t, - pub st_gid: __gid_t, - pub __pad0: ::std::os::raw::c_int, - pub st_rdev: __dev_t, - pub st_size: __off_t, - pub st_blksize: __blksize_t, - pub st_blocks: __blkcnt64_t, - pub st_atim: timespec, - pub st_mtim: timespec, - pub st_ctim: timespec, - pub __glibc_reserved: [__syscall_slong_t; 3usize], -} -extern "C" { - pub fn fcntl( - __fd: ::std::os::raw::c_int, - __cmd: ::std::os::raw::c_int, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fcntl64( - __fd: ::std::os::raw::c_int, - __cmd: ::std::os::raw::c_int, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn open( - __file: *const ::std::os::raw::c_char, - __oflag: ::std::os::raw::c_int, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn open64( - __file: *const ::std::os::raw::c_char, - __oflag: ::std::os::raw::c_int, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn openat( - __fd: ::std::os::raw::c_int, - __file: *const ::std::os::raw::c_char, - __oflag: ::std::os::raw::c_int, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn openat64( - __fd: ::std::os::raw::c_int, - __file: *const ::std::os::raw::c_char, - __oflag: ::std::os::raw::c_int, - ... - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn creat(__file: *const ::std::os::raw::c_char, __mode: mode_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn creat64(__file: *const ::std::os::raw::c_char, __mode: mode_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn posix_fadvise( - __fd: ::std::os::raw::c_int, - __offset: off_t, - __len: off_t, - __advise: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn posix_fadvise64( - __fd: ::std::os::raw::c_int, - __offset: off64_t, - __len: off64_t, - __advise: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn posix_fallocate( - __fd: ::std::os::raw::c_int, - __offset: off_t, - __len: off_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn posix_fallocate64( - __fd: ::std::os::raw::c_int, - __offset: off64_t, - __len: off64_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn stat(__file: *const ::std::os::raw::c_char, __buf: *mut stat) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fstat(__fd: ::std::os::raw::c_int, __buf: *mut stat) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn stat64( - __file: *const ::std::os::raw::c_char, - __buf: *mut stat64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fstat64(__fd: ::std::os::raw::c_int, __buf: *mut stat64) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fstatat( - __fd: ::std::os::raw::c_int, - __file: *const ::std::os::raw::c_char, - __buf: *mut stat, - __flag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fstatat64( - __fd: ::std::os::raw::c_int, - __file: *const ::std::os::raw::c_char, - __buf: *mut stat64, - __flag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lstat(__file: *const ::std::os::raw::c_char, __buf: *mut stat) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lstat64( - __file: *const ::std::os::raw::c_char, - __buf: *mut stat64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn chmod(__file: *const ::std::os::raw::c_char, __mode: __mode_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn lchmod(__file: *const ::std::os::raw::c_char, __mode: __mode_t) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fchmod(__fd: ::std::os::raw::c_int, __mode: __mode_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fchmodat( - __fd: ::std::os::raw::c_int, - __file: *const ::std::os::raw::c_char, - __mode: __mode_t, - __flag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn umask(__mask: __mode_t) -> __mode_t; -} -extern "C" { - pub fn getumask() -> __mode_t; -} -extern "C" { - pub fn mkdir(__path: *const ::std::os::raw::c_char, __mode: __mode_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkdirat( - __fd: ::std::os::raw::c_int, - __path: *const ::std::os::raw::c_char, - __mode: __mode_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mknod( - __path: *const ::std::os::raw::c_char, - __mode: __mode_t, - __dev: __dev_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mknodat( - __fd: ::std::os::raw::c_int, - __path: *const ::std::os::raw::c_char, - __mode: __mode_t, - __dev: __dev_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkfifo(__path: *const ::std::os::raw::c_char, __mode: __mode_t) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn mkfifoat( - __fd: ::std::os::raw::c_int, - __path: *const ::std::os::raw::c_char, - __mode: __mode_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn utimensat( - __fd: ::std::os::raw::c_int, - __path: *const ::std::os::raw::c_char, - __times: *const timespec, - __flags: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn futimens(__fd: ::std::os::raw::c_int, __times: *const timespec) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __fxstat( - __ver: ::std::os::raw::c_int, - __fildes: ::std::os::raw::c_int, - __stat_buf: *mut stat, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __xstat( - __ver: ::std::os::raw::c_int, - __filename: *const ::std::os::raw::c_char, - __stat_buf: *mut stat, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __lxstat( - __ver: ::std::os::raw::c_int, - __filename: *const ::std::os::raw::c_char, - __stat_buf: *mut stat, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __fxstatat( - __ver: ::std::os::raw::c_int, - __fildes: ::std::os::raw::c_int, - __filename: *const ::std::os::raw::c_char, - __stat_buf: *mut stat, - __flag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __fxstat64( - __ver: ::std::os::raw::c_int, - __fildes: ::std::os::raw::c_int, - __stat_buf: *mut stat64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __xstat64( - __ver: ::std::os::raw::c_int, - __filename: *const ::std::os::raw::c_char, - __stat_buf: *mut stat64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __lxstat64( - __ver: ::std::os::raw::c_int, - __filename: *const ::std::os::raw::c_char, - __stat_buf: *mut stat64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __fxstatat64( - __ver: ::std::os::raw::c_int, - __fildes: ::std::os::raw::c_int, - __filename: *const ::std::os::raw::c_char, - __stat_buf: *mut stat64, - __flag: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __xmknod( - __ver: ::std::os::raw::c_int, - __path: *const ::std::os::raw::c_char, - __mode: __mode_t, - __dev: *mut __dev_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn __xmknodat( - __ver: ::std::os::raw::c_int, - __fd: ::std::os::raw::c_int, - __path: *const ::std::os::raw::c_char, - __mode: __mode_t, - __dev: *mut __dev_t, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct statx_timestamp { - pub tv_sec: __int64_t, - pub tv_nsec: __uint32_t, - pub __statx_timestamp_pad1: [__int32_t; 1usize], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct statx { - pub stx_mask: __uint32_t, - pub stx_blksize: __uint32_t, - pub stx_attributes: __uint64_t, - pub stx_nlink: __uint32_t, - pub stx_uid: __uint32_t, - pub stx_gid: __uint32_t, - pub stx_mode: __uint16_t, - pub __statx_pad1: [__uint16_t; 1usize], - pub stx_ino: __uint64_t, - pub stx_size: __uint64_t, - pub stx_blocks: __uint64_t, - pub stx_attributes_mask: __uint64_t, - pub stx_atime: statx_timestamp, - pub stx_btime: statx_timestamp, - pub stx_ctime: statx_timestamp, - pub stx_mtime: statx_timestamp, - pub stx_rdev_major: __uint32_t, - pub stx_rdev_minor: __uint32_t, - pub stx_dev_major: __uint32_t, - pub stx_dev_minor: __uint32_t, - pub __statx_pad2: [__uint64_t; 14usize], -} -extern "C" { - pub fn statx( - __dirfd: ::std::os::raw::c_int, - __path: *const ::std::os::raw::c_char, - __flags: ::std::os::raw::c_int, - __mask: ::std::os::raw::c_uint, - __buf: *mut statx, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct timex { - pub modes: ::std::os::raw::c_uint, - pub offset: __syscall_slong_t, - pub freq: __syscall_slong_t, - pub maxerror: __syscall_slong_t, - pub esterror: __syscall_slong_t, - pub status: ::std::os::raw::c_int, - pub constant: __syscall_slong_t, - pub precision: __syscall_slong_t, - pub tolerance: __syscall_slong_t, - pub time: timeval, - pub tick: __syscall_slong_t, - pub ppsfreq: __syscall_slong_t, - pub jitter: __syscall_slong_t, - pub shift: ::std::os::raw::c_int, - pub stabil: __syscall_slong_t, - pub jitcnt: __syscall_slong_t, - pub calcnt: __syscall_slong_t, - pub errcnt: __syscall_slong_t, - pub stbcnt: __syscall_slong_t, - pub tai: ::std::os::raw::c_int, - pub _bitfield_1: [i32;11], -} -// impl timex { -// #[inline] -// pub fn new_bitfield_1() -> __BindgenBitfieldUnit<[u8; 44usize], u8> { -// let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 44usize], u8> = [0; 44]; -// // Default::default(); -// __bindgen_bitfield_unit -// } -// } -extern "C" { - pub fn clock_adjtime(__clock_id: __clockid_t, __utx: *mut timex) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tm { - pub tm_sec: ::std::os::raw::c_int, - pub tm_min: ::std::os::raw::c_int, - pub tm_hour: ::std::os::raw::c_int, - pub tm_mday: ::std::os::raw::c_int, - pub tm_mon: ::std::os::raw::c_int, - pub tm_year: ::std::os::raw::c_int, - pub tm_wday: ::std::os::raw::c_int, - pub tm_yday: ::std::os::raw::c_int, - pub tm_isdst: ::std::os::raw::c_int, - pub tm_gmtoff: ::std::os::raw::c_long, - pub tm_zone: *const ::std::os::raw::c_char, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct itimerspec { - pub it_interval: timespec, - pub it_value: timespec, -} -extern "C" { - pub fn clock() -> clock_t; -} -extern "C" { - pub fn time(__timer: *mut time_t) -> time_t; -} -extern "C" { - pub fn difftime(__time1: time_t, __time0: time_t) -> f64; -} -extern "C" { - pub fn mktime(__tp: *mut tm) -> time_t; -} -extern "C" { - pub fn strftime( - __s: *mut ::std::os::raw::c_char, - __maxsize: usize, - __format: *const ::std::os::raw::c_char, - __tp: *const tm, - ) -> usize; -} -extern "C" { - pub fn strptime( - __s: *const ::std::os::raw::c_char, - __fmt: *const ::std::os::raw::c_char, - __tp: *mut tm, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn strftime_l( - __s: *mut ::std::os::raw::c_char, - __maxsize: usize, - __format: *const ::std::os::raw::c_char, - __tp: *const tm, - __loc: locale_t, - ) -> usize; -} -extern "C" { - pub fn strptime_l( - __s: *const ::std::os::raw::c_char, - __fmt: *const ::std::os::raw::c_char, - __tp: *mut tm, - __loc: locale_t, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn gmtime(__timer: *const time_t) -> *mut tm; -} -extern "C" { - pub fn localtime(__timer: *const time_t) -> *mut tm; -} -extern "C" { - pub fn gmtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm; -} -extern "C" { - pub fn localtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm; -} -extern "C" { - pub fn asctime(__tp: *const tm) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ctime(__timer: *const time_t) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn asctime_r( - __tp: *const tm, - __buf: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn ctime_r( - __timer: *const time_t, - __buf: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}__tzname"] - pub static mut __tzname: [*mut ::std::os::raw::c_char; 2usize]; -} -extern "C" { - #[link_name = "\u{1}__daylight"] - pub static mut __daylight: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}__timezone"] - pub static mut __timezone: ::std::os::raw::c_long; -} -extern "C" { - #[link_name = "\u{1}tzname"] - pub static mut tzname: [*mut ::std::os::raw::c_char; 2usize]; -} -extern "C" { - pub fn tzset(); -} -extern "C" { - #[link_name = "\u{1}daylight"] - pub static mut daylight: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}timezone"] - pub static mut timezone: ::std::os::raw::c_long; -} -extern "C" { - pub fn stime(__when: *const time_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timegm(__tp: *mut tm) -> time_t; -} -extern "C" { - pub fn timelocal(__tp: *mut tm) -> time_t; -} -extern "C" { - pub fn dysize(__year: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn nanosleep( - __requested_time: *const timespec, - __remaining: *mut timespec, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clock_getres(__clock_id: clockid_t, __res: *mut timespec) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut timespec) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clock_settime(__clock_id: clockid_t, __tp: *const timespec) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clock_nanosleep( - __clock_id: clockid_t, - __flags: ::std::os::raw::c_int, - __req: *const timespec, - __rem: *mut timespec, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn clock_getcpuclockid(__pid: pid_t, __clock_id: *mut clockid_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timer_create( - __clock_id: clockid_t, - __evp: *mut sigevent, - __timerid: *mut timer_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timer_delete(__timerid: timer_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timer_settime( - __timerid: timer_t, - __flags: ::std::os::raw::c_int, - __value: *const itimerspec, - __ovalue: *mut itimerspec, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timer_gettime(__timerid: timer_t, __value: *mut itimerspec) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timer_getoverrun(__timerid: timer_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn timespec_get( - __ts: *mut timespec, - __base: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}getdate_err"] - pub static mut getdate_err: ::std::os::raw::c_int; -} -extern "C" { - pub fn getdate(__string: *const ::std::os::raw::c_char) -> *mut tm; -} -extern "C" { - pub fn getdate_r( - __string: *const ::std::os::raw::c_char, - __resbufp: *mut tm, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tms { - pub tms_utime: clock_t, - pub tms_stime: clock_t, - pub tms_cutime: clock_t, - pub tms_cstime: clock_t, -} -extern "C" { - pub fn times(__buffer: *mut tms) -> clock_t; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct dirent { - pub d_ino: __ino_t, - pub d_off: __off_t, - pub d_reclen: ::std::os::raw::c_ushort, - pub d_type: ::std::os::raw::c_uchar, - pub d_name: [::std::os::raw::c_char; 256usize], -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct dirent64 { - pub d_ino: __ino64_t, - pub d_off: __off64_t, - pub d_reclen: ::std::os::raw::c_ushort, - pub d_type: ::std::os::raw::c_uchar, - pub d_name: [::std::os::raw::c_char; 256usize], -} -pub const DT_UNKNOWN: _bindgen_ty_17 = 0; -pub const DT_FIFO: _bindgen_ty_17 = 1; -pub const DT_CHR: _bindgen_ty_17 = 2; -pub const DT_DIR: _bindgen_ty_17 = 4; -pub const DT_BLK: _bindgen_ty_17 = 6; -pub const DT_REG: _bindgen_ty_17 = 8; -pub const DT_LNK: _bindgen_ty_17 = 10; -pub const DT_SOCK: _bindgen_ty_17 = 12; -pub const DT_WHT: _bindgen_ty_17 = 14; -pub type _bindgen_ty_17 = u32; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __dirstream { - _unused: [u8; 0], -} -pub type DIR = __dirstream; -extern "C" { - pub fn opendir(__name: *const ::std::os::raw::c_char) -> *mut DIR; -} -extern "C" { - pub fn fdopendir(__fd: ::std::os::raw::c_int) -> *mut DIR; -} -extern "C" { - pub fn closedir(__dirp: *mut DIR) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn readdir(__dirp: *mut DIR) -> *mut dirent; -} -extern "C" { - pub fn readdir64(__dirp: *mut DIR) -> *mut dirent64; -} -extern "C" { - pub fn readdir_r( - __dirp: *mut DIR, - __entry: *mut dirent, - __result: *mut *mut dirent, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn readdir64_r( - __dirp: *mut DIR, - __entry: *mut dirent64, - __result: *mut *mut dirent64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn rewinddir(__dirp: *mut DIR); -} -extern "C" { - pub fn seekdir(__dirp: *mut DIR, __pos: ::std::os::raw::c_long); -} -extern "C" { - pub fn telldir(__dirp: *mut DIR) -> ::std::os::raw::c_long; -} -extern "C" { - pub fn dirfd(__dirp: *mut DIR) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn scandir( - __dir: *const ::std::os::raw::c_char, - __namelist: *mut *mut *mut dirent, - __selector: ::core::option::Option< - unsafe extern "C" fn(arg1: *const dirent) -> ::std::os::raw::c_int, - >, - __cmp: ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut *const dirent, - arg2: *mut *const dirent, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn scandir64( - __dir: *const ::std::os::raw::c_char, - __namelist: *mut *mut *mut dirent64, - __selector: ::core::option::Option< - unsafe extern "C" fn(arg1: *const dirent64) -> ::std::os::raw::c_int, - >, - __cmp: ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut *const dirent64, - arg2: *mut *const dirent64, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn scandirat( - __dfd: ::std::os::raw::c_int, - __dir: *const ::std::os::raw::c_char, - __namelist: *mut *mut *mut dirent, - __selector: ::core::option::Option< - unsafe extern "C" fn(arg1: *const dirent) -> ::std::os::raw::c_int, - >, - __cmp: ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut *const dirent, - arg2: *mut *const dirent, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn scandirat64( - __dfd: ::std::os::raw::c_int, - __dir: *const ::std::os::raw::c_char, - __namelist: *mut *mut *mut dirent64, - __selector: ::core::option::Option< - unsafe extern "C" fn(arg1: *const dirent64) -> ::std::os::raw::c_int, - >, - __cmp: ::core::option::Option< - unsafe extern "C" fn( - arg1: *mut *const dirent64, - arg2: *mut *const dirent64, - ) -> ::std::os::raw::c_int, - >, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn alphasort(__e1: *mut *const dirent, __e2: *mut *const dirent) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn alphasort64( - __e1: *mut *const dirent64, - __e2: *mut *const dirent64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn getdirentries( - __fd: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __nbytes: usize, - __basep: *mut __off_t, - ) -> __ssize_t; -} -extern "C" { - pub fn getdirentries64( - __fd: ::std::os::raw::c_int, - __buf: *mut ::std::os::raw::c_char, - __nbytes: usize, - __basep: *mut __off64_t, - ) -> __ssize_t; -} -extern "C" { - pub fn versionsort(__e1: *mut *const dirent, __e2: *mut *const dirent) - -> ::std::os::raw::c_int; -} -extern "C" { - pub fn versionsort64( - __e1: *mut *const dirent64, - __e2: *mut *const dirent64, - ) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}is_basic_table"] - pub static mut is_basic_table: [::std::os::raw::c_uint; 0usize]; -} -pub type cc_t = ::std::os::raw::c_uchar; -pub type speed_t = ::std::os::raw::c_uint; -pub type tcflag_t = ::std::os::raw::c_uint; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct termios { - pub c_iflag: tcflag_t, - pub c_oflag: tcflag_t, - pub c_cflag: tcflag_t, - pub c_lflag: tcflag_t, - pub c_line: cc_t, - pub c_cc: [cc_t; 32usize], - pub c_ispeed: speed_t, - pub c_ospeed: speed_t, -} -extern "C" { - pub fn cfgetospeed(__termios_p: *const termios) -> speed_t; -} -extern "C" { - pub fn cfgetispeed(__termios_p: *const termios) -> speed_t; -} -extern "C" { - pub fn cfsetospeed(__termios_p: *mut termios, __speed: speed_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cfsetispeed(__termios_p: *mut termios, __speed: speed_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cfsetspeed(__termios_p: *mut termios, __speed: speed_t) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tcgetattr( - __fd: ::std::os::raw::c_int, - __termios_p: *mut termios, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tcsetattr( - __fd: ::std::os::raw::c_int, - __optional_actions: ::std::os::raw::c_int, - __termios_p: *const termios, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn cfmakeraw(__termios_p: *mut termios); -} -extern "C" { - pub fn tcsendbreak( - __fd: ::std::os::raw::c_int, - __duration: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tcdrain(__fd: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tcflush( - __fd: ::std::os::raw::c_int, - __queue_selector: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tcflow( - __fd: ::std::os::raw::c_int, - __action: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tcgetsid(__fd: ::std::os::raw::c_int) -> __pid_t; -} -extern "C" { - pub fn ttgetattr(arg1: ::std::os::raw::c_int, arg2: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttsetattr(arg1: ::std::os::raw::c_int, arg2: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttsave(); -} -extern "C" { - pub fn ttrestore(); -} -extern "C" { - pub fn ttattr(arg1: ::std::os::raw::c_int) -> *mut termios; -} -extern "C" { - pub fn tt_setonechar(arg1: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tt_setnoecho(arg1: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tt_seteightbit(arg1: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tt_setnocanon(arg1: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tt_setcbreak(arg1: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttfd_onechar(arg1: ::std::os::raw::c_int, arg2: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttfd_noecho(arg1: ::std::os::raw::c_int, arg2: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttfd_eightbit(arg1: ::std::os::raw::c_int, arg2: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttfd_nocanon(arg1: ::std::os::raw::c_int, arg2: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttfd_cbreak(arg1: ::std::os::raw::c_int, arg2: *mut termios) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttonechar() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttnoecho() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn tteightbit() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttnocanon() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn ttcbreak() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn xwcsrtombs( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut *const wchar_t, - arg3: usize, - arg4: *mut mbstate_t, - ) -> usize; -} -extern "C" { - pub fn xmbsrtowcs( - arg1: *mut wchar_t, - arg2: *mut *const ::std::os::raw::c_char, - arg3: usize, - arg4: *mut mbstate_t, - ) -> usize; -} -extern "C" { - pub fn xdupmbstowcs( - arg1: *mut *mut wchar_t, - arg2: *mut *mut *mut ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - ) -> usize; -} -extern "C" { - pub fn xstrchr( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union wait { - pub w_status: ::std::os::raw::c_int, - pub w_T: wait__bindgen_ty_1, - pub w_S: wait__bindgen_ty_2, - _bindgen_union_align: u32, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_1 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, - pub __bindgen_align: [u16; 0usize], -} -impl wait__bindgen_ty_1 { - #[inline] - pub fn w_Termsig(&self) -> ::std::os::raw::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 7u8) as u16) } - } - #[inline] - pub fn set_w_Termsig(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 7u8, val as u64) - } - } - #[inline] - pub fn w_Coredump(&self) -> ::std::os::raw::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } - } - #[inline] - pub fn set_w_Coredump(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(7usize, 1u8, val as u64) - } - } - #[inline] - pub fn w_Retcode(&self) -> ::std::os::raw::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_w_Retcode(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Fill1(&self) -> ::std::os::raw::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u16) } - } - #[inline] - pub fn set_w_Fill1(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - w_Termsig: ::std::os::raw::c_ushort, - w_Coredump: ::std::os::raw::c_ushort, - w_Retcode: ::std::os::raw::c_ushort, - w_Fill1: ::std::os::raw::c_ushort, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 7u8, { - let w_Termsig: u16 = unsafe { ::core::mem::transmute(w_Termsig) }; - w_Termsig as u64 - }); - __bindgen_bitfield_unit.set(7usize, 1u8, { - let w_Coredump: u16 = unsafe { ::core::mem::transmute(w_Coredump) }; - w_Coredump as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let w_Retcode: u16 = unsafe { ::core::mem::transmute(w_Retcode) }; - w_Retcode as u64 - }); - __bindgen_bitfield_unit.set(16usize, 16u8, { - let w_Fill1: u16 = unsafe { ::core::mem::transmute(w_Fill1) }; - w_Fill1 as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct wait__bindgen_ty_2 { - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize], u16>, - pub __bindgen_align: [u16; 0usize], -} -impl wait__bindgen_ty_2 { - #[inline] - pub fn w_Stopval(&self) -> ::std::os::raw::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u16) } - } - #[inline] - pub fn set_w_Stopval(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(0usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Stopsig(&self) -> ::std::os::raw::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u16) } - } - #[inline] - pub fn set_w_Stopsig(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(8usize, 8u8, val as u64) - } - } - #[inline] - pub fn w_Fill2(&self) -> ::std::os::raw::c_ushort { - unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u16) } - } - #[inline] - pub fn set_w_Fill2(&mut self, val: ::std::os::raw::c_ushort) { - unsafe { - let val: u16 = ::core::mem::transmute(val); - self._bitfield_1.set(16usize, 16u8, val as u64) - } - } - #[inline] - pub fn new_bitfield_1( - w_Stopval: ::std::os::raw::c_ushort, - w_Stopsig: ::std::os::raw::c_ushort, - w_Fill2: ::std::os::raw::c_ushort, - ) -> __BindgenBitfieldUnit<[u8; 4usize], u16> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize], u16> = - Default::default(); - __bindgen_bitfield_unit.set(0usize, 8u8, { - let w_Stopval: u16 = unsafe { ::core::mem::transmute(w_Stopval) }; - w_Stopval as u64 - }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let w_Stopsig: u16 = unsafe { ::core::mem::transmute(w_Stopsig) }; - w_Stopsig as u64 - }); - __bindgen_bitfield_unit.set(16usize, 16u8, { - let w_Fill2: u16 = unsafe { ::core::mem::transmute(w_Fill2) }; - w_Fill2 as u64 - }); - __bindgen_bitfield_unit - } -} -extern "C" { - #[link_name = "\u{1}list_optarg"] - pub static mut list_optarg: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}list_optopt"] - pub static mut list_optopt: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}list_opttype"] - pub static mut list_opttype: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}lcurrent"] - pub static mut lcurrent: *mut WORD_LIST; -} -extern "C" { - #[link_name = "\u{1}loptend"] - pub static mut loptend: *mut WORD_LIST; -} -extern "C" { - pub fn internal_getopt( - arg1: *mut WORD_LIST, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn reset_internal_getopt(); -} -extern "C" { - #[link_name = "\u{1}sh_optarg"] - pub static mut sh_optarg: *mut ::std::os::raw::c_char; -} -extern "C" { - #[link_name = "\u{1}sh_optind"] - pub static mut sh_optind: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}sh_opterr"] - pub static mut sh_opterr: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}sh_optopt"] - pub static mut sh_optopt: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}sh_badopt"] - pub static mut sh_badopt: ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_getopt( - arg1: ::std::os::raw::c_int, - arg2: *const *mut ::std::os::raw::c_char, - arg3: *const ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct sh_getopt_state { - pub gs_optarg: *mut ::std::os::raw::c_char, - pub gs_optind: ::std::os::raw::c_int, - pub gs_curopt: ::std::os::raw::c_int, - pub gs_nextchar: *mut ::std::os::raw::c_char, - pub gs_charindex: ::std::os::raw::c_int, - pub gs_flags: ::std::os::raw::c_int, -} -pub type sh_getopt_state_t = sh_getopt_state; -extern "C" { - pub fn sh_getopt_restore_state(arg1: *mut *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_getopt_alloc_istate() -> *mut sh_getopt_state_t; -} -extern "C" { - pub fn sh_getopt_dispose_istate(arg1: *mut sh_getopt_state_t); -} -extern "C" { - pub fn sh_getopt_save_istate() -> *mut sh_getopt_state_t; -} -extern "C" { - pub fn sh_getopt_restore_istate(arg1: *mut sh_getopt_state_t); -} -extern "C" { - pub fn builtin_error(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn builtin_warning(arg1: *const ::std::os::raw::c_char, ...); -} -extern "C" { - pub fn builtin_usage(); -} -extern "C" { - pub fn no_args(arg1: *mut WORD_LIST); -} -extern "C" { - pub fn no_options(arg1: *mut WORD_LIST) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn sh_needarg(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_neednumarg(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_notfound(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_invalidopt(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_invalidoptname(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_invalidid(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_invalidnum(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_invalidsig(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_erange(arg1: *mut ::std::os::raw::c_char, arg2: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_badpid(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_badjob(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_readonly(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_nojobs(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_restricted(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_notbuiltin(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn sh_wrerror(); -} -extern "C" { - pub fn sh_ttyerror(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn sh_chkwrite(arg1: ::std::os::raw::c_int) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn make_builtin_argv( - arg1: *mut WORD_LIST, - arg2: *mut ::std::os::raw::c_int, - ) -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn remember_args(arg1: *mut WORD_LIST, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn shift_args(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn number_of_args() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn dollar_vars_changed() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_dollar_vars_unchanged(); -} -extern "C" { - pub fn set_dollar_vars_changed(); -} -extern "C" { - pub fn get_numeric_arg( - arg1: *mut WORD_LIST, - arg2: ::std::os::raw::c_int, - arg3: *mut intmax_t, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn get_exitstat(arg1: *mut WORD_LIST) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn read_octal(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}the_current_working_directory"] - pub static mut the_current_working_directory: *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_working_directory(arg1: *mut ::std::os::raw::c_char) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn set_working_directory(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn get_job_by_name( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn get_job_spec(arg1: *mut WORD_LIST) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn display_signal_list( - arg1: *mut WORD_LIST, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn builtin_address_internal( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> *mut builtin; -} -extern "C" { - pub fn find_shell_builtin(arg1: *mut ::std::os::raw::c_char) -> sh_builtin_func_t; -} -extern "C" { - pub fn builtin_address(arg1: *mut ::std::os::raw::c_char) -> sh_builtin_func_t; -} -extern "C" { - pub fn find_special_builtin(arg1: *mut ::std::os::raw::c_char) -> sh_builtin_func_t; -} -extern "C" { - pub fn initialize_shell_builtins(); -} -extern "C" { - pub fn bash_logout(); -} -extern "C" { - pub fn getopts_reset(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn builtin_help(); -} -extern "C" { - pub fn read_tty_cleanup(); -} -extern "C" { - pub fn read_tty_modified() -> ::std::os::raw::c_int; -} -extern "C" { - pub fn minus_o_option_value(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn list_minus_o_opts(arg1: ::std::os::raw::c_int, arg2: ::std::os::raw::c_int); -} -extern "C" { - pub fn get_minus_o_opts() -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn set_minus_o_option( - arg1: ::std::os::raw::c_int, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_shellopts(); -} -extern "C" { - pub fn parse_shellopts(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn initialize_shell_options(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn reset_shell_options(); -} -extern "C" { - pub fn get_current_options() -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn set_current_options(arg1: *const ::std::os::raw::c_char); -} -extern "C" { - pub fn reset_shopt_options(); -} -extern "C" { - pub fn get_shopt_options() -> *mut *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn shopt_setopt( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn shopt_listopt( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_login_shell( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_bashopts(); -} -extern "C" { - pub fn parse_bashopts(arg1: *mut ::std::os::raw::c_char); -} -extern "C" { - pub fn initialize_bashopts(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn set_compatibility_opts(); -} -extern "C" { - pub fn describe_command( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_or_show_attributes( - arg1: *mut WORD_LIST, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn show_all_var_attributes( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn show_local_var_attributes( - arg1: ::std::os::raw::c_int, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn show_var_attributes( - arg1: *mut SHELL_VAR, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn show_name_attributes( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn show_localname_attributes( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn show_func_attributes( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn set_var_attribute( - arg1: *mut ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - arg3: ::std::os::raw::c_int, - ); -} -extern "C" { - pub fn var_attribute_string( - arg1: *mut SHELL_VAR, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn get_dirstack_from_string( - arg1: *mut ::std::os::raw::c_char, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn get_dirstack_element( - arg1: intmax_t, - arg2: ::std::os::raw::c_int, - ) -> *mut ::std::os::raw::c_char; -} -extern "C" { - pub fn set_dirstack_element( - arg1: intmax_t, - arg2: ::std::os::raw::c_int, - arg3: *mut ::std::os::raw::c_char, - ); -} -extern "C" { - pub fn get_directory_stack(arg1: ::std::os::raw::c_int) -> *mut WORD_LIST; -} -extern "C" { - pub fn parse_and_execute( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn evalstring( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn parse_and_execute_cleanup(arg1: ::std::os::raw::c_int); -} -extern "C" { - pub fn parse_string( - arg1: *mut ::std::os::raw::c_char, - arg2: *const ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - arg4: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn should_suppress_fork(arg1: *mut COMMAND) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn can_optimize_connection(arg1: *mut COMMAND) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn optimize_fork(arg1: *mut COMMAND); -} -extern "C" { - pub fn optimize_subshell_command(arg1: *mut COMMAND); -} -extern "C" { - pub fn optimize_shell_function(arg1: *mut COMMAND); -} -extern "C" { - pub fn maybe_execute_file( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn force_execute_file( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn source_file( - arg1: *const ::std::os::raw::c_char, - arg2: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn fc_execute_file(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}this_shell_builtin"] - pub static mut this_shell_builtin: sh_builtin_func_t; -} -extern "C" { - #[link_name = "\u{1}last_shell_builtin"] - pub static mut last_shell_builtin: sh_builtin_func_t; -} -extern "C" { - pub fn builtin_bind_variable( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: ::std::os::raw::c_int, - ) -> *mut SHELL_VAR; -} -extern "C" { - pub fn builtin_unbind_variable(arg1: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}sourcelevel"] - pub static mut sourcelevel: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}parse_and_execute_level"] - pub static mut parse_and_execute_level: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}breaking"] - pub static mut breaking: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}continuing"] - pub static mut continuing: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}loop_level"] - pub static mut loop_level: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}sigalrm_seen"] - pub static mut sigalrm_seen: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}print_shift_error"] - pub static mut print_shift_error: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}source_searches_cwd"] - pub static mut source_searches_cwd: ::std::os::raw::c_int; -} -extern "C" { - #[link_name = "\u{1}source_uses_path"] - pub static mut source_uses_path: ::std::os::raw::c_int; -} -extern "C" { - pub fn test_unop(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn test_binop(arg1: *mut ::std::os::raw::c_char) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn unary_test( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn binary_test( - arg1: *mut ::std::os::raw::c_char, - arg2: *mut ::std::os::raw::c_char, - arg3: *mut ::std::os::raw::c_char, - arg4: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int; -} -extern "C" { - pub fn test_command( - arg1: ::std::os::raw::c_int, - arg2: *mut *mut ::std::os::raw::c_char, - ) -> ::std::os::raw::c_int; -} -pub type __builtin_va_list = [__va_list_tag; 1usize]; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __va_list_tag { - pub gp_offset: ::std::os::raw::c_uint, - pub fp_offset: ::std::os::raw::c_uint, - pub overflow_arg_area: *mut ::std::os::raw::c_void, - pub reg_save_area: *mut ::std::os::raw::c_void, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct __locale_data { - pub _address: u8, -} diff --git a/bash-5.1/r_bashhist/src/lib.rs b/bash-5.1/r_bashhist/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..cbbfb3052a00c2ad5b8ff167f244f4995ef41f24 --- /dev/null +++ b/bash-5.1/r_bashhist/src/lib.rs @@ -0,0 +1,864 @@ +use std::ffi::CStr; + +use libc::{c_char, c_int, c_void}; +use r_bash::*; + +extern "C" { + static mut history_expansion_char:c_char; + static mut history_quoting_state:c_int; + static mut history_quotes_inhibit_expansion:c_int; + static mut history_search_delimiter_chars:*mut c_char; + static mut history_inhibit_expansion_function:Option; + static mut history_lines_read_from_file:c_int; + static mut history_base: c_int; + static mut history_length: c_int; + static mut history_lines_written_to_file: c_int; + static mut bash_input: BASH_INPUT; + static mut history_subst_char: c_char; + static mut rl_dispatching: c_int; + static mut rl_done: c_int; + static mut history_max_entries: c_int; + + fn mbschr(_: *const c_char, _: c_int) -> *mut c_char; + fn read_history(_:*const c_char) -> c_int; + fn using_history(); + fn file_exits(_:*const c_char) -> c_int; + fn clear_hisroty(); + fn remove_history(_:c_int) -> *mut HIST_ENTRY; + fn free_history_entry(_: *mut HIST_ENTRY) -> histdata_t; + fn remove_history_range(_:c_int, _:c_int) -> *mut *mut HIST_ENTRY; + fn history_list() -> *mut *mut HIST_ENTRY; + fn history_get(_: c_int) -> *mut HIST_ENTRY; + fn where_history() -> c_int; + fn history_set_pos(_: c_int) -> c_int; + fn append_history(_: c_int, _: *const c_char) -> c_int; + fn __errno_location() -> *mut c_int; + fn write_history(_: *const c_char) -> c_int; + fn history_expand(_: *mut c_char, _: *mut *mut c_char) -> c_int; + fn previous_history() -> *mut HIST_ENTRY; + fn replace_history_entry(_: c_int, _: *const c_char, _: histdata_t) -> *mut HIST_ENTRY; + fn history_is_stifled() -> c_int; + fn add_history(_: *const c_char); + fn strmatch( _: *mut c_char, _: *mut c_char, _: c_int) -> c_int; +} + +pub type rl_linebuf_func_t = unsafe extern "C" fn(*mut c_char, c_int) -> c_int; + +#[macro_export] +macro_rules! HISTSIZE_DEFAULT { + () => { + b"500\0" as *const u8 as *mut c_char + }; +} + +#[macro_export] +macro_rules! HIGN_EXPAND { + () => { + 0x01 + }; +} + +#[macro_export] +macro_rules! ENOENT { + () => { + 2 + }; +} + +#[macro_export] +macro_rules! errno { + () => { + *__errno_location() + }; +} + +#[macro_export] +macro_rules! whitespace { + ($c:expr) => { + ($c as c_int == ' ' as i32 || $c as c_int == '\t' as i32) + }; +} + +#[macro_export] +macro_rules! STREQ { + ($a:expr, $b:expr) => { + *$a.offset(0 as isize) == *$b.offset(0 as isize) + && strcmp($a, $b) == 0 + }; +} + +#[macro_export] +macro_rules! savestring { + ($x:expr) => { + strcpy(malloc((1 + strlen($x)) as usize) as *mut c_char, $x,) + }; +} + +#[macro_export] +macro_rules! FNMATCH_EXTFLAG { + () => { + if extended_glob != 0 { + (1 as c_int) << 5 as c_int + } else { + 0 as c_int + } + }; +} + +#[macro_export] +macro_rules! FNM_NOMATCH { + () => { + 1 + }; +} + +pub const st_stdin: stream_type = 1; + + +unsafe extern "C" fn member(c:i32, s:*const c_char) -> bool +{ + if c != 0 { + return mbschr(s, c) as c_char != 0 as c_char ; + } + else { + return false; + } +} + +static mut histignore: ignorevar = unsafe { + { + let mut init = ignorevar { + varname: b"HISTIGNORE\0" as *const u8 as *mut c_char, + ignores: 0 as *mut ign, + num_ignores: 0 as c_int, + last_ignoreval: 0 as *const c_char as *mut c_char, + item_func: ::std::mem::transmute::< + unsafe extern "C" fn(*mut ign) -> c_int, + sh_iv_item_func_t, + >( histignore_item_func as unsafe extern "C" fn(*mut ign) -> c_int), + }; + init + } +}; + +pub type histdata_t = *mut c_void; + +#[derive(Copy, Clone)] +#[repr(C)] +pub struct _hist_entry{ + pub line: *mut c_char, + pub timestamp: *mut c_char, + pub data: histdata_t, +} +pub type HIST_ENTRY = _hist_entry; + +#[no_mangle] +pub static mut remember_on_history:c_int = 0; +#[no_mangle] +pub static mut enable_history_list:c_int = -1; +#[no_mangle] +pub static mut history_lines_this_session:c_int = 0; +#[no_mangle] +pub static mut history_expansion_inhibited:c_int = 0; +#[no_mangle] +pub static mut double_quotes_inhibit_history_expansion:c_int = 0; +#[no_mangle] +pub static mut command_oriented_history:c_int = 1; +#[no_mangle] +pub static mut current_command_first_line_saved:c_int = 0; +#[no_mangle] +pub static mut current_command_line_comment:c_int = 0; +#[no_mangle] +pub static mut literal_history:c_int = 0; +#[no_mangle] +pub static mut force_append_history:c_int = 0; +#[no_mangle] +pub static mut history_control:c_int = 0; +#[no_mangle] +pub static mut hist_last_line_added:c_int = 0; +#[no_mangle] +pub static mut hist_last_line_pushed:c_int = 0; +#[no_mangle] +pub static mut history_reediting:c_int = 0; +#[no_mangle] +pub static mut hist_verify:c_int = 0; +#[no_mangle] +pub static mut dont_save_function_defs:c_int = 0; + + +unsafe extern "C" fn bash_history_inhibit_expansion(mut string: *mut c_char, mut i: c_int) -> c_int +{ + let mut t: c_int = 0; + let mut si: c_int = 0; + let mut hx: [c_char; 2] = [0; 2]; + hx[0 as usize] = history_expansion_char; + hx[1 as usize] = '\u{0}' as i32 as c_char; + + if i > 0 as c_int + && *string.offset((i - 1) as isize) as c_int == '[' as i32 + && member(']' as i32, string.offset(i as isize).offset(1 as c_int as isize)) + { + return 1 + } + else if i > 1 as c_int + && *string.offset((i - 1 as c_int) as isize) as c_int + == '{' as i32 + && *string.offset((i - 2 as c_int) as isize) as c_int + == '$' as i32 + && member('}' as i32, string.offset(i as isize).offset(1 as c_int as isize)) + { + return 1 + } + else if i > 1 as c_int + && *string.offset((i - 1 as c_int) as isize) as c_int + == '$' as i32 + && *string.offset(i as isize) as c_int == '!' as i32 + { + return 1 + } + else if extended_glob != 0 && i > 1 as c_int + && *string.offset((i + 1 as c_int) as isize) as c_int == '(' as i32 + && member(')' as i32, string.offset(i as isize).offset(2 as c_int as isize)) + { + return 1 ; + } + + si = 0; + if history_quoting_state == '\'' as i32 { + si = skip_to_delim(string,0 ,b"'\0" as *const u8 as *mut c_char,SD_NOJMP as c_int | SD_HISTEXP as c_int); + if *string.offset(si as isize) == 0 || si >= i { + return 1 ; + } + si += 1; + } + + t = skip_to_histexp(string, si, hx.as_mut_ptr(), SD_NOJMP as c_int| SD_HISTEXP as c_int); + if t > 0 { + while t < i { + t = skip_to_histexp(string, t + 1 as c_int, hx.as_mut_ptr(), SD_NOJMP as c_int| SD_HISTEXP as c_int); + if t <= 0 { + return 0 ; + } + } + return (t > i) as c_int; + } else { + return 0 + }; +} + +#[no_mangle] +pub unsafe extern "C" fn bash_initialize_history() { + history_quotes_inhibit_expansion = 1; + history_search_delimiter_chars = b";&()|<>\0" as *const u8 as *const c_char + as *mut c_char; + + history_inhibit_expansion_function = std::mem::transmute::< + unsafe extern "C" fn (*mut c_char, c_int) -> c_int, + Option::, + >(bash_history_inhibit_expansion); + + sv_histchars( + b"histchars\0" as *const u8 as *const c_char as *mut c_char, + ); +} + +#[no_mangle] +pub unsafe extern "C" fn bash_history_reinit(mut interact:c_int) +{ + history_expansion = if interact == 0 { + histexp_flag + } else { + HISTEXPAND_DEFAULT as c_int + }; + + history_expansion_inhibited = if interact == 0 { + 1 - histexp_flag + } else { + 0 + }; + history_inhibit_expansion_function = std::mem::transmute::< + unsafe extern "C" fn(*mut c_char, c_int)->c_int, + Option::, + >(bash_history_inhibit_expansion); + remember_on_history = enable_history_list; +} + +#[no_mangle] +pub unsafe extern "C" fn bash_history_disable() +{ + remember_on_history = 0; + history_expansion_inhibited = 1; +} + +#[no_mangle] +pub unsafe extern "C" fn bash_history_enable() +{ + remember_on_history = 1; + enable_history_list = 1; + history_expansion_inhibited = 0; + history_inhibit_expansion_function = std::mem::transmute::< + unsafe extern "C" fn (*mut c_char, c_int) -> c_int , + Option::, + >(bash_history_inhibit_expansion); + sv_history_control(b"HISTCONTROL\0" as *const u8 as *mut c_char ); + sv_histignore(b"HISTIGNORE\0" as *const u8 as *mut c_char); +} + +#[no_mangle] +pub unsafe extern "C" fn load_history() +{ + let mut hf:*mut c_char; + + set_if_not(b"HISTSIZE\0" as *const u8 as *mut c_char, HISTSIZE_DEFAULT!() ); + sv_histsize(b"HISTSIZE\0" as *const u8 as *mut c_char); + + set_if_not(b"HISTFILESIZE\0" as *const u8 as *mut c_char, + get_string_value(b"HISTSIZE\0" as *const u8 as *mut c_char)); + sv_histsize(b"HISTFILESIZE\0" as *const u8 as *mut c_char); + + hf = get_string_value(b"HISTFILE\0" as *const u8 as *mut c_char); + + if !hf.is_null() && *hf as c_int != 0 && file_exits(hf) != 0{ + read_history(hf); + history_lines_in_file = history_lines_read_from_file; + using_history(); + } +} + +#[no_mangle] +pub unsafe extern "C" fn bash_clear_history() +{ + clear_hisroty(); + history_lines_this_session = 0; +} + +#[no_mangle] +pub unsafe extern "C" fn bash_delete_haitent(mut i:c_int) -> c_int +{ + let mut discard:*mut HIST_ENTRY = 0 as *mut HIST_ENTRY; + discard = remove_history(i); + if !discard.is_null() { + free_history_entry(discard); + history_lines_this_session -= 1; + } + return (discard != 0 as *mut HIST_ENTRY) as c_int; +} + +#[no_mangle] +pub unsafe extern "C" fn bash_delete_history_range(mut first:c_int, mut last:c_int) -> c_int +{ + let mut i: c_int = 0; + let mut discard_list:*mut *mut HIST_ENTRY = 0 as *mut *mut HIST_ENTRY; + + discard_list = remove_history_range(first, last); + i = 0 as c_int; + while !discard_list.is_null() && !(*discard_list.offset(i as isize)).is_null(){ + free_history_entry(*discard_list.offset(i as isize)); + i += 1; + } + history_lines_this_session -= i; + return 1 as c_int; +} + +#[no_mangle] +pub unsafe extern "C" fn bash_delete_last_history() -> c_int +{ + let mut i: c_int = 0; + let mut hlist: *mut *mut HIST_ENTRY = 0 as *mut *mut HIST_ENTRY; + let mut histent:*mut HIST_ENTRY = 0 as *mut HIST_ENTRY; + let mut r: c_int = 0; + + hlist = history_list(); + if hlist.is_null() { + return 0; + } + + i = 0; + while !(*hlist.offset(i as isize)).is_null(){ + i += 1; + } + + i -= 1; + histent = history_get(history_base + i); + if histent.is_null() { + return 0; + } + + r = bash_delete_histent(i); + if where_history() > history_length { + history_set_pos(history_length); + } + + return r; +} + +#[no_mangle] +pub unsafe extern "C" fn maybe_append_history(mut filename: *mut c_char) -> c_int +{ + let mut fd: c_int = 0; + let mut result: c_int = 0; + let mut histlen: c_int = 0; + let mut buf: stat = stat { + st_dev: 0, + st_ino: 0, + st_nlink: 0, + st_mode: 0, + st_uid: 0, + st_gid: 0, + __pad0: 0, + st_rdev: 0, + st_size: 0, + st_blksize: 0, + st_blocks: 0, + st_atim: timespec { tv_sec: 0, tv_nsec: 0 }, + st_mtim: timespec { tv_sec: 0, tv_nsec: 0 }, + st_ctim: timespec { tv_sec: 0, tv_nsec: 0 }, + __glibc_reserved: [0; 3], + }; + result = EXECUTION_SUCCESS as i32; + if history_lines_this_session > 0 { + if stat(filename, &mut buf) == -1 && errno!() == ENOENT!() + { + fd = open(filename,O_WRONLY as i32| O_CREAT as i32,0o600 as c_int); + if fd < 0 as c_int { + builtin_error(b"%s: cannot create: %s\0" as *const u8 as *const c_char,filename,strerror(errno!())); + return 1 as c_int; + } + close(fd); + } + histlen = where_history(); + if histlen > 0 && history_lines_this_session > histlen { + history_lines_this_session = histlen; + } + result = append_history(history_lines_this_session, filename); + history_lines_in_file += history_lines_this_session; + history_lines_this_session = 0; + } else { + history_lines_this_session = 0; + } + return result; +} + +#[no_mangle] +pub unsafe extern "C" fn maybe_save_shell_history() -> c_int { + let mut result: c_int = 0; + let mut hf: *mut c_char = 0 as *mut c_char; + result = 0 ; + if history_lines_this_session > 0 { + hf = get_string_value(b"HISTFILE\0" as *const u8 as *const c_char); + if !hf.is_null() && *hf as c_int != 0 { + if file_exists(hf) == 0 { + let mut file: c_int = 0; + file = open(hf,O_CREAT as c_int | O_TRUNC as c_int | O_WRONLY as c_int,0o600 as c_int); + if file != -1 { + close(file); + } + } + using_history(); + if history_lines_this_session <= where_history() || force_append_history != 0 + { + result = append_history(history_lines_this_session, hf); + history_lines_in_file += history_lines_this_session; + } else { + result = write_history(hf); + history_lines_in_file = history_lines_written_to_file; + } + history_lines_this_session = 0; + sv_histsize(b"HISTFILESIZE\0" as *const u8 as *mut c_char); + } + } + return result; +} + +unsafe extern "C" fn re_edit(mut text: *mut c_char) { + if bash_input.type_ as libc::c_uint == st_stdin as c_int as libc::c_uint { + bash_re_edit(text); + } +} + +unsafe extern "C" fn history_expansion_p(mut line: *mut c_char) -> c_int { + let mut s: *mut c_char = 0 as *mut c_char; + s = line; + while *s != 0 { + if *s as c_int == history_expansion_char as c_int + || *s as c_int == history_subst_char as c_int + { + return 1; + } + s = s.offset(1); + } + return 0; +} + +#[no_mangle] +pub unsafe extern "C" fn pre_process_line(mut line: *mut c_char, mut print_changes: c_int, mut addit: c_int) -> *mut c_char +{ + let mut history_value: *mut c_char = 0 as *mut c_char; + let mut return_value: *mut c_char = 0 as *mut c_char; + let mut expanded: c_int = 0; + return_value = line; + expanded = 0 ; + + if history_expansion_inhibited == 0 && history_expansion != 0 && history_expansion_p(line) != 0 + { + let mut old_len: c_int = 0; + old_len = history_length; + if history_length > 0 && command_oriented_history != 0 + && current_command_first_line_saved != 0 + && current_command_line_count > 1 + { + history_length -= 1; + } + expanded = history_expand(line, &mut history_value); + if history_length >= 0 && command_oriented_history != 0 + && current_command_first_line_saved != 0 + && current_command_line_count > 1 + { + history_length = old_len; + } + if expanded != 0 { + if print_changes != 0 { + if expanded < 0 { + internal_error(b"%s\0" as *const u8 as *const c_char, history_value); + } else if hist_verify == 0 || expanded == 2 + { + println!("{}", CStr::from_ptr(history_value).to_str().unwrap()) + } + } + if expanded < 0 || expanded == 2 { + if expanded == 2 as c_int && rl_dispatching == 0 + && *history_value as c_int != 0 + { + maybe_add_history(history_value); + } + libc::free(history_value as *mut c_void); + if history_reediting != 0 && expanded < 0 && rl_done != 0 + { + re_edit(line); + } + return 0 as *mut c_char; + } + if hist_verify != 0 && expanded == 1 { + re_edit(history_value); + libc::free(history_value as *mut c_void); + return 0 as *mut c_char; + } + } + expanded = 1 ; + return_value = history_value; + } + if addit != 0 && remember_on_history != 0 && *return_value as c_int != 0 { + maybe_add_history(return_value); + } + return return_value; +} + +unsafe extern "C" fn shell_comment(mut line: *mut c_char) -> c_int { + let mut p: *mut c_char = 0 as *mut c_char; + let mut n: c_int = 0; + if line.is_null() { + return 0; + } + p = line; + while !p.is_null() && *p as c_int != 0 && whitespace!(*p) + { + p = p.offset(1); + } + if !p.is_null() && *p as c_int == '#' as i32 { + return 1 ; + } + n = skip_to_delim( + line, + p.offset_from(line) as c_int, + b"#\0" as *const u8 as *mut c_char, + SD_NOJMP as c_int | SD_GLOB as c_int | SD_EXTGLOB as c_int + | SD_COMPLETE as c_int); + return if *line.offset(n as isize) as c_int == '#' as i32 { + return 2; + } else { + return 0; + }; +} + + +unsafe extern "C" fn check_history_control(mut line: *mut c_char) -> c_int { + let mut temp: *mut HIST_ENTRY = 0 as *mut HIST_ENTRY; + let mut r: c_int = 0; + if history_control == 0 { + return 1 ; + } + if history_control & HC_IGNSPACE as c_int != 0 && *line as c_int == ' ' as i32 { + return 0 ; + } + if history_control & HC_IGNDUPS as c_int != 0 { + using_history(); + temp = previous_history(); + r = (temp.is_null() || STREQ!((*temp).line, line) == false) as c_int; + using_history(); + if r == 0 { + return r; + } + } + return 1; +} + +unsafe extern "C" fn hc_erasedups(mut line: *mut c_char) { + let mut temp: *mut HIST_ENTRY = 0 as *mut HIST_ENTRY; + let mut r: c_int = 0; + using_history(); + loop { + temp = previous_history(); + if temp.is_null() { + break; + } + if STREQ!((*temp).line, line) + { + r = where_history(); + temp = remove_history(r); + if !temp.is_null() { + free_history_entry(temp); + } + } + } + using_history(); +} + + +#[no_mangle] +pub unsafe extern "C" fn maybe_add_history(mut line: *mut c_char) { + let mut is_comment: c_int = 0; + hist_last_line_added = 0 ; + is_comment = if parser_state & PST_HEREDOC as c_int != 0 { + 0 + } else { + shell_comment(line) + }; + if current_command_line_count > 1 { + if current_command_first_line_saved != 0 + && (parser_state & PST_HEREDOC as c_int != 0 || literal_history != 0 + || dstack.delimiter_depth != 0 + || is_comment != 1 ) + { + bash_add_history(line); + } + current_command_line_comment = if is_comment != 0 { + current_command_line_count + } else { + -(2 as c_int) + }; + return; + } + current_command_line_comment = if is_comment != 0 { + current_command_line_count + } else { + -(2 as c_int) + }; + current_command_first_line_saved = check_add_history(line, 0); +} + +#[no_mangle] +pub unsafe extern "C" fn check_add_history(mut line: *mut c_char, mut force: c_int) -> c_int +{ + if check_history_control(line) != 0 && history_should_ignore(line) == 0 + { + if history_control & HC_ERASEDUPS as c_int != 0 { + hc_erasedups(line); + } + if force != 0 { + really_add_history(line); + using_history(); + } else { + bash_add_history(line); + } + return 1 ; + } + return 0 ; +} + +#[no_mangle] +pub unsafe extern "C" fn bash_add_history(mut line: *mut c_char) { + let mut add_it: c_int = 0; + let mut offset: c_int = 0; + let mut curlen: c_int = 0; + let mut is_comment: c_int = 0; + let mut current: *mut HIST_ENTRY = 0 as *mut HIST_ENTRY; + let mut old: *mut HIST_ENTRY = 0 as *mut HIST_ENTRY; + let mut chars_to_add: *mut c_char = 0 as *mut c_char; + let mut new_line: *mut c_char = 0 as *mut c_char; + + add_it = 1 ; + if command_oriented_history != 0 && current_command_line_count > 1 { + is_comment = if parser_state & PST_HEREDOC as c_int != 0 { + 0 + } else { + shell_comment(line) + }; + if parser_state & PST_HEREDOC as c_int != 0 + && current_command_line_count > 2 + && *line.offset(((strlen(line)) -1) as isize) as c_int == '\n' as i32 + { + chars_to_add = b"\0" as *const u8 as *mut c_char; + } else if current_command_line_count == current_command_line_comment + 1 + { + chars_to_add = b"\n\0" as *const u8 as *mut c_char; + } else if literal_history != 0 { + chars_to_add = b"\n\0" as *const u8 as *mut c_char; + } else { + chars_to_add = history_delimiting_chars(line); + } + using_history(); + current = previous_history(); + current_command_line_comment = if is_comment != 0 { + current_command_line_count + } else { + -(2 as c_int) + }; + if !current.is_null() { + curlen = strlen((*current).line) as c_int; + if dstack.delimiter_depth == 0 + && *((*current).line).offset((curlen - 1) as isize) as c_int == '\\' as i32 + && *((*current).line).offset((curlen - 2) as isize) as c_int != '\\' as i32 + { + *((*current).line).offset((curlen - 1) as isize) = '\u{0}' as i32 as c_char; + curlen -= 1; + chars_to_add = b"\0" as *const u8 as *mut c_char; + } + if dstack.delimiter_depth == 0 && *((*current).line).offset((curlen - 1) as isize) as c_int == '\n' as i32 + && *chars_to_add as c_int == ';' as i32 + { + chars_to_add = chars_to_add.offset(1); + } + + new_line = malloc((1 + curlen + strlen(line) as i32 + strlen(chars_to_add )as i32) as usize) as *mut c_char; + sprintf(new_line,b"%s%s%s\0" as *const u8 as *const c_char, + (*current).line, chars_to_add, line); + offset = where_history(); + old = replace_history_entry(offset, new_line, (*current).data); + + free(new_line as *mut c_void); + if !old.is_null() { + free_history_entry(old); + } + add_it = 0 as c_int; + } + } + if add_it != 0 && history_is_stifled() != 0 && history_length == 0 as c_int + && history_length == history_max_entries + { + add_it = 0 as c_int; + } + if add_it != 0 { + really_add_history(line); + } + using_history(); +} + + +unsafe extern "C" fn really_add_history(mut line: *mut c_char) { + hist_last_line_added = 1 ; + hist_last_line_pushed = 0 ; + add_history(line); + history_lines_this_session += 1; +} + +#[no_mangle] +pub unsafe extern "C" fn history_number() -> c_int { + using_history(); + return if remember_on_history != 0 || enable_history_list != 0 { + history_base + where_history() + } else { + 1 + }; +} + + +unsafe extern "C" fn should_expand(mut s: *mut c_char) -> c_int { + let mut p: *mut c_char = 0 as *mut c_char; + p = s; + while !p.is_null() && *p as c_int != 0 { + if *p as c_int == '\\' as i32 { + p = p.offset(1); + } else if *p as c_int == '&' as i32 { + return 1 as c_int + } + p = p.offset(1); + } + return 0 ; +} + +unsafe extern "C" fn histignore_item_func(mut ign: *mut ign) -> c_int { + if should_expand((*ign).val) != 0 { + (*ign).flags |= HIGN_EXPAND!(); + } + return 0 ; +} + + +#[no_mangle] +pub unsafe extern "C" fn setup_history_ignore(mut varname: *mut c_char) { + setup_ignore_patterns(&mut histignore); +} + +unsafe extern "C" fn last_history_entry() -> *mut HIST_ENTRY { + let mut he: *mut HIST_ENTRY = 0 as *mut HIST_ENTRY; + using_history(); + he = previous_history(); + using_history(); + return he; +} + +#[no_mangle] +pub unsafe extern "C" fn last_history_line() -> *mut c_char { + let mut he: *mut HIST_ENTRY = 0 as *mut HIST_ENTRY; + + he = last_history_entry(); + if he.is_null() { + return 0 as *mut libc::c_void as *mut c_char; + } + return (*he).line; +} + +unsafe extern "C" fn expand_histignore_pattern(mut pat: *mut c_char,) -> *mut c_char +{ + let mut phe: *mut HIST_ENTRY = 0 as *mut HIST_ENTRY; + let mut ret: *mut c_char = 0 as *mut c_char; + + phe = last_history_entry(); + if phe.is_null() { + return savestring!(pat); + } + ret = strcreplace(pat, '&' as i32, (*phe).line, 1); + return ret; +} + + +unsafe extern "C" fn history_should_ignore(mut line: *mut c_char) -> c_int { + let mut i: c_int = 0; + let mut match_0: c_int = 0; + let mut npat: *mut c_char = 0 as *mut c_char; + + if histignore.num_ignores == 0 { + return 0; + } + match_0 = 0 ; + i = match_0; + while i < histignore.num_ignores { + if (*(histignore.ignores).offset(i as isize)).flags & HIGN_EXPAND!() != 0 { + npat = expand_histignore_pattern((*(histignore.ignores).offset(i as isize)).val); + } else { + npat = (*(histignore.ignores).offset(i as isize)).val; + } + match_0 = (strmatch(npat, line, FNMATCH_EXTFLAG!()) != FNM_NOMATCH!() as c_int) as c_int; + + if (*(histignore.ignores).offset(i as isize)).flags & HIGN_EXPAND!() != 0 { + free(npat as *mut c_void); + } + if match_0 != 0 { + break; + } + i += 1; + } + return match_0; +} + + diff --git a/bash-5.1/r_execute_cmd/Cargo.toml b/bash-5.1/r_execute_cmd/Cargo.toml new file mode 100644 index 0000000000000000000000000000000000000000..fcd280dc659b8202531db8c4dc7d6d292bbd1964 --- /dev/null +++ b/bash-5.1/r_execute_cmd/Cargo.toml @@ -0,0 +1,23 @@ +[package] +name = "r_execute_cmd" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +libc = "*" +r_bash = {path = "../r_bash"} +r_jobs = {path = "../r_jobs"} +rexec_cmd = {path = "../builtins_rust/exec_cmd"} +rcommon = {path = "../builtins_rust/common"} + +[lib] +name = "r_execute_cmd" +crate-type = ["rlib", "staticlib"] + + + + + + diff --git a/bash-5.1/r_execute_cmd/src/lib.rs b/bash-5.1/r_execute_cmd/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..e9edad9f37d73002a4300f3b7adb7fe7f3bb194a --- /dev/null +++ b/bash-5.1/r_execute_cmd/src/lib.rs @@ -0,0 +1,1809 @@ +use std::{ffi::CStr}; +use std::mem::{size_of, transmute}; +use libc::{c_char, c_int, c_void,__errno_location}; +use r_bash::*; +use r_jobs::{BLOCK_CHILD, UNBLOCK_CHILD, SIG_IGN,}; +use rexec_cmd::{r_exec_cmd}; +use rcommon::{WordList, WordDesc}; +use stdext::function_name; + +extern "C"{ + static mut the_printed_command: *mut libc::c_char; + static mut shellstart: timeval; + static mut command_string_index: libc::c_int; + + fn add_unwind_protect(cleanup:*mut Function, arg:*mut c_char); + fn make_child(_: *mut libc::c_char, _: libc::c_int) -> pid_t; + fn difftimeval(_: *mut timeval, _: *mut timeval, _: *mut timeval) -> *mut timeval; + fn addtimeval(_: *mut timeval, _: *mut timeval, _: *mut timeval) -> *mut timeval; + fn timeval_to_cpu(_: *mut timeval, _: *mut timeval, _: *mut timeval) -> libc::c_int; + fn timeval_to_secs(tvp:*mut timeval, sp:*mut time_t, sfp:*mut c_int); + fn mbstowcs(__pwcs: *mut wchar_t, __s: *const libc::c_char, __n: size_t) -> size_t; + fn read_builtin(_: *mut WordList) -> libc::c_int; + fn list_length(_:*mut GENERIC_LIST) -> libc::c_int; + fn strmatch( + _: *mut libc::c_char, + _: *mut libc::c_char, + _: libc::c_int, + ) -> libc::c_int; + fn command_builtin(_: *mut WordList) -> libc::c_int; + fn eval_builtin(_: *mut WordList) -> libc::c_int; + fn source_builtin(_: *mut WordList) -> libc::c_int; + fn unset_builtin(_: *mut WordList) -> libc::c_int; + fn mapfile_builtin(_: *mut WordList) -> libc::c_int; + fn fc_builtin(_: *mut WordList) -> libc::c_int; + fn return_builtin(_: *mut WordList) -> libc::c_int; + fn jobs_builtin(_: *mut WordList) -> libc::c_int; + fn exec_builtin(_: *mut WordList) -> libc::c_int; + fn fflush(__stream: *mut FILE) -> libc::c_int; + fn fpurge(stream: *mut FILE) -> libc::c_int; + fn sh_regmatch(a: *const libc::c_char, b:*const libc::c_char, c:libc::c_int) -> libc::c_int; +} +pub const r_input_direction: r_instruction = 1; +pub const r_input_output: r_instruction = 11; +pub const r_inputa_direction: r_instruction = 2; +pub const r_duplicating_input_word: r_instruction = 13; +pub const r_duplicating_output_word: r_instruction = 14; +pub const r_move_input_word: r_instruction = 17; +pub const r_move_output_word: r_instruction = 18; + +#[macro_export] +macro_rules! FREE { + ($s:expr) => { + if ($s) != std::ptr::null_mut() { + free($s as *mut c_void); + } + }; +} + +#[macro_export] +macro_rules! FD_BITMAP_DEFAULT_SIZE { + () => { + 32 + }; +} + +#[macro_export] +macro_rules! QUIT { + () => { + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + if interrupt_state != 0 { + throw_to_top_level(); + } + }; +} +#[macro_export] +macro_rules! errno { + () => { + *__errno_location() + }; +} + +#[macro_export] +macro_rules! savestring { + ($x:expr) => { + strcpy(malloc((strlen($x as *const c_char) + 1) as usize) as *mut c_char, $x) as *mut c_char + }; +} + +#[macro_export] +macro_rules! DESCRIBE_PID { + ($pid:expr) => { + if interactive != 0 { + describe_pid($pid); + } + }; +} + +#[macro_export] +macro_rules! NO_PID { + () => { + -1 as pid_t + }; +} + +#[macro_export] +macro_rules! RESIZE_MALLOCED_BUFFER { + ($srt:expr,$cind:expr, $room:expr, $csize:expr, $sincr:expr) => { + if $cind + $room >= $csize { + while $cind + $room >= $csize { + $csize += $sincr; + } + $srt = realloc($srt as *mut c_void, $csize as usize) as *mut c_char; + } + }; +} + +#[macro_export] +macro_rules! COPY_PROCENV { + ($old:expr, $save:expr) => { + xbcopy( + $old.as_mut_ptr() as *mut libc::c_char, + $save.as_mut_ptr() as *mut libc::c_char, + size_of::() as libc::c_ulong as libc::c_int, + ); + }; +} + + +#[macro_export] +macro_rules! setjmp_nosigs { + ($x:expr) => { + __sigsetjmp($x.as_mut_ptr(), 0 as libc::c_int) + }; +} + + +#[macro_export] +macro_rules! POSIX_TIMEFORMAT { + () => { + b"real %2R\nuser %2U\nsys %2S\0" as *const u8 as *mut libc::c_char + }; +} + +#[macro_export] +macro_rules! BASH_TIMEFORMAT { + () => { + b"\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS\0" as *const u8 + as *const libc::c_char as *mut libc::c_char; + }; +} + +#[macro_export] +macro_rules! CHECK_TERMSIG { + () => { + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + }; +} +#[macro_export] +macro_rules! STREQ { + ($a:expr, $b:expr) => { + (*($a).offset(0 as isize) as libc::c_int + == *$b.offset(0 as isize) as libc::c_int + && strcmp($a, $b) == 0 ) + }; +} + + + + +unsafe fn DIGIT(c: c_char) -> bool { + char::from(c as u8) >= '0' && char::from(c as u8) <= '9' +} + +pub type __rusage_who = libc::c_int; +pub const RUSAGE_THREAD: __rusage_who = 1; +pub const RUSAGE_CHILDREN: __rusage_who = -1; +pub const RUSAGE_SELF: __rusage_who = 0; + +#[no_mangle] +pub static mut stdin_redir: libc::c_int = 0; +#[no_mangle] +pub static mut this_command_name: *mut libc::c_char = 0 as *mut libc::c_char; +#[no_mangle] +pub static mut the_printed_command_except_trap: *mut libc::c_char = 0 as *mut libc::c_char; +#[no_mangle] +pub static mut return_catch_flag: libc::c_int = 0; +#[no_mangle] +pub static mut return_catch_value: libc::c_int = 0; +#[no_mangle] +pub static mut return_catch: sigjmp_buf = [__jmp_buf_tag { + __jmpbuf: [0; 8], + __mask_was_saved: 0, + __saved_mask: __sigset_t { __val: [0; 16] }, +}; 1]; +#[no_mangle] +pub static mut last_command_exit_value: libc::c_int = 0; +#[no_mangle] +pub static mut last_command_exit_signal: libc::c_int = 0; +#[no_mangle] +pub static mut builtin_ignoring_errexit: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut redirection_undo_list: *mut REDIRECT = 0 as *const libc::c_void + as *mut libc::c_void as *mut REDIRECT; +#[no_mangle] +pub static mut exec_redirection_undo_list: *mut REDIRECT = 0 as *const libc::c_void + as *mut libc::c_void as *mut REDIRECT; + +#[no_mangle] +pub static mut executing_builtin: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut executing_list: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut comsub_ignore_return: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut subshell_environment: libc::c_int = 0; +#[no_mangle] +pub static mut subshell_level: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut this_shell_function: *mut SHELL_VAR = 0 as *const SHELL_VAR + as *mut SHELL_VAR; +#[no_mangle] +pub static mut match_ignore_case: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut executing_command_builtin: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut SB: stat = stat { + st_dev: 0, + st_ino: 0, + st_nlink: 0, + st_mode: 0, + st_uid: 0, + st_gid: 0, + __pad0: 0, + st_rdev: 0, + st_size: 0, + st_blksize: 0, + st_blocks: 0, + st_atim: timespec { tv_sec: 0, tv_nsec: 0 }, + st_mtim: timespec { tv_sec: 0, tv_nsec: 0 }, + st_ctim: timespec { tv_sec: 0, tv_nsec: 0 }, + __glibc_reserved: [0; 3], +}; +static mut special_builtin_failed: libc::c_int = 0; +static mut currently_executing_command: *mut COMMAND = 0 as *const COMMAND + as *mut COMMAND; +static mut function_line_number: libc::c_int = 0; +static mut showing_function_line: libc::c_int = 0; +#[no_mangle] +pub static mut line_number_for_err_trap: libc::c_int = 0; +#[no_mangle] +pub static mut funcnest: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut funcnest_max: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut evalnest: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut evalnest_max: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut sourcenest: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut sourcenest_max: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut from_return_trap: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut lastpipe_opt: libc::c_int = 0 as libc::c_int; +#[no_mangle] +pub static mut current_fds_to_close: *mut fd_bitmap = 0 as *const libc::c_void + as *mut libc::c_void as *mut fd_bitmap; + +//函数重构部分 +#[no_mangle] +pub unsafe extern "C" fn new_fd_bitmap(mut size: libc::c_int) -> *mut fd_bitmap +{ + let mut ret: *mut fd_bitmap = 0 as *mut fd_bitmap; + + ret = malloc(size_of::() as usize) as *mut fd_bitmap; + + (*ret).size = size; + + if size != 0 { + (*ret).bitmap = malloc(size as usize) as *mut c_char; + memset( + (*ret).bitmap as *mut libc::c_void, + '\u{0}' as i32, + size as usize, + ); + } else { + (*ret).bitmap = 0 as *mut libc::c_char; + } + return ret; +} + +#[no_mangle] +pub unsafe extern "C" fn dispose_fd_bitmap(mut fdbp: *mut fd_bitmap) +{ + FREE!((*fdbp).bitmap); + free(fdbp as *mut c_void); +} + +#[no_mangle] +pub unsafe extern "C" fn close_fd_bitmap(mut fdbp: *mut fd_bitmap) +{ + let mut i: libc::c_int = 0; + + if !fdbp.is_null() { + i = 0; + while i < (*fdbp).size { + if *((*fdbp).bitmap).offset(i as isize) != 0 { + close(i); + *((*fdbp).bitmap).offset(i as isize) = 0 as libc::c_char; + } + i += 1; + } + } +} + +#[no_mangle] +pub unsafe extern "C" fn executing_line_number() -> libc::c_int { + if executing != 0 && showing_function_line == 0 + && (variable_context == 0 || interactive_shell == 0 ) + && !currently_executing_command.is_null() + { + if (*currently_executing_command).type_ as libc::c_uint + == command_type_cm_cond as libc::c_uint + { + return (*(*currently_executing_command).value.Cond).line; + } + if (*currently_executing_command).type_ as libc::c_uint + == command_type_cm_arith as libc::c_uint + { + return (*(*currently_executing_command).value.Arith).line; + } + if (*currently_executing_command).type_ as libc::c_uint + == command_type_cm_arith_for as libc::c_uint + { + return (*(*currently_executing_command).value.ArithFor).line; + } + return line_number; + } else { + return line_number + }; +} + +#[no_mangle] +pub unsafe extern "C" fn execute_command(mut command: *mut COMMAND) -> libc::c_int { + let mut bitmap: *mut fd_bitmap = 0 as *mut fd_bitmap; + let mut result: libc::c_int = 0; + + current_fds_to_close = 0 as *mut fd_bitmap; + bitmap = new_fd_bitmap(FD_BITMAP_DEFAULT_SIZE!()); + begin_unwind_frame(b"execute-command\0" as *const u8 as *mut libc::c_char,); + add_unwind_protect( + ::std::mem::transmute::< + unsafe extern "C" fn(*mut fd_bitmap) -> (), + *mut Function, + >(dispose_fd_bitmap), + bitmap as *mut libc::c_char, + ); + + result = execute_command_internal( + command, + 0, + NO_PIPE, + NO_PIPE, + bitmap, + ); + + dispose_fd_bitmap(bitmap); + discard_unwind_frame(b"execute-command\0" as *const u8 as *mut libc::c_char); + + if variable_context == 0 && executing_list == 0 { + unlink_fifo_list(); + } + + QUIT!(); + return result; +} + +unsafe extern "C" fn shell_control_structure(mut type_0: command_type) -> libc::c_int { + match type_0 as libc::c_uint { + command_type_cm_arith_for | + command_type_cm_select | + command_type_cm_arith | + command_type_cm_cond | + command_type_cm_case | + command_type_cm_while | + command_type_cm_until | + command_type_cm_if | + command_type_cm_for | + command_type_cm_group | + command_type_cm_function_def => return 1 as libc::c_int, + + _ => return 0 as libc::c_int, + }; +} + + +unsafe extern "C" fn cleanup_redirects(mut list: *mut REDIRECT) { + do_redirections(list, RX_ACTIVE as libc::c_int); + dispose_redirects(list); +} + +#[no_mangle] +pub unsafe extern "C" fn undo_partial_redirects() { + if !redirection_undo_list.is_null() { + cleanup_redirects(redirection_undo_list); + redirection_undo_list = 0 as *mut REDIRECT; + } +} + +#[no_mangle] +pub unsafe extern "C" fn dispose_exec_redirects() { + if !exec_redirection_undo_list.is_null() { + dispose_redirects(exec_redirection_undo_list); + exec_redirection_undo_list = 0 as *mut REDIRECT; + } +} + + +#[no_mangle] +pub unsafe extern "C" fn dispose_partial_redirects() { + if !redirection_undo_list.is_null() { + dispose_redirects(redirection_undo_list); + redirection_undo_list = 0 as *mut REDIRECT; + } +} + +unsafe extern "C" fn restore_signal_mask(mut set: *mut sigset_t) -> libc::c_int { + return sigprocmask(SIG_SETMASK as libc::c_int, set, 0 as *mut sigset_t); +} + +#[no_mangle] +pub unsafe extern "C" fn async_redirect_stdin() { + let mut fd: libc::c_int = 0; + + fd = open(b"/dev/null\0" as *const u8 as *const libc::c_char, O_RDONLY as libc::c_int); + if fd > 0 { + dup2(fd, 0 ); + close(fd); + } else if fd < 0 { + internal_error( + b"cannot redirect standard input from /dev/null: %s\0" as *const u8 as *mut c_char, + strerror(errno!()), + ); + } +} + +#[no_mangle] +pub unsafe extern "C" fn execute_command_internal( + mut command: *mut COMMAND, + mut asynchronous: libc::c_int, + mut pipe_in: libc::c_int, + mut pipe_out: libc::c_int, + mut fds_to_close: *mut fd_bitmap, +) -> libc::c_int +{ + let mut exec_result: libc::c_int = 0; + let mut user_subshell: libc::c_int = 0; + let mut invert: libc::c_int = 0; + let mut ignore_return: libc::c_int = 0; + let mut was_error_trap: libc::c_int = 0; + let mut fork_flags: libc::c_int = 0; + let mut my_undo_list: *mut REDIRECT = 0 as *mut REDIRECT; + let mut exec_undo_list: *mut REDIRECT = 0 as *mut REDIRECT; + let mut tcmd: *mut libc::c_char = 0 as *mut libc::c_char; + let mut save_line_number: libc::c_int = 0; + let mut ofifo: libc::c_int = 0; + let mut nfifo: libc::c_int = 0; + let mut osize: libc::c_int = 0; + let mut saved_fifo: libc::c_int = 0; + let mut ofifo_list: *mut libc::c_void = 0 as *mut libc::c_void; + + if breaking != 0 || continuing != 0 { + return last_command_exit_value; + } + if command.is_null() || read_but_dont_execute != 0 && rpm_requires == 0 { + return EXECUTION_SUCCESS as i32 ; + } + if rpm_requires != 0 + && (*command).type_ == command_type_cm_function_def + { + last_command_exit_value = + execute_intern_function((*(*command).value.Function_def).name, + (*command).value.Function_def); + return last_command_exit_value; + } + if read_but_dont_execute != 0 { + return EXECUTION_SUCCESS as libc::c_int; + } + + QUIT!(); + run_pending_traps(); + + currently_executing_command = command; + + invert = ((*command).flags & CMD_INVERT_RETURN as libc::c_int != 0 ) as libc::c_int; + + if exit_immediately_on_error != 0 && invert != 0 { + (*command).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + + exec_result = EXECUTION_SUCCESS as libc::c_int; + + if (*command).type_ == command_type_cm_subshell + && (*command).flags & CMD_NO_FORK as libc::c_int != 0 + { + return execute_in_subshell( + command, + asynchronous, + pipe_in, + pipe_out, + fds_to_close, + ); + } + if (*command).type_ == command_type_cm_coproc { + last_command_exit_value = execute_coproc(command, pipe_in, pipe_out, fds_to_close); + return last_command_exit_value; + } + + user_subshell = ((*command).type_ == command_type_cm_subshell + || (*command).flags & CMD_WANT_SUBSHELL as libc::c_int != 0 ) as libc::c_int; + + if (*command).type_ == command_type_cm_subshell + || (*command).flags & (CMD_WANT_SUBSHELL as libc::c_int | CMD_FORCE_SUBSHELL as libc::c_int) != 0 + || shell_control_structure((*command).type_ as libc::c_uint) != 0 + && (pipe_out != NO_PIPE || pipe_in != NO_PIPE + || asynchronous != 0) + { + let mut paren_pid: pid_t = 0; + let mut s: libc::c_int = 0; + let mut p: *mut libc::c_char = 0 as *mut libc::c_char; + + save_line_number = line_number; + if (*command).type_== command_type_cm_subshell + { + line_number = (*(*command).value.Subshell).line; + line_number_for_err_trap = line_number; + } + + tcmd = make_command_string(command); + fork_flags = if asynchronous != 0 { FORK_ASYNC as libc::c_int } else { 0 }; + p = savestring!(tcmd); + paren_pid = make_child(p, fork_flags); + + if user_subshell != 0 + && signal_is_trapped(ERROR_TRAP as libc::c_int) != 0 + && signal_in_progress(DEBUG_TRAP as libc::c_int) == 0 + && running_trap == 0 + { + FREE!(the_printed_command_except_trap); + the_printed_command_except_trap = savestring!(the_printed_command); + } + + if paren_pid == 0 { + FREE!(p); + s = (user_subshell == 0 + && (*command).type_ == command_type_cm_group + && pipe_in == NO_PIPE && pipe_out == NO_PIPE + && asynchronous != 0) as libc::c_int; + + s += (user_subshell == 0 + && (*command).type_== command_type_cm_group + && (pipe_in != NO_PIPE || pipe_out != NO_PIPE) + && asynchronous == 0 ) as libc::c_int; + + last_command_exit_value = execute_in_subshell(command, asynchronous, pipe_in, pipe_out, fds_to_close); + if s != 0 { + subshell_exit(last_command_exit_value); + } else { + sh_exit(last_command_exit_value); + } + } else { + close_pipes(pipe_in, pipe_out); + + if variable_context == 0 { + unlink_fifo_list(); + } + + if pipe_out != NO_PIPE { + return EXECUTION_SUCCESS as c_int; + } + + stop_pipeline(asynchronous, 0 as *mut COMMAND); + + line_number = save_line_number; + + if asynchronous == 0 { + was_error_trap = (signal_is_trapped(ERROR_TRAP as c_int) != 0 + && signal_is_ignored( ERROR_TRAP as c_int) == 0 ) as libc::c_int; + invert = ((*command).flags & CMD_INVERT_RETURN as libc::c_int != 0 ) as libc::c_int; + ignore_return = ((*command).flags & CMD_IGNORE_RETURN as libc::c_int != 0) as libc::c_int; + + exec_result = wait_for(paren_pid, 0 ); + + if invert != 0 { + exec_result = if exec_result == EXECUTION_SUCCESS as libc::c_int { + EXECUTION_FAILURE as libc::c_int + } else { + EXECUTION_SUCCESS as libc::c_int + }; + } + + last_command_exit_value = exec_result; + if user_subshell != 0 && was_error_trap != 0 + && ignore_return == 0 && invert == 0 + && exec_result != EXECUTION_SUCCESS as libc::c_int + { + save_line_number = line_number; + line_number = line_number_for_err_trap; + run_error_trap(); + line_number = save_line_number; + } + + if user_subshell != 0 && ignore_return == 0 + && invert == 0 && exit_immediately_on_error != 0 + && exec_result != EXECUTION_SUCCESS as libc::c_int + { + run_pending_traps(); + jump_to_top_level(ERREXIT as libc::c_int); + } + return last_command_exit_value; + } else { + DESCRIBE_PID!(paren_pid); + + run_pending_traps(); + + last_command_exit_value = 0; + return EXECUTION_SUCCESS as libc::c_int; + } + } + } + if (*command).flags & CMD_TIME_PIPELINE as libc::c_int != 0 + { + if asynchronous != 0 { + (*command).flags |= CMD_FORCE_SUBSHELL as libc::c_int; + exec_result = execute_command_internal( + command, + 1, + pipe_in, + pipe_out, + fds_to_close, + ); + } else { + exec_result = time_command( + command, + asynchronous, + pipe_in, + pipe_out, + fds_to_close, + ); + currently_executing_command = 0 as *mut COMMAND; + } + return exec_result; + } + if shell_control_structure((*command).type_ ) != 0 && !((*command).redirects).is_null() + { + stdin_redir = stdin_redirects((*command).redirects); + } + + if variable_context != 0 || executing_list != 0 { + ofifo = num_fifos(); + ofifo_list = copy_fifo_list(&mut osize as *mut libc::c_int); + begin_unwind_frame( b"internal_fifos\0" as *const u8 as *mut libc::c_char); + if !ofifo_list.is_null() { + add_unwind_protect( + ::std::mem::transmute::< + unsafe extern "C" fn(*mut c_void) -> (), + *mut Function, + >(xfree), + ofifo_list as *mut c_char); + } + saved_fifo = 1; + } else { + saved_fifo = 0; + } + + was_error_trap = (signal_is_trapped(ERROR_TRAP as c_int) != 0 + && signal_is_ignored(ERROR_TRAP as libc::c_int) == 0 ) as libc::c_int; + ignore_return = ((*command).flags & CMD_IGNORE_RETURN as libc::c_int != 0 ) as libc::c_int; + + if do_redirections((*command).redirects, RX_ACTIVE as libc::c_int | RX_UNDOABLE as libc::c_int) != 0 + { + undo_partial_redirects(); + dispose_exec_redirects(); + if saved_fifo != 0 { + free(ofifo_list as *mut c_void); + discard_unwind_frame(b"internal_fifos\0" as *const u8 as *mut libc::c_char); + } + + last_command_exit_value = EXECUTION_FAILURE as c_int; + if ignore_return == 0 && invert == 0 && pipe_in == NO_PIPE && pipe_out == NO_PIPE + { + if was_error_trap != 0 { + save_line_number = line_number; + line_number = line_number_for_err_trap; + run_error_trap(); + line_number = save_line_number; + } + if exit_immediately_on_error != 0 { + run_pending_traps(); + jump_to_top_level(ERREXIT as libc::c_int); + } + } + return last_command_exit_value; + } + + my_undo_list = redirection_undo_list; + redirection_undo_list = 0 as *mut REDIRECT; + + exec_undo_list = exec_redirection_undo_list; + exec_redirection_undo_list = 0 as *mut REDIRECT; + + if !my_undo_list.is_null() || !exec_undo_list.is_null() { + begin_unwind_frame( b"loop_redirections\0" as *const u8 as *mut libc::c_char); + } + if !my_undo_list.is_null() { + add_unwind_protect( + std::mem::transmute::< + unsafe extern "C" fn(*mut REDIRECT) -> (), + *mut Function, + >(cleanup_redirects), + my_undo_list as *mut c_char, + ); + } + if !exec_undo_list.is_null() { + add_unwind_protect( + transmute::< + unsafe extern "C" fn (arg1: *mut REDIRECT) -> (), + *mut Function, + >(dispose_redirects), + exec_undo_list as *mut c_char, + ); + } + + QUIT!(); + + match (*command).type_ { + command_type_cm_simple => { + save_line_number = line_number; + was_error_trap = (signal_is_trapped(ERROR_TRAP as libc::c_int) != 0 + && signal_is_ignored(ERROR_TRAP as libc::c_int) == 0) as libc::c_int; + + if ignore_return != 0 && !((*command).value.Simple).is_null() { + (*(*command).value.Simple).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + if (*command).flags & CMD_STDIN_REDIR as libc::c_int != 0 { + (*(*command).value.Simple).flags |= CMD_STDIN_REDIR as libc::c_int; + } + + line_number = (*(*command).value.Simple).line; + line_number_for_err_trap = line_number; + exec_result = execute_simple_command( + (*command).value.Simple, + pipe_in, + pipe_out, + asynchronous, + fds_to_close, + ); + line_number = save_line_number; + + dispose_used_env_vars(); + + if already_making_children != 0 && pipe_out == NO_PIPE { + stop_pipeline(asynchronous, 0 as *mut COMMAND); + if asynchronous != 0 { + DESCRIBE_PID!(last_made_pid); + exec_result = EXECUTION_SUCCESS as libc::c_int; + invert = 0; + } else if last_made_pid != NO_PID!() { + exec_result = wait_for(last_made_pid, 0 as libc::c_int); + } + } + + if was_error_trap != 0 && ignore_return == 0 + && invert == 0 && pipe_in == NO_PIPE + && pipe_out == NO_PIPE + && (*(*command).value.Simple).flags & CMD_COMMAND_BUILTIN as libc::c_int == 0 + && exec_result != EXECUTION_SUCCESS as libc::c_int + { + last_command_exit_value = exec_result; + line_number = line_number_for_err_trap; + run_error_trap(); + line_number = save_line_number; + } + + if ignore_return == 0 && invert == 0 + && (posixly_correct != 0 && interactive == 0 + && special_builtin_failed != 0 + || exit_immediately_on_error != 0 && pipe_in == NO_PIPE + && pipe_out == NO_PIPE + && exec_result != EXECUTION_SUCCESS as libc::c_int) + { + last_command_exit_value = exec_result; + run_pending_traps(); + if exit_immediately_on_error != 0 + && signal_is_trapped(0 ) != 0 + && unwind_protect_tag_on_stack( + b"saved-redirects\0" as *const u8 as *const libc::c_char, + ) != 0 + { + run_unwind_frame(b"saved-redirects\0" as *const u8 as *mut libc::c_char); + } + jump_to_top_level(4 as libc::c_int); + } + } + command_type_cm_for => { + if ignore_return != 0 { + (*(*command).value.For).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + exec_result = execute_for_command((*command).value.For); + } + command_type_cm_arith_for => { + if ignore_return != 0 { + (*(*command).value.ArithFor).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + exec_result = execute_arith_for_command((*command).value.ArithFor); + } + command_type_cm_select => { + if ignore_return != 0 { + (*(*command).value.Select).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + exec_result = execute_select_command((*command).value.Select); + } + command_type_cm_case => { + if ignore_return != 0 { + (*(*command).value.Case).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + exec_result = execute_case_command((*command).value.Case); + } + command_type_cm_while => { + if ignore_return != 0 { + (*(*command).value.While).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + exec_result = execute_while_command((*command).value.While); + } + command_type_cm_until => { + if ignore_return != 0 { + (*(*command).value.While).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + exec_result = execute_until_command((*command).value.While); + } + command_type_cm_if => { + if ignore_return != 0 { + (*(*command).value.If).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + exec_result = execute_if_command((*command).value.If); + } + command_type_cm_group => { + if asynchronous != 0 { + (*command).flags |= CMD_FORCE_SUBSHELL as libc::c_int; + exec_result = execute_command_internal( + command, + 1 , + pipe_in, + pipe_out, + fds_to_close, + ); + } else { + if ignore_return != 0 && !((*(*command).value.Group).command).is_null() { + (*(*(*command).value.Group).command).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + exec_result = execute_command_internal( + (*(*command).value.Group).command, + asynchronous, + pipe_in, + pipe_out, + fds_to_close, + ); + } + } + command_type_cm_connection => { + exec_result = execute_connection( + command, + asynchronous, + pipe_in, + pipe_out, + fds_to_close, + ); + if asynchronous != 0 { + invert = 0; + } + } + command_type_cm_arith | command_type_cm_cond | command_type_cm_function_def => { + was_error_trap = (signal_is_trapped(ERROR_TRAP as libc::c_int) != 0 + && signal_is_ignored(ERROR_TRAP as libc::c_int) == 0 ) as libc::c_int; + if ignore_return != 0 + && (*command).type_== command_type_cm_arith + { + (*(*command).value.Arith).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + if ignore_return != 0 + && (*command).type_ == command_type_cm_cond + { + (*(*command).value.Cond).flags |= CMD_IGNORE_RETURN as libc::c_int; + } + line_number_for_err_trap = save_line_number; + line_number_for_err_trap = line_number; + + if (*command).type_== command_type_cm_arith + { + exec_result = execute_arith_command((*command).value.Arith); + } else if (*command).type_ == command_type_cm_cond + { + exec_result = execute_cond_command((*command).value.Cond); + } else if (*command).type_ == command_type_cm_function_def + { + exec_result = execute_intern_function( + (*(*command).value.Function_def).name, + (*command).value.Function_def, + ); + } + line_number = save_line_number; + if was_error_trap != 0 && ignore_return == 0 + && invert == 0 && exec_result != EXECUTION_SUCCESS as libc::c_int + { + last_command_exit_value = exec_result; + save_line_number = line_number; + line_number = line_number_for_err_trap; + run_error_trap(); + line_number = save_line_number; + } + if ignore_return == 0 && invert == 0 + && exit_immediately_on_error != 0 && exec_result != EXECUTION_SUCCESS as libc::c_int + { + last_command_exit_value = exec_result; + run_pending_traps(); + jump_to_top_level(ERREXIT as libc::c_int); + } + } + _ => { + command_error( + b"execute_command\0" as *const u8 as *const libc::c_char, + CMDERR_BADTYPE as libc::c_int, + (*command).type_ as libc::c_int, + 0, + ); + } + } + if !my_undo_list.is_null() { + cleanup_redirects(my_undo_list); + } + if !exec_undo_list.is_null() { + dispose_redirects(exec_undo_list); + } + if !my_undo_list.is_null() || !exec_undo_list.is_null() { + discard_unwind_frame(b"loop_redirections\0" as *const u8 as *mut libc::c_char); + } + + if saved_fifo != 0 { + nfifo = num_fifos(); + if nfifo > ofifo { + close_new_fifos(ofifo_list as *mut libc::c_void, osize); + } + free(ofifo_list as *mut c_void); + discard_unwind_frame(b"internal_fifos\0" as *const u8 as *mut libc::c_char); + } + + if invert != 0 { + exec_result = if exec_result == EXECUTION_SUCCESS as libc::c_int { + EXECUTION_FAILURE as libc::c_int + } else { + EXECUTION_SUCCESS as libc::c_int + }; + } + match (*command).type_ { + command_type_cm_arith | command_type_cm_cond => { + set_pipestatus_from_exit(exec_result); + } + _ => {} + } + last_command_exit_value = exec_result; + run_pending_traps(); + currently_executing_command = 0 as *mut COMMAND; + return last_command_exit_value; +} + +static mut precs: [libc::c_int; 4] = [ + 0 as libc::c_int, + 100 as libc::c_int, + 10 as libc::c_int, + 1 as libc::c_int, +]; + +unsafe extern "C" fn mkfmt( + mut buf: *mut libc::c_char, + mut prec: libc::c_int, + mut lng: libc::c_int, + mut sec: time_t, + mut sec_fraction: libc::c_int, +) -> libc::c_int { + let mut min: time_t = 0; + let mut abuf: [libc::c_char; 22] = [0; 22]; + let mut ind: libc::c_int = 0; + let mut aind: libc::c_int = 0; + + ind = 0; + abuf[((size_of::<[libc::c_char; 22]>() ) - 1)] = '\u{0}' as libc::c_char; + + if lng != 0 { + min = sec / 60 as libc::c_long; + sec %= 60 as libc::c_long; + aind = (size_of::<[libc::c_char; 22]>() -2 ) as libc::c_int; + loop { //有可能aind的值不正确 + abuf[aind as usize] = (min % 10 + '0' as libc::c_long) as libc::c_char; + aind = aind - 1; + min /= 10 as libc::c_long; + if !(min != 0) { + break; + } + } + aind += 1; + while abuf[aind as usize] != 0 { //有可能ind,aind的值不正确 + *buf.offset(ind as isize) = abuf[aind as usize]; + aind = aind + 1; + ind = ind + 1; + } + *buf.offset(ind as isize) = 'm' as libc::c_char; + ind = ind + 1; + } + + aind = ( size_of::<[libc::c_char; 22]>() -2 ) as libc::c_int; + loop { + abuf[aind as usize] = ((sec % 10 )+ '0' as libc::c_long) as libc::c_char; + aind = aind - 1; + sec /= 10 ; + if !(sec != 0) { + break; + } + } + aind += 1; + while abuf[aind as usize] != 0 { + *buf.offset(ind as isize) = abuf[aind as usize]; + aind = aind + 1; + ind = ind + 1; + } + + if prec != 0 { + *buf.offset(ind as isize) = locale_decpoint() as libc::c_char; + ind = ind + 1; + aind = 1 ; + while aind <= prec { + *buf.offset(ind as isize) = (sec_fraction / precs[aind as usize] + '0' as i32) as libc::c_char; + ind = ind + 1; + sec_fraction %= precs[aind as usize]; + aind += 1; + } + } + + if lng != 0 { + *buf.offset(ind as isize) = 's' as libc::c_char; + ind = ind + 1; + } + *buf.offset(ind as isize) = '\u{0}' as libc::c_char; + + return ind; +} + +unsafe extern "C" fn print_formatted_time( + mut fp: *mut FILE, + mut format: *mut libc::c_char, + mut rs: time_t, + mut rsf: libc::c_int, + mut us: time_t, + mut usf: libc::c_int, + mut ss: time_t, + mut ssf: libc::c_int, + mut cpu: libc::c_int, +) { + let mut prec: libc::c_int = 0; + let mut lng: libc::c_int = 0; + let mut len: libc::c_int = 0; + let mut str: *mut libc::c_char = 0 as *mut libc::c_char; + let mut s: *mut libc::c_char = 0 as *mut libc::c_char; + let mut ts: [libc::c_char; 30] = [0; 30]; + let mut sum: time_t = 0; + let mut sum_frac: libc::c_int = 0; + let mut sindex: libc::c_int = 0; + let mut ssize: libc::c_int = 0; + + len = strlen(format) as libc::c_int; + ssize = (len + 64) - (len % 64); + str = malloc(ssize as usize) as *mut c_char; + sindex = 0 ; + + s = format; + while *s != 0 { + if *s as libc::c_int != '%' as i32 + || *s.offset(1 as isize) as libc::c_int == '\u{0}' as i32 + { + RESIZE_MALLOCED_BUFFER!(str, sindex, 1, ssize, 64); + *str.offset(sindex as isize) = *s; + sindex = sindex + 1; + } else if *s.offset(1 as isize) as libc::c_int == '%' as i32 { + s = s.offset(1); + RESIZE_MALLOCED_BUFFER!(str, sindex, 1, ssize, 64); + *str.offset(sindex as isize) = *s; + sindex = sindex + 1; + } else if *s.offset(1 as isize) as libc::c_int == 'P' as i32 { + s = s.offset(1); + sum = (cpu / 100 ) as time_t; + sum_frac = cpu % 100 * 10; + len = mkfmt( + ts.as_mut_ptr(), + 2 , + 0 , + sum, + sum_frac, + ); + RESIZE_MALLOCED_BUFFER!(str, sindex, len, ssize, 64); + strcpy(str.offset(sindex as isize), ts.as_mut_ptr()); + sindex += len; + } else { + prec = 3 ; + lng = 0 ; + s = s.offset(1); + if DIGIT(*s) { + prec = *s as libc::c_int - '0' as i32; + s = s.offset(1); + if prec > 3 { + prec = 3 ; + } + } + if *s as libc::c_int == 'l' as i32 { + lng = 1 ; + s = s.offset(1); + } + if *s as libc::c_int == 'R' as i32 || *s as libc::c_int == 'E' as i32 { + len = mkfmt(ts.as_mut_ptr(), prec, lng, rs, rsf); + } else if *s as libc::c_int == 'U' as i32 { + len = mkfmt(ts.as_mut_ptr(), prec, lng, us, usf); + } else if *s as libc::c_int == 'S' as i32 { + len = mkfmt(ts.as_mut_ptr(), prec, lng, ss, ssf); + } else { + internal_error( + b"TIMEFORMAT: `%c': invalid format character\0" as *const u8 as *mut c_char, + *s as libc::c_int, + ); + free(str as *mut c_void); + return; + } + + RESIZE_MALLOCED_BUFFER!(str, sindex, len, ssize, 64); + strcpy(str.offset(sindex as isize), ts.as_mut_ptr()); + sindex += len; + } + s = s.offset(1); + } + *str.offset(sindex as isize) = '\u{0}' as libc::c_char; + fprintf(fp, b"%s\n\0" as *const u8 as *const libc::c_char, str); + fflush(fp); + free(str as *mut c_void); +} + +unsafe extern "C" fn time_command( + mut command: *mut COMMAND, + mut asynchronous: libc::c_int, + mut pipe_in: libc::c_int, + mut pipe_out: libc::c_int, + mut fds_to_close: *mut fd_bitmap, +) -> libc::c_int { + let mut rv: libc::c_int = 0; + let mut posix_time: libc::c_int = 0; + let mut old_flags: libc::c_int = 0; + let mut nullcmd: libc::c_int = 0; + let mut code: libc::c_int = 0; + let mut rs: time_t = 0; + let mut us: time_t = 0; + let mut ss: time_t = 0; + let mut rsf: libc::c_int = 0; + let mut usf: libc::c_int = 0; + let mut ssf: libc::c_int = 0; + let mut cpu: libc::c_int = 0; + let mut time_format: *mut libc::c_char = 0 as *mut libc::c_char; + let mut save_top_level: sigjmp_buf = [__jmp_buf_tag { + __jmpbuf: [0; 8], + __mask_was_saved: 0, + __saved_mask: __sigset_t { __val: [0; 16] }, + }; 1]; + let mut real: timeval = timeval { tv_sec: 0, tv_usec: 0 }; + let mut user: timeval = timeval { tv_sec: 0, tv_usec: 0 }; + let mut sys: timeval = timeval { tv_sec: 0, tv_usec: 0 }; + let mut before: timeval = timeval { tv_sec: 0, tv_usec: 0 }; + let mut after: timeval = timeval { tv_sec: 0, tv_usec: 0 }; + let mut dtz: timezone = timezone { + tz_minuteswest: 0, + tz_dsttime: 0, + }; + let mut selfb: rusage = rusage { + ru_utime: timeval { tv_sec: 0, tv_usec: 0 }, + ru_stime: timeval { tv_sec: 0, tv_usec: 0 }, + __bindgen_anon_1: rusage__bindgen_ty_1 { ru_maxrss: 0 }, + __bindgen_anon_2: rusage__bindgen_ty_2 { ru_ixrss: 0 }, + __bindgen_anon_3: rusage__bindgen_ty_3 { ru_idrss: 0 }, + __bindgen_anon_4: rusage__bindgen_ty_4 { ru_isrss: 0 }, + __bindgen_anon_5: rusage__bindgen_ty_5 { ru_minflt: 0 }, + __bindgen_anon_6: rusage__bindgen_ty_6 { ru_majflt: 0 }, + __bindgen_anon_7: rusage__bindgen_ty_7 { ru_nswap: 0 }, + __bindgen_anon_8: rusage__bindgen_ty_8{ ru_inblock: 0 }, + __bindgen_anon_9: rusage__bindgen_ty_9 { ru_oublock: 0 }, + __bindgen_anon_10: rusage__bindgen_ty_10 { ru_msgsnd: 0 }, + __bindgen_anon_11: rusage__bindgen_ty_11 { ru_msgrcv: 0 }, + __bindgen_anon_12: rusage__bindgen_ty_12 { ru_nsignals: 0 }, + __bindgen_anon_13: rusage__bindgen_ty_13 { ru_nvcsw: 0 }, + __bindgen_anon_14: rusage__bindgen_ty_14 { ru_nivcsw: 0 }, + }; + let mut selfa: rusage = rusage { + ru_utime: timeval { tv_sec: 0, tv_usec: 0 }, + ru_stime: timeval { tv_sec: 0, tv_usec: 0 }, + __bindgen_anon_1: rusage__bindgen_ty_1 { ru_maxrss: 0 }, + __bindgen_anon_2: rusage__bindgen_ty_2 { ru_ixrss: 0 }, + __bindgen_anon_3: rusage__bindgen_ty_3 { ru_idrss: 0 }, + __bindgen_anon_4: rusage__bindgen_ty_4 { ru_isrss: 0 }, + __bindgen_anon_5: rusage__bindgen_ty_5 { ru_minflt: 0 }, + __bindgen_anon_6: rusage__bindgen_ty_6 { ru_majflt: 0 }, + __bindgen_anon_7: rusage__bindgen_ty_7 { ru_nswap: 0 }, + __bindgen_anon_8: rusage__bindgen_ty_8{ ru_inblock: 0 }, + __bindgen_anon_9: rusage__bindgen_ty_9 { ru_oublock: 0 }, + __bindgen_anon_10: rusage__bindgen_ty_10 { ru_msgsnd: 0 }, + __bindgen_anon_11: rusage__bindgen_ty_11 { ru_msgrcv: 0 }, + __bindgen_anon_12: rusage__bindgen_ty_12 { ru_nsignals: 0 }, + __bindgen_anon_13: rusage__bindgen_ty_13 { ru_nvcsw: 0 }, + __bindgen_anon_14: rusage__bindgen_ty_14 { ru_nivcsw: 0 }, + }; + let mut kidsb: rusage = rusage { + ru_utime: timeval { tv_sec: 0, tv_usec: 0 }, + ru_stime: timeval { tv_sec: 0, tv_usec: 0 }, + __bindgen_anon_1: rusage__bindgen_ty_1 { ru_maxrss: 0 }, + __bindgen_anon_2: rusage__bindgen_ty_2 { ru_ixrss: 0 }, + __bindgen_anon_3: rusage__bindgen_ty_3 { ru_idrss: 0 }, + __bindgen_anon_4: rusage__bindgen_ty_4 { ru_isrss: 0 }, + __bindgen_anon_5: rusage__bindgen_ty_5 { ru_minflt: 0 }, + __bindgen_anon_6: rusage__bindgen_ty_6 { ru_majflt: 0 }, + __bindgen_anon_7: rusage__bindgen_ty_7 { ru_nswap: 0 }, + __bindgen_anon_8: rusage__bindgen_ty_8{ ru_inblock: 0 }, + __bindgen_anon_9: rusage__bindgen_ty_9 { ru_oublock: 0 }, + __bindgen_anon_10: rusage__bindgen_ty_10 { ru_msgsnd: 0 }, + __bindgen_anon_11: rusage__bindgen_ty_11 { ru_msgrcv: 0 }, + __bindgen_anon_12: rusage__bindgen_ty_12 { ru_nsignals: 0 }, + __bindgen_anon_13: rusage__bindgen_ty_13 { ru_nvcsw: 0 }, + __bindgen_anon_14: rusage__bindgen_ty_14 { ru_nivcsw: 0 }, + }; + let mut kidsa: rusage = rusage { + ru_utime: timeval { tv_sec: 0, tv_usec: 0 }, + ru_stime: timeval { tv_sec: 0, tv_usec: 0 }, + __bindgen_anon_1: rusage__bindgen_ty_1 { ru_maxrss: 0 }, + __bindgen_anon_2: rusage__bindgen_ty_2 { ru_ixrss: 0 }, + __bindgen_anon_3: rusage__bindgen_ty_3 { ru_idrss: 0 }, + __bindgen_anon_4: rusage__bindgen_ty_4 { ru_isrss: 0 }, + __bindgen_anon_5: rusage__bindgen_ty_5 { ru_minflt: 0 }, + __bindgen_anon_6: rusage__bindgen_ty_6 { ru_majflt: 0 }, + __bindgen_anon_7: rusage__bindgen_ty_7 { ru_nswap: 0 }, + __bindgen_anon_8: rusage__bindgen_ty_8{ ru_inblock: 0 }, + __bindgen_anon_9: rusage__bindgen_ty_9 { ru_oublock: 0 }, + __bindgen_anon_10: rusage__bindgen_ty_10 { ru_msgsnd: 0 }, + __bindgen_anon_11: rusage__bindgen_ty_11 { ru_msgrcv: 0 }, + __bindgen_anon_12: rusage__bindgen_ty_12 { ru_nsignals: 0 }, + __bindgen_anon_13: rusage__bindgen_ty_13 { ru_nvcsw: 0 }, + __bindgen_anon_14: rusage__bindgen_ty_14 { ru_nivcsw: 0 }, + }; + + gettimeofday(&mut before, &mut dtz); + getrusage(RUSAGE_SELF, &mut selfb); + getrusage(RUSAGE_CHILDREN, &mut kidsb); + + posix_time = (!command.is_null() && (*command).flags & CMD_TIME_POSIX as libc::c_int != 0) as libc::c_int; + nullcmd = (command.is_null() + || (*command).type_ == command_type_cm_simple + && ((*(*command).value.Simple).words).is_null() + && ((*(*command).value.Simple).redirects).is_null()) as libc::c_int; + if posixly_correct != 0 && nullcmd != 0 { + kidsb.ru_stime.tv_sec = 0 as __time_t; + selfb.ru_stime.tv_sec = kidsb.ru_stime.tv_sec; + kidsb.ru_utime.tv_sec = selfb.ru_stime.tv_sec; + selfb.ru_utime.tv_sec = kidsb.ru_utime.tv_sec; + kidsb.ru_stime.tv_usec = 0 as __suseconds_t; + selfb.ru_stime.tv_usec = kidsb.ru_stime.tv_usec; + kidsb.ru_utime.tv_usec = selfb.ru_stime.tv_usec; + selfb.ru_utime.tv_usec = kidsb.ru_utime.tv_usec; + before = shellstart; + } + + old_flags = (*command).flags; + COPY_PROCENV!(top_level, save_top_level); + (*command).flags &= !(CMD_TIME_PIPELINE as libc::c_int | CMD_TIME_POSIX as libc::c_int); + code = setjmp_nosigs!(top_level); + if code == NOT_JUMPED as libc::c_int { + rv = execute_command_internal( + command, + asynchronous, + pipe_in, + pipe_out, + fds_to_close, + ); + (*command).flags = old_flags; + } + COPY_PROCENV!(save_top_level, top_level); + + ss = 0 as time_t; + us = ss; + rs = us; + cpu = 0; + ssf = cpu; + usf = ssf; + rsf = usf; + + gettimeofday(&mut after, &mut dtz); + + getrusage(RUSAGE_SELF, &mut selfa); + getrusage(RUSAGE_CHILDREN, &mut kidsa); + + difftimeval(&mut real, &mut before, &mut after); + timeval_to_secs(&mut real, &mut rs, &mut rsf); + + addtimeval( + &mut user, + difftimeval(&mut after, &mut selfb.ru_utime, &mut selfa.ru_utime), + difftimeval(&mut before, &mut kidsb.ru_utime, &mut kidsa.ru_utime), + ); + timeval_to_secs(&mut user, &mut us, &mut usf); + + addtimeval( + &mut sys, + difftimeval(&mut after, &mut selfb.ru_stime, &mut selfa.ru_stime), + difftimeval(&mut before, &mut kidsb.ru_stime, &mut kidsa.ru_stime), + ); + timeval_to_secs(&mut sys, &mut ss, &mut ssf); + + cpu = timeval_to_cpu(&mut real, &mut user, &mut sys); + + if posix_time != 0 { + time_format = POSIX_TIMEFORMAT!(); + } else { + time_format = get_string_value(b"TIMEFORMAT\0" as *const u8 as *const libc::c_char); + if time_format.is_null() { + if posixly_correct != 0 && nullcmd != 0 { + time_format = b"user\t%2lU\nsys\t%2lS\0" as *const u8 as *mut libc::c_char; + } else { + time_format = BASH_TIMEFORMAT!(); + } + } + } + if !time_format.is_null() && *time_format as libc::c_int != 0 { + print_formatted_time(stderr, time_format, rs, rsf, us, usf, ss, ssf, cpu); + } + if code != 0 { + siglongjmp(top_level.as_mut_ptr(), code); + } + return rv; +} + +unsafe extern "C" fn execute_in_subshell( + mut command: *mut COMMAND, + mut asynchronous: libc::c_int, + mut pipe_in: libc::c_int, + mut pipe_out: libc::c_int, + mut fds_to_close: *mut fd_bitmap, +) -> libc::c_int { + let mut user_subshell: libc::c_int = 0; + let mut user_coproc: libc::c_int = 0; + let mut invert: libc::c_int = 0; + let mut return_code: libc::c_int = 0; + let mut function_value: libc::c_int = 0; + let mut should_redir_stdin: libc::c_int = 0; + let mut ois: libc::c_int = 0; + let mut result: libc::c_int = 0; + let mut tcom: *mut COMMAND = 0 as *mut COMMAND; + + subshell_level += 1; + should_redir_stdin = (asynchronous != 0 + && (*command).flags & CMD_STDIN_REDIR as libc::c_int != 0 + && pipe_in == NO_PIPE + && stdin_redirects((*command).redirects) == 0 ) as libc::c_int; + + invert = (((*command).flags & CMD_INVERT_RETURN as c_int) != 0 )as c_int; + user_subshell = ((*command).type_ == command_type_cm_subshell || ((*command).flags & CMD_WANT_SUBSHELL as c_int) != 0) as c_int; + user_coproc = ((*command).type_ == command_type_cm_coproc)as c_int; + (*command).flags &= !(CMD_FORCE_SUBSHELL as libc::c_int | CMD_WANT_SUBSHELL as libc::c_int | CMD_INVERT_RETURN as libc::c_int); + + if asynchronous != 0 { + original_pgrp = -1; + + ois = interactive_shell; + interactive_shell = 0; + + if ois != interactive_shell { + expand_aliases = 0 ; + } + } + + interactive = 0 ; + login_shell = interactive; + + if shell_compatibility_level > 44 { + loop_level = 0 ; + } + + if user_subshell != 0 { + subshell_environment = SUBSHELL_PAREN as libc::c_int; + if asynchronous != 0 { + subshell_environment |= SUBSHELL_ASYNC as libc::c_int; + } + } else { + subshell_environment = 0; + if asynchronous != 0 { + subshell_environment |= SUBSHELL_ASYNC as libc::c_int; + } + if pipe_in != NO_PIPE || pipe_out != NO_PIPE { + subshell_environment |= SUBSHELL_PIPE as libc::c_int; + } + if user_coproc != 0 { + subshell_environment |= SUBSHELL_COPROC as libc::c_int; + } + } + QUIT!(); + CHECK_TERMSIG!(); + + reset_terminating_signals(); + clear_pending_traps(); + reset_signal_handlers(); + subshell_environment |= SUBSHELL_RESETTRAP as libc::c_int; + + if running_trap > 0 { + run_trap_cleanup(running_trap - 1 as libc::c_int); + running_trap = 0 ; + } + + if asynchronous != 0 { + setup_async_signals(); + asynchronous = 0; + } else { + set_sigint_handler(); + } + + set_sigchld_handler(); + + without_job_control(); + + if !fds_to_close.is_null() { + close_fd_bitmap(fds_to_close); + } + + do_piping(pipe_in, pipe_out); + + coproc_closeall(); + + clear_fifo_list(); + + if user_subshell != 0 { + stdin_redir = (stdin_redirects((*command).redirects) != 0 + || pipe_in != NO_PIPE) as libc::c_int; + } else if shell_control_structure((*command).type_ as libc::c_uint) != 0 + && pipe_in != NO_PIPE + { + stdin_redir = 1 ; + } + + if should_redir_stdin != 0 && stdin_redir == 0 { + async_redirect_stdin(); + } + + default_buffered_input = -1; + + if !((*command).redirects).is_null() { + if do_redirections((*command).redirects, RX_ACTIVE as libc::c_int) != 0 + { + exit(if invert != 0 { EXECUTION_SUCCESS as libc::c_int } else { EXECUTION_FAILURE as libc::c_int }); + } + dispose_redirects((*command).redirects); + (*command).redirects = 0 as *mut REDIRECT; + } + + if (*command).type_ == command_type_cm_subshell { + tcom = (*(*command).value.Subshell).command as *mut COMMAND; + } else if user_coproc != 0 { + tcom = (*(*command).value.Coproc).command as *mut COMMAND; + } else { + tcom = command as *mut COMMAND; + } + + if (*command).flags & CMD_TIME_PIPELINE as libc::c_int != 0 { + (*tcom).flags = CMD_TIME_PIPELINE as c_int; + } + if (*command).flags & CMD_TIME_POSIX as libc::c_int != 0 { + (*tcom).flags = CMD_TIME_POSIX as c_int; + } + + if (*command).flags & CMD_IGNORE_RETURN as libc::c_int != 0 && tcom != command as *mut COMMAND { + (*tcom).flags = CMD_IGNORE_RETURN as c_int; + } + + if (user_subshell != 0 || user_coproc != 0) + && ((*tcom).type_ == command_type_cm_simple || (*tcom).type_ == command_type_cm_subshell ) + && (*tcom).flags & CMD_TIME_PIPELINE as libc::c_int == 0 + && (*tcom).flags & CMD_INVERT_RETURN as libc::c_int == 0 + { + (*tcom).flags = CMD_NO_FORK as c_int; + if (*tcom).type_ == command_type_cm_simple { + (*(*tcom).value.Simple).flags |= CMD_NO_FORK as libc::c_int; + } + } + + invert = ((*tcom).flags & CMD_INVERT_RETURN as c_int != 0 ) as c_int; + (*tcom).flags &= !CMD_INVERT_RETURN as c_int; + + result = setjmp_nosigs!(top_level); + + function_value = 0 ; + if return_catch_flag != 0 { + function_value = setjmp_nosigs!(return_catch); + } + + if result == EXITPROG as libc::c_int { + invert = 0; + return_code = last_command_exit_value; + } else if result != 0 { + return_code = if last_command_exit_value == EXECUTION_SUCCESS as libc::c_int { + EXECUTION_FAILURE as libc::c_int + } else { + last_command_exit_value + }; + } else if function_value != 0 { + return_code = return_catch_value; + } else { + return_code = execute_command_internal( + tcom as *mut COMMAND, + asynchronous, + NO_PIPE, + NO_PIPE, + fds_to_close, + ); + } + if invert != 0 { + return_code = if return_code == EXECUTION_SUCCESS as libc::c_int { + EXECUTION_FAILURE as libc::c_int + } else { + EXECUTION_SUCCESS as libc::c_int + }; + } + if user_subshell != 0 && signal_is_trapped(0 ) != 0 { + last_command_exit_value = return_code; + return_code = run_exit_trap(); + } + return return_code; +} + +#[no_mangle] +pub static mut sh_coproc: Coproc = { + let mut init = coproc { + c_name: 0 as *const libc::c_char as *mut libc::c_char, + c_pid: -(1 as libc::c_int), + c_rfd: -(1 as libc::c_int), + c_wfd: -(1 as libc::c_int), + c_rsave: 0 as libc::c_int, + c_wsave: 0 as libc::c_int, + c_flags: 0 as libc::c_int, + c_status: 0 as libc::c_int, + c_lock: 0 as libc::c_int, + }; + init +}; +#[derive(Copy, Clone)] +#[repr(C)] +pub struct cpelement { + pub next: *mut cpelement, + pub coproc: *mut coproc, +} +#[derive(Copy, Clone)] +#[repr(C)] +pub struct cplist { + pub head: *mut cpelement, + pub tail: *mut cpelement, + pub ncoproc: libc::c_int, + pub lock: libc::c_int, +} +pub type cplist_t = cplist; +#[no_mangle] +pub static mut coproc_list: cplist_t = { + let mut init = cplist { + head: 0 as *const cpelement as *mut cpelement, + tail: 0 as *const cpelement as *mut cpelement, + ncoproc: 0 as libc::c_int, + lock: 0, + }; + init +}; +#[no_mangle] +pub unsafe extern "C" fn getcoprocbypid(mut pid: pid_t) -> *mut coproc { + return if pid == sh_coproc.c_pid { &mut sh_coproc } else { 0 as *mut Coproc }; +} + +pub unsafe extern "C" fn cpe_alloc(cp:*mut Coproc)-> *mut cpelement +{ + let mut cpe:*mut cpelement; + + cpe = malloc(size_of::() as usize) as *mut cpelement; + (*cpe).coproc = cp; + (*cpe).next = 0 as *mut cpelement; + + return cpe; +} + +pub unsafe extern "C" fn cpe_dispose(cpe:*mut cpelement) +{ + free(cpe as *mut c_void); +} + +pub unsafe extern "C" fn cpe_add(cp:*mut Coproc)-> *mut cpelement +{ + let mut cpe:*mut cpelement; + + cpe = cpe_alloc(cp); + + if coproc_list.head == 0 as *mut cpelement{ + coproc_list.tail = cpe; + coproc_list.head = cpe; + coproc_list.ncoproc = 0 + } else { + (*coproc_list.tail).next = cpe; + coproc_list.tail = cpe; + } + coproc_list.ncoproc += 1; + + return cpe; +} + +pub unsafe extern "C" fn cpl_delete(pid:pid_t)-> *mut cpelement +{ + let mut prev:*mut cpelement; + let mut p:*mut cpelement; + + p = coproc_list.head; + prev = coproc_list.head; + while !p.is_null(){ + if (*(*p).coproc).c_pid == pid { + (*prev).next = (*p).next; + break; + } + prev = p; + p = (*p).next; + } + + if p==0 as *mut cpelement{ + return 0 as *mut cpelement; + } + + if p == coproc_list.head { + coproc_list.head = (*coproc_list.head).next; + } else if p == coproc_list.tail{ + coproc_list.tail = prev; + } + + coproc_list.ncoproc -= 1; + if coproc_list.ncoproc == 0{ + coproc_list.head = 0 as *mut cpelement; + coproc_list.tail = 0 as *mut cpelement; + }else if coproc_list.ncoproc == 1{ + coproc_list.tail = coproc_list.head; + } + + return p; +} + +pub unsafe extern "C" fn cpl_reap(){ + let mut p:*mut cpelement; + let mut next:*mut cpelement; + let mut nh:*mut cpelement; + let mut nt:*mut cpelement; + + nh = 0 as *mut cpelement; + nt = 0 as *mut cpelement; + next = 0 as *mut cpelement; + + p = coproc_list.head; + while !p.is_null() { + next = (*p).next; + + if ((*(*p).coproc).c_flags & COPROC_DEAD as c_int) != 0 { + coproc_list.ncoproc -= 0; + coproc_dispose((*p).coproc); + cpe_dispose(p); + } else if nh.is_null(){ + nh = p; + nt = p; + } + p = next; + } + + if coproc_list.ncoproc == 0 { + coproc_list.head = 0 as *mut cpelement; + coproc_list.tail = 0 as *mut cpelement; + } else { + if !nt.is_null(){ + (*nt).next = 0 as *mut cpelement; + } + + coproc_list.head = nh; + coproc_list.tail = nt; + if coproc_list.ncoproc == 1{ + coproc_list.tail = coproc_list.head; /* just to make sure */ + } + } +} + + + +pub unsafe extern "C" fn cpl_flush() +{ + let mut cpe:*mut cpelement; + let mut p:*mut cpelement; + + cpe = coproc_list.head; + while !cpe.is_null(){ + p = cpe; + cpe = (*cpe).next; + + coproc_dispose((*p).coproc); + cpe_dispose(p); + } + + coproc_list.head = 0 as *mut cpelement; + coproc_list.tail = 0 as *mut cpelement; + coproc_list.ncoproc = 0; +} + +pub unsafe extern "C" fn cpl_closeall() +{ + let mut cpe:*mut cpelement; + + cpe = coproc_list.head; + while !cpe.is_null() { + coproc_close((*cpe).coproc); + + cpe = (*cpe).next; + } +} + +pub unsafe extern "C" fn cpl_fdchk(fd:c_int) +{ + let mut cpe:*mut cpelement; + + cpe = coproc_list.head; + while !cpe.is_null() { + coproc_checkfd((*cpe).coproc, fd); + + cpe = (*cpe).next; + } +} + +pub unsafe extern "C" fn cpl_search(pid:pid_t)-> *mut cpelement +{ + let mut cpe:*mut cpelement; + + cpe = coproc_list.head; + while !cpe.is_null() { + if (*(*cpe).coproc).c_pid == pid{ + return cpe; + } + cpe = (*cpe).next; + } + + return 0 as *mut cpelement; +} + +pub unsafe extern "C" fn cpl_searchbyname(name: *mut c_char)-> *mut cpelement +{ + let mut cp:*mut cpelement; + + cp = coproc_list.head; + while !cp.is_null() { + if STREQ!((*(*cp).coproc).c_name, name) { + return cp; + } + cp = (*cp).next; + } + + return 0 as *mut cpelement +} + + +pub unsafe extern "C" fn cpl_firstactive()->pid_t +{ + let mut cpe:*mut cpelement; + + cpe = coproc_list.head; + while !cpe.is_null() { + if (*(*cpe).coproc).c_flags & COPROC_DEAD as c_int == 0 { + return (*(*cpe).coproc).c_pid; + } + cpe = (*cpe).next; + } + + return NO_PID!() as pid_t; +} + +#[no_mangle] +pub unsafe extern "C" fn getcoprocbyname(mut name: *const libc::c_char) -> *mut coproc { + return if !(sh_coproc.c_name).is_null() + && STREQ!(sh_coproc.c_name, name) + { + &mut sh_coproc + } else { + 0 as *mut Coproc + }; +} + diff --git a/bash-5.1/r_jobs/src/lib.rs b/bash-5.1/r_jobs/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..5456fce09b6b4711b2a2a27cda68368633d61bf3 --- /dev/null +++ b/bash-5.1/r_jobs/src/lib.rs @@ -0,0 +1,5028 @@ +use libc::{c_int,c_char, c_void, fprintf,fileno, size_t, c_long, getcwd, c_ulong, __errno_location, getpgrp, tcgetpgrp, isatty, open, dup, tcsetpgrp,}; +use std::{ffi::{CString, CStr, }, fmt::Alignment}; +use rcommon::{the_current_working_directory, r_savestring, r_get_working_directory}; +// include!(concat!("jobs_h.rs")); +// include!(concat!("flags_h.rs")); +use r_bash::*; +use stdext::function_name; + + +extern "C" { + static mut interactive: c_int; + static mut interactive_shell: c_int; + static mut subshell_environment: c_int; + static mut stdout: *mut libc::FILE; + static mut stderr: *mut libc::FILE; + static mut posixly_correct:c_int; + static mut default_buffered_input: c_int; + static mut shell_level: c_int; + static mut wait_signal_received: c_int; + static mut this_shell_builtin:sh_builtin_func_t; + static mut last_command_exit_value: c_int; + static mut last_command_exit_signal: c_int; + static mut rl_readline_state: libc::c_ulong; + static mut loop_level: c_int; + static mut shell_compatibility_level: c_int; + static mut executing_list: c_int; + static mut sourcelevel: c_int; + static mut this_command_name: *mut c_char; + static mut trap_list: [*mut c_char; 0]; + static mut running_trap: c_int; + static mut executing_builtin: c_int; + static mut breaking: c_int; + static mut subst_assign_varlist: *mut WORD_LIST; + static mut temporary_env: *mut HASH_TABLE; + static mut startup_state: c_int; + static mut line_number: c_int; + + fn get_string_value(_:*const c_char) -> *mut c_char; + fn sys_error(format:*const c_char, ...); + fn list_reverse(list:*mut GENERIC_LIST) -> *mut GENERIC_LIST; + fn internal_warning(_: *const c_char, _: ...); + fn coproc_reap(); + fn programming_error(_: *const c_char, _: ...); + fn signal_name(_: c_int) -> *mut c_char; + fn sync_buffered_stream(_: c_int) -> c_int; + fn set_exit_status(_: c_int); + fn getpid() -> __pid_t; + fn unset_bash_input(_: c_int); + fn setpgid(__pid: __pid_t, __pgid: __pid_t) -> c_int; + fn signal_is_trapped(_: c_int) -> c_int; + fn signal_is_hard_ignored(_: c_int) -> c_int; + fn set_original_signal(_: c_int, _: Option::); + fn get_original_signal(_: c_int); + fn get_new_window_size(_: c_int, _: *mut c_int, _: *mut c_int); + fn internal_error(_: *const c_char, _: ...); + fn wait_builtin(_: *mut WORD_LIST) -> c_int; + fn siglongjmp(_: *mut __jmp_buf_tag, _: c_int) -> !; + + fn builtin_warning(_: *const c_char, _: ...); + fn waitpid(__pid: __pid_t,__stat_loc: *mut c_int,__options: c_int) -> __pid_t; + fn initialize_traps(); + fn dispose_command(_: *mut COMMAND); + fn coproc_pidchk(_: pid_t, _: c_int); + fn find_procsub_child(_: pid_t) -> c_int; + fn set_procsub_status(_: c_int, _: pid_t, _: c_int); + fn queue_sigchld_trap(_: c_int); + fn signal_in_progress(_: c_int) -> c_int; + fn maybe_call_trap_handler(_: c_int) -> c_int; + fn set_pipestatus_array(_: *mut c_int, _: c_int); + fn unwind_protect_mem(_: *mut c_char, _: c_int); + fn set_impossible_sigchld_trap(); + fn parse_and_execute( + _: *mut c_char, + _: *const c_char, + _: c_int, + ) -> c_int; + fn run_unwind_frame(_: *mut c_char); + fn get_name_for_error() -> *mut c_char; + fn begin_unwind_frame(_: *mut c_char); + fn getmaxchild() -> libc::c_long; + fn add_unwind_protect(cleanup:*mut Function, arg:*mut c_char); + + fn maybe_set_sigchld_trap(_: *mut c_char); + + fn sh_xrealloc( + _: *mut libc::c_void, + _: size_t, + _: *const c_char, + _: c_int, + ) -> *mut libc::c_void; + + fn sh_xmalloc( + _: size_t, + _: *const c_char, + _: c_int, + ) -> *mut libc::c_void; + + +} + +// pub static mut SIG_IGN:__sighandler_t = 1; +#[macro_export] +macro_rules! SIG_IGN { + () => { + ::std::mem::transmute::< + libc::intptr_t, + *mut __sighandler_t, + >(1 as c_int as libc::intptr_t) + }; +} + +#[macro_export] +macro_rules! SIG_DFL { + () => { + ::std::mem::transmute::< + libc::intptr_t, + __sighandler_t, + >(0 as c_int as libc::intptr_t) + }; +} + + +#[derive(Copy, Clone)] +#[repr(C)] +pub struct bucket_contents { + pub next: *mut bucket_contents, + pub key: *mut c_char, + pub data: *mut libc::c_void, + pub khash: libc::c_uint, + pub times_found: c_int, +} +pub type BUCKET_CONTENTS = bucket_contents; + +#[derive(Copy, Clone)] +#[repr(C)] +pub struct hash_table { + pub bucket_array: *mut *mut BUCKET_CONTENTS, + pub nbuckets: c_int, + pub nentries: c_int, +} +pub type HASH_TABLE = hash_table; + +pub type sigjmp_buf = [__jmp_buf_tag; 1]; +pub type __jmp_buf = [libc::c_long; 8]; + +#[derive(Copy, Clone)] +#[repr(C)] +pub struct __jmp_buf_tag { + pub __jmpbuf: __jmp_buf, + pub __mask_was_saved: c_int, + pub __saved_mask: __sigset_t, +} + + +pub const DEFAULT_CHILD_MAX:u32 = 4096; +pub const MAX_CHILD_MAX:u32 = 32768; +pub const MAX_JOBS_IN_ARRAY:u32 = 4096; +pub const r_pidstat_table_SZ:i32 = 4096; +pub const BGPIDS_TABLE_SZ:u32 = 512; +pub const DEL_WARNSTOPPED:u32 = 1; +pub const DEL_NOBGPID:u32 = 2; +pub const JOB_SLOTS:u32 = 8; +pub const NO_PIDSTAT:i32 = -1; +pub const NO_PID:pid_t = -1; + +pub const EAGAIN:i32 = 11; +pub const EX_NOEXEC:i32 = 126; + +pub const ECHILD:i32 = 10; + + +#[macro_export] +macro_rules! PRECYCLED { + ($p:expr) => { + 0 + }; +} + +#[macro_export] +macro_rules! __WIFSTOPPED { + ($status:expr) => { + (($status) & 0xff) == 0x7f + }; +} + + +#[macro_export] +macro_rules! WIFSTOPPED { + ($status:expr) => { + (($status) & 0xff) == 0x7f + }; +} + +#[macro_export] +macro_rules! PSTOPPED { + ($p:expr) => { + WIFSTOPPED!((*$p).status) + } + +} + +#[macro_export] +macro_rules! PRUNNING { + ($p:expr) => { + (*$p).running == PS_RUNNING as c_int + } +} + +#[macro_export] +macro_rules! PALIVE { + ($p:expr) => { + PRUNNING!($p) || PSTOPPED!($p) + } +} + +#[macro_export] +macro_rules! WAITPID { + ($pid:expr, $statusp:expr, $options:expr) => { + waitpid($pid as pid_t, $statusp, $options); + }; +} + +#[macro_export] +macro_rules! getpgid { + ($p:expr) => { + getpgpr(); + }; +} + +#[macro_export] +macro_rules! REINSTALL_SIGCHLD_HANDLER { + () => { + + }; +} + +pub type sh_job_map_func_t = unsafe extern "C" fn(*mut JOB, c_int, c_int, c_int) -> c_int; + +static mut zerojs: jobstats = { + let mut init = jobstats { + c_childmax: -(1 as libc::c_long), + c_living: 0 as c_int, + c_reaped: 0 as c_int, + c_injobs: 0 as c_int, + c_totforked: 0 as c_int, + c_totreaped: 0 as c_int, + j_jobslots: 0 as c_int, + j_lastj: 0 as c_int, + j_firstj: 0 as c_int, + j_njobs: 0 as c_int, + j_ndead: 0 as c_int, + j_current: -(1 as c_int), + j_previous: -(1 as c_int), + j_lastmade: 0 as *const JOB as *mut JOB, + j_lastasync: 0 as *const JOB as *mut JOB, + }; + init +}; + + +#[no_mangle] +pub static mut js: jobstats = { + let mut init = jobstats{ + c_childmax: -(1 as libc::c_long), + c_living: 0 as c_int, + c_reaped: 0 as c_int, + c_injobs: 0 as c_int, + c_totforked: 0 as c_int, + c_totreaped: 0 as c_int, + j_jobslots: 0 as c_int, + j_lastj: 0 as c_int, + j_firstj: 0 as c_int, + j_njobs: 0 as c_int, + j_ndead: 0 as c_int, + j_current: -(1 as c_int), + j_previous: -(1 as c_int), + j_lastmade: 0 as *const JOB as *mut JOB, + j_lastasync: 0 as *const JOB as *mut JOB, + }; + init +}; + +#[no_mangle] +pub static mut r_pidstat_table:[ps_index_t; 4096] = [0; 4096]; + +pub static mut bgpids:bgpids = { + let init = bgpids{ + storage: 0 as *const pidstat as *mut pidstat, + head: 0 as ps_index_t, + nalloc: 0 as ps_index_t, + npid: 0 as c_int, + }; + init +}; + +pub static mut procsubs:procchain = { + let mut init = procchain{ + head: 0 as *mut PROCESS, + end: 0 as *mut PROCESS, + nproc: 0 as c_int, + }; + init +}; + + +#[no_mangle] +pub static mut wait_intr_buf: sigjmp_buf = [ + __jmp_buf_tag{ + __jmpbuf: [0;8], + __mask_was_saved: 0 as c_int, + __saved_mask: __sigset_t{__val:[0;16usize]}, +} ]; + +#[no_mangle] +pub static mut jobs: *mut *mut JOB = 0 as *const c_void as *mut c_void as *mut *mut JOB; + +#[no_mangle] +pub static mut shell_tty:c_int = -1; +#[no_mangle] +pub static mut shell_pgrp:pid_t = -1 as c_int; +pub static mut terminal_pgrp:pid_t = -1; +#[no_mangle] +pub static mut original_pgrp:pid_t = -1; +#[no_mangle] +pub static mut pipeline_pgrp:pid_t = 0 as pid_t; + +#[no_mangle] +pub static mut pgrp_pipe:[c_int; 2] = [-1 as c_int, -1 as c_int]; +#[no_mangle] +pub static mut last_made_pid:pid_t = -1; +#[no_mangle] +pub static mut last_asynchronous_pid: pid_t = -1; +#[no_mangle] +pub static mut the_pipeline:*mut PROCESS = 0 as *const c_void as *mut c_void as *mut PROCESS; +#[no_mangle] +pub static mut job_control: c_int = 1; +#[no_mangle] +pub static mut running_in_background: c_int = 0; +#[no_mangle] +pub static mut already_making_children: c_int = 0; +#[no_mangle] +pub static mut check_window_size: c_int = CHECKWINSIZE_DEFAULT as i32; +#[no_mangle] +pub static mut last_procsub_child:*mut PROCESS = 0 as *const c_void as *mut c_void as *mut PROCESS; + +pub static mut pstatuses:*mut c_int = 0 as *mut c_int; +pub static mut statsize:c_int = 0; + +pub static mut sigchld:c_int = 0; +pub static mut queue_sigchld:c_int = 0; + + +#[macro_export] +macro_rules! QUEUE_SIGCHLD { + ($os:expr) => { + $os = sigchld; + queue_sigchld += 1; + }; +} + +#[no_mangle] +pub unsafe extern "C" fn UNQUEUE_SIGCHLD(os: c_int) { + queue_sigchld -= 1; + if queue_sigchld == 0 && os != sigchld { + queue_sigchld = 1; + waitchld(-1, 0); + queue_sigchld = 0; + } +} + + + +#[no_mangle] +pub unsafe extern "C" fn PSTOPPED(p:*mut PROCESS) -> c_int +{ + if (*p).status & 0xff == 0x7f { + return 1; + } else { + return 0; + } +} + +#[macro_export] +macro_rules! DEADJOB { + ($j:expr) => { + (**jobs.offset($j as isize)).state as c_int == JDEAD + }; +} + +#[macro_export] +macro_rules! IS_NOTIFIED { + ($j:expr) => { + (**jobs.offset($j as isize)).flags & J_NOTIFIED as c_int != 0 as c_int + }; +} + + +#[macro_export] +macro_rules! JOBSTATE { + ($job:expr) => { + (**jobs.offset($job as isize)).state + }; +} + +#[macro_export] +macro_rules! STOPPED { + ($job:expr) => { + (**jobs.offset($job as isize)).state == JSTOPPED + }; +} + +pub const JMIXED: JOB_STATE = 8; +pub const JDEAD: JOB_STATE = 4; +pub const JSTOPPED: JOB_STATE = 2; +pub const JRUNNING: JOB_STATE = 1; +pub const JNONE: JOB_STATE = -1; + +pub static mut old_tstp:*mut SigHandler = 0 as *mut SigHandler; +pub static mut old_ttou:*mut SigHandler = 0 as *mut SigHandler; +pub static mut old_ttin:*mut SigHandler = 0 as *mut SigHandler; +pub static mut old_cont:*mut SigHandler = 0 as *mut SigHandler; //SIG_DFL +pub static mut saved_pipeline:*mut pipeline_saver = 0 as *mut pipeline_saver; +pub static mut saved_already_making_children:c_int = 0; + +pub static mut jobs_list_frozen:c_int = 0; +pub static mut retcode_name_buffer:[c_char; 64] = [0; 64]; + +#[no_mangle] +pub unsafe extern "C" fn BLOCK_CHILD(nvar:*mut sigset_t,ovar:*mut sigset_t) +{ + sigemptyset (nvar); + sigaddset (nvar, SIGCHLD as c_int); + sigemptyset (ovar); + sigprocmask (SIG_BLOCK as i32, nvar, ovar); +} + +#[no_mangle] +pub unsafe extern "C" fn UNBLOCK_CHILD(over:*const sigset_t) +{ + sigprocmask(SIG_SETMASK as c_int, over, 0 as *mut c_void as *mut sigset_t); +} + +/* 函数部分重构 */ +#[no_mangle] +pub unsafe extern "C" fn init_job_stats() +{ + js = zerojs; +} + + +unsafe extern "C" fn current_working_directory() -> *mut c_char +{ + let mut dir:*mut c_char; + let mut d:[c_char; PATH_MAX as usize] = [0; PATH_MAX as usize]; + + dir = get_string_value(b"PWD\0" as *const u8 as *const c_char); + + if dir.is_null() && !the_current_working_directory.is_null() && no_symbolic_links != 0 { + dir = the_current_working_directory; + } + + if dir.is_null() { + dir = getcwd(d.as_mut_ptr(), (::std::mem::size_of::<[ c_char; 4096]>() as libc::c_ulong).try_into().unwrap()); + if !dir.is_null() { + dir = d.as_mut_ptr(); + } + } + + if dir.is_null() { + return b"\0" as *const u8 as *mut c_char; + } else { + return dir; + } +} + +unsafe extern "C" fn job_working_directory() -> *mut c_char +{ + let mut dir:*mut c_char; + + dir = get_string_value(b"PWD\0" as *const u8 as *const c_char); + dir = r_get_working_directory(b"job-working-directory\0" as * const u8 as *mut c_char); + if !dir.is_null() { + return r_savestring(dir) ; + } + + return r_savestring(b"\0" as *const u8 as *const c_char); +} + +#[no_mangle] +pub unsafe extern "C" fn making_children() +{ + if already_making_children != 0 { + return; + } + + already_making_children = 1; + start_pipeline(); +} + +#[no_mangle] +pub unsafe extern "C" fn stop_making_children() +{ + already_making_children = 0; +} + +#[no_mangle] +pub unsafe extern "C" fn cleanup_the_pipeline() +{ + let mut disposer:*mut PROCESS; + let mut set:sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset:sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD(&mut set, &mut oset); + disposer = the_pipeline; + the_pipeline = 0 as *mut PROCESS; + UNBLOCK_CHILD(&mut oset); + + if !disposer.is_null() { + discard_pipeline(disposer); + } +} + +unsafe extern "C" fn alloc_pipeline_saver() -> *mut pipeline_saver +{ + let mut ret:*mut pipeline_saver; + + ret = xmalloc(::std::mem::size_of::() as usize) as *mut pipeline_saver; + + (*ret).pipeline = 0 as *mut process; + (*ret).next = 0 as *mut pipeline_saver; + + return ret; +} + +#[no_mangle] +pub unsafe extern "C" fn save_pipeline(clear:c_int) +{ + let mut set:sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset:sigset_t = __sigset_t { __val: [0; 16] }; + let mut saver:*mut pipeline_saver; + + BLOCK_CHILD(&mut set, &mut oset); + saver = alloc_pipeline_saver(); + (*saver).pipeline = the_pipeline; + (*saver).next = saved_pipeline; + saved_pipeline = saver; + + if clear != 0 { + the_pipeline = 0 as *mut PROCESS; + } + saved_already_making_children = already_making_children; + UNBLOCK_CHILD(&mut oset); +} + +#[no_mangle] +pub unsafe extern "C" fn restore_pipeline(discard:c_int) -> *mut PROCESS +{ + let mut old_pipeline:*mut PROCESS; + let mut set:sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset:sigset_t = __sigset_t { __val: [0; 16] }; + let mut saver:*mut pipeline_saver; + + BLOCK_CHILD (&mut set, &mut oset); + old_pipeline = the_pipeline; + the_pipeline = (*saved_pipeline).pipeline; + saver = saved_pipeline; + saved_pipeline = (*saved_pipeline).next; + free (saver as *mut c_void); + already_making_children = saved_already_making_children; + UNBLOCK_CHILD (&mut oset); + + if discard!= 0 && !old_pipeline.is_null() { + discard_pipeline (old_pipeline); + return 0 as *mut PROCESS ; + } + return old_pipeline; +} + +#[no_mangle] +pub unsafe extern "C" fn start_pipeline () +{ + if !the_pipeline.is_null() { + cleanup_the_pipeline (); + if pipeline_pgrp != shell_pgrp { + pipeline_pgrp = 0 as pid_t; + } + sh_closepipe (pgrp_pipe.as_mut_ptr()); + } + + if job_control != 0 + { + if libc::pipe(pgrp_pipe.as_mut_ptr()) == -1 { + sys_error (b"start_pipeline: pgrp pipe\0" as *const u8 as *const i8); + } + } +} + + +#[no_mangle] +pub unsafe extern "C" fn stop_pipeline(mut async_0:c_int, mut deferred:*mut COMMAND) -> c_int +{ + // println!("stop_pipeline"); + let mut i:c_int; + let mut j:c_int; + let mut newjob:*mut JOB; + let mut set:sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset:sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD (&mut set, &mut oset); + sh_closepipe (pgrp_pipe.as_mut_ptr()); + cleanup_dead_jobs (); + + if js.j_jobslots == 0 { + js.j_jobslots = JOB_SLOTS as c_int; + jobs = xmalloc ((js.j_jobslots * (std::mem::size_of::<*mut JOB>() as c_int)) as usize) as *mut *mut JOB; + + i = 0 as c_int; + while i < js.j_jobslots { + // (*jobs.offset(i as isize)) = 0 as *mut JOB; + (*jobs.offset(i as isize)) = std::ptr::null_mut(); + + i += 1; + } + js.j_njobs = 0 as c_int; + js.j_lastj = js.j_njobs; + js.j_firstj = js.j_lastj; + } + + if interactive != 0 + { + // println!("258963147"); + i = js.j_jobslots; + while i != 0 { + let temp = i -1 ; + if !(*jobs.offset(temp as isize)).is_null() { + // println!("258963147 i={}",i); + break; + } + i -= 1; + } + } else { + if js.j_lastj != 0 { + i = js.j_lastj + 1; + } else { + i = js.j_lastj; + } + while i < js.j_jobslots { + if (*jobs.offset(i as isize)).is_null() { + break; + } + i += 1; + } + } + + if (interactive_shell == 0 || subshell_environment != 0) && + i == js.j_jobslots && js.j_jobslots >= MAX_JOBS_IN_ARRAY as i32{ + i = compact_jobs_list (0 as c_int); + } + + if i == js.j_jobslots { + js.j_jobslots += JOB_SLOTS as i32; + jobs = xrealloc (jobs as *mut c_void, (js.j_jobslots * std::mem::size_of::<*mut JOB>() as c_int) as usize) as *mut *mut JOB; + + j = i; + while j < js.j_jobslots { + (*jobs.offset(j as isize)) = 0 as *mut JOB; + j += 1; + } + } + + if !the_pipeline.is_null() { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut any_running: c_int = 0; + let mut any_stopped: c_int = 0; + let mut n: c_int = 0; + newjob = xmalloc (std::mem::size_of::() as c_int as usize) as *mut JOB; + + n = 1 as c_int; + p = the_pipeline; + while (*p).next != the_pipeline { + n += 1; + p = (*p).next; + } + + (*p).next = 0 as *mut PROCESS; + if !the_pipeline.is_null() && !((*the_pipeline).next).is_null() { + (*newjob).pipe = list_reverse(the_pipeline as *mut GENERIC_LIST) as *mut PROCESS + } else { + (*newjob).pipe = the_pipeline; + }; + + p = (*newjob).pipe; + while !((*p).next).is_null() { + p = (*p).next; + } + + (*p).next = (*newjob).pipe; + + the_pipeline = 0 as *mut PROCESS ; + (*newjob).pgrp = pipeline_pgrp; + + if pipeline_pgrp != shell_pgrp { + pipeline_pgrp = 0; + } + (*newjob).flags = 0; + + if pipefail_opt != 0 { + (*newjob).flags |= J_PIPEFAIL as i32; + } + + if job_control != 0 { + (*newjob).flags |= J_JOBCONTROL as i32; + } + + p = (*newjob).pipe; + any_running = 0; + any_stopped = 0; + + loop{ + any_running |= PRUNNING! (p) as c_int; + any_stopped |= PSTOPPED (p); + p = (*p).next; + if !(p != (*newjob).pipe) { + break; + } + } + + (*newjob).state = (if any_running != 0 { + JRUNNING as c_int + } else if any_stopped != 0 { + JSTOPPED as c_int + } else { + JDEAD as c_int + }) as JOB_STATE; + + (*newjob).wd = job_working_directory(); + (*newjob).deferred = deferred; + + (*newjob).j_cleanup = ::std::mem::transmute::<*mut libc::c_void, sh_vptrfunc_t>(0 as *mut libc::c_void); + (*newjob).cleanarg = 0 as *mut c_void; + + *jobs.offset(i as isize) = newjob; + + if (*newjob).state == JDEAD as c_int + && (*newjob).flags & 0x1 as c_int != 0 + { + setjstatus(i); + } + if (*newjob).state == JDEAD as c_int { + js.c_reaped += n; + js.j_ndead += 1; + } + js.c_injobs += n; + js.j_lastj = i; + js.j_njobs += 1; + + } else { + newjob = 0 as *mut JOB ; + } + + if !newjob.is_null() { + js.j_lastmade = newjob; + } + + if async_0 != 0 + { + if !newjob.is_null() + { + (*newjob).flags &= !J_FOREGROUND as c_int; + (*newjob).flags |= J_ASYNC as c_int; + js.j_lastasync = newjob; + } + reset_current (); + } else { + if !newjob.is_null() { + (*newjob).flags |= J_FOREGROUND as c_int; + + if job_control != 0 && (*newjob).pgrp != 0 && + (subshell_environment&SUBSHELL_ASYNC as c_int) == 0 && + running_in_background == 0 { + maybe_give_terminal_to (shell_pgrp, (*newjob).pgrp, 0); + } + } + } + stop_making_children (); + UNBLOCK_CHILD (&mut oset); + return if !newjob.is_null() { i } else { js.j_current }; +} + + + +macro_rules! TYPE_WIDTH { + ($t:ty) => { + std::mem::size_of::<$t>() * 8 + }; +} + +macro_rules! TYPE_SIGNED { + ($t:ty) => { + !(0 as $t < -1 as $t) + }; +} + +macro_rules! TYPE_MAXIMUM { + ($t:ty) => { + if !TYPE_SIGNED!($t){ + -1 as $t + } else { + (1 << ((TYPE_WIDTH!($t) -2) -1) * 2 + 1) as $t + } + + } +} + +#[no_mangle] +unsafe extern "C" fn bgp_resize () +{ + let mut nsize: ps_index_t = 0; + let mut nsize_cur: ps_index_t = 0; + let mut nsize_max: ps_index_t = 0; + let mut psi: ps_index_t = 0; + + if bgpids.nalloc == 0 { + psi = 0 as c_int; + while psi < r_pidstat_table_SZ as c_int { + r_pidstat_table[psi as usize] = NO_PIDSTAT ; + psi += 1; + } + nsize = BGPIDS_TABLE_SZ as ps_index_t; + bgpids.head = 0 ; + } else { + nsize = bgpids.nalloc; + } + + nsize_max = TYPE_MAXIMUM!(ps_index_t); + nsize_cur = js.c_childmax as ps_index_t; + + if nsize_cur < 0 { + nsize_cur = MAX_CHILD_MAX as c_int; + } + + while nsize > 0 && nsize < nsize_cur { + nsize <<= 1 ; + } + + if nsize > nsize_max || nsize <= 0 { + nsize = nsize_max; + } + + if nsize > MAX_CHILD_MAX as c_int { + nsize_max = MAX_CHILD_MAX as c_int; + nsize = nsize_max; + } + + if bgpids.nalloc < nsize_cur && bgpids.nalloc < nsize_max { + bgpids.storage = xrealloc(bgpids.storage as *mut c_void, (nsize * std::mem::size_of::()as c_int) as usize) as *mut pidstat; + psi = bgpids.nalloc; + while psi < nsize { + (*(bgpids.storage).offset(psi as isize)).pid = -(1 as c_int); + psi += 1; + } + bgpids.nalloc = nsize; + } else if bgpids.head >= bgpids.nalloc { + bgpids.head = 0 as c_int; + } +} + + + + +#[no_mangle] +unsafe extern "C" fn bgp_getindex()-> ps_index_t +{ + if bgpids.nalloc < js.c_childmax as ps_index_t || bgpids.head >= bgpids.nalloc { + bgp_resize(); + } + pshash_delindex(bgpids.head); + bgpids.head += 1; + return bgpids.head; +} + + +#[no_mangle] +unsafe extern "C" fn pshash_getbucket (pid:pid_t) -> *mut ps_index_t +{ + let mut hash: c_ulong = 0; + hash = (pid as libc::c_ulong).wrapping_mul(0x9e370001 as libc::c_ulong); + + + return &mut *r_pidstat_table.as_mut_ptr().offset((hash % r_pidstat_table_SZ as u64) as isize)as *mut ps_index_t; +} + + +#[no_mangle] +unsafe extern "C" fn bgp_add(mut pid: pid_t, mut status: c_int) -> *mut pidstat { + let mut bucket: *mut ps_index_t = 0 as *mut ps_index_t; + let mut psi: ps_index_t = 0; + let mut ps: *mut pidstat = 0 as *mut pidstat; + bucket = pshash_getbucket(pid); + psi = bgp_getindex(); + if psi == *bucket { + (*(bgpids.storage).offset(psi as isize)).pid = -1; + psi = bgp_getindex(); + } + + + ps = &mut *(bgpids.storage).offset(psi as isize) as *mut pidstat; + (*ps).pid = pid; + (*ps).status = status as libc::c_short; + (*ps).bucket_next = *bucket; + (*ps).bucket_prev = -1; + bgpids.npid += 1; + if (*ps).bucket_next != -1 { + (*(bgpids.storage).offset((*ps).bucket_next as isize)).bucket_prev = psi; + } + *bucket = psi; + return ps; +} + + +#[no_mangle] +unsafe extern "C" fn pshash_delindex(mut psi: ps_index_t) { + let mut ps: *mut pidstat = 0 as *mut pidstat; + let mut bucket: *mut ps_index_t = 0 as *mut ps_index_t; + + ps = &mut *(bgpids.storage).offset(psi as isize) as *mut pidstat; + if (*ps).pid == NO_PID { + return; + } + if (*ps).bucket_next != NO_PIDSTAT { + (*(bgpids.storage).offset((*ps).bucket_next as isize)) + .bucket_prev = (*ps).bucket_prev; + } + + if (*ps).bucket_prev != NO_PIDSTAT { + (*(bgpids.storage).offset((*ps).bucket_prev as isize)) + .bucket_next = (*ps).bucket_next; + } else { + bucket = pshash_getbucket((*ps).pid); + *bucket = (*ps).bucket_next; + } + (*ps).pid = NO_PID; + (*ps).bucket_next = NO_PIDSTAT; + (*ps).bucket_prev = NO_PIDSTAT; +} + + +unsafe extern "C" fn bgp_delete(mut pid: pid_t) -> c_int { + let mut psi: ps_index_t = 0; + let mut orig_psi: ps_index_t = 0; + + if (bgpids.storage).is_null() || bgpids.nalloc == 0 || bgpids.npid == 0 { + return 0; + } + + psi = *pshash_getbucket(pid); + orig_psi = psi; + while psi != NO_PIDSTAT { + if (*(bgpids.storage).offset(psi as isize)).pid == pid { + break; + } + if orig_psi == (*(bgpids.storage).offset(psi as isize)).bucket_next { + internal_warning( b"bgp_delete: LOOP: psi (%d) == storage[psi].bucket_next\0" as *const u8 as *const c_char,psi); + return 0 as c_int; + } + psi = (*(bgpids.storage).offset(psi as isize)).bucket_next; + } + + if psi == NO_PIDSTAT { + return 0; + } + pshash_delindex(psi); + bgpids.npid -= 1; + return 1 ; +} + +unsafe extern "C" fn bgp_clear() { + if (bgpids.storage).is_null() || bgpids.nalloc == 0 { + return; + } + libc::free(bgpids.storage as *mut c_void); + + bgpids.storage = 0 as *mut pidstat; + bgpids.nalloc = 0 ; + bgpids.head = 0 ; + bgpids.npid = 0 ; +} + +unsafe extern "C" fn bgp_search(mut pid: pid_t) -> c_int { + let mut psi: ps_index_t = 0; + let mut orig_psi: ps_index_t = 0; + psi = *pshash_getbucket(pid); + orig_psi = psi; + + if (bgpids.storage).is_null() || bgpids.nalloc == 0 || bgpids.npid == 0 + { + return -1; + } + + psi = *pshash_getbucket(pid); + orig_psi = psi; + while psi != NO_PIDSTAT { + if (*(bgpids.storage).offset(psi as isize)).pid == pid { + return (*(bgpids.storage).offset(psi as isize)).status as c_int; + } + if orig_psi == (*(bgpids.storage).offset(psi as isize)).bucket_next { + internal_warning(b"bgp_search: LOOP: psi (%d) == storage[psi].bucket_next\0" as *const u8 as *const c_char,psi); + return -1; + } + psi = (*(bgpids.storage).offset(psi as isize)).bucket_next; + } + + return -1; +} + + +#[no_mangle] +pub unsafe extern "C" fn save_proc_status(mut pid: pid_t, mut status: c_int) { + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD(&mut set, &mut oset); + bgp_add(pid, status); + UNBLOCK_CHILD(&mut oset); +} + +unsafe extern "C" fn procsub_free(mut p: *mut PROCESS) +{ + if !((*p).command).is_null() { + free(((*p).command) as *mut c_void); + } + free (p as *mut c_void); +} + +#[no_mangle] +pub unsafe extern "C" fn procsub_add(mut p: *mut PROCESS) -> *mut PROCESS { + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD(&mut set, &mut oset); + if (procsubs.head).is_null() { + procsubs.end = p; + procsubs.head = procsubs.end; + procsubs.nproc = 0; + } else { + (*procsubs.end).next = p; + procsubs.end = p; + } + procsubs.nproc += 1; + + UNBLOCK_CHILD(&mut oset); + return p; +} + +#[no_mangle] +pub unsafe extern "C" fn procsub_search(mut pid: pid_t) -> *mut PROCESS { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD(&mut set, &mut oset); + p = procsubs.head; + while !p.is_null() { + if (*p).pid == pid { + break; + } + p = (*p).next; + } + UNBLOCK_CHILD(&mut oset); + return p; +} + +#[no_mangle] +pub unsafe extern "C" fn procsub_delete(mut pid: pid_t) -> *mut PROCESS { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut prev: *mut PROCESS = 0 as *mut PROCESS; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD(&mut set, &mut oset); + prev = procsubs.head; + p = prev; + while !p.is_null() { + if (*p).pid == pid { + (*prev).next = (*p).next; + break; + } else { + prev = p; + p = (*p).next; + } + } + + if p.is_null() { + UNBLOCK_CHILD(&mut oset); + return p; + } + if p == procsubs.head { + procsubs.head = (*procsubs.head).next; + } else if p == procsubs.end { + procsubs.end = prev; + } + + procsubs.nproc -= 1; + if procsubs.nproc == 0 { + procsubs.end = 0 as *mut PROCESS; + procsubs.head = procsubs.end; + } else if procsubs.nproc == 1 { + procsubs.end = procsubs.head; + } + bgp_add((*p).pid, process_exit_status((*p).status)); + + UNBLOCK_CHILD(&mut oset); + return p; +} + +#[no_mangle] +pub unsafe extern "C" fn procsub_waitpid(mut pid: pid_t) -> c_int { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut r: c_int = 0; + + p = procsub_search(pid); + if p.is_null() { + return -1; + } + if (*p).running == PS_DONE as i32 { + return (*p).status; + } + r = wait_for((*p).pid, 0 ); + + return r; +} + +#[no_mangle] +pub unsafe extern "C" fn procsub_waitall() { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut r: c_int = 0; + + p = procsubs.head; + while !p.is_null() { + if !((*p).running == PS_DONE as i32) { + r = wait_for((*p).pid, 0 ); + } + p = (*p).next; + } +} + + +#[no_mangle] +pub unsafe extern "C" fn procsub_clear() { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut ps: *mut PROCESS = 0 as *mut PROCESS; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD(&mut set, &mut oset); + ps = procsubs.head; + while !ps.is_null() { + p = ps; + ps = (*ps).next; + procsub_free(p); + } + procsubs.end = 0 as *mut PROCESS; + procsubs.head = procsubs.end; + procsubs.nproc = 0 as c_int; + UNBLOCK_CHILD(&mut oset); + +} + +#[no_mangle] +pub unsafe extern "C" fn procsub_prune() { + let mut ohead: *mut PROCESS = 0 as *mut PROCESS; + let mut oend: *mut PROCESS = 0 as *mut PROCESS; + let mut ps: *mut PROCESS = 0 as *mut PROCESS; + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut onproc: c_int = 0; + + if procsubs.nproc == 0 { + return; + } + ohead = procsubs.head; + oend = procsubs.end; + onproc = procsubs.nproc; + + procsubs.end = 0 as *mut PROCESS; + procsubs.head = procsubs.end; + procsubs.nproc = 0 as c_int; + + p = ohead; + while !p.is_null() { + ps = (*p).next; + (*p).next = 0 as *mut process; + if (*p).running == 0 as c_int { + bgp_add((*p).pid, process_exit_status((*p).status)); + procsub_free(p); + } else { + procsub_add(p); + } + p = ps; + } +} + + +unsafe extern "C" fn reset_job_indices() { + let mut old: c_int = 0; + + if (*jobs.offset(js.j_firstj as isize)).is_null() { + js.j_firstj = js.j_firstj + 1; + old = js.j_firstj; + + if old >= js.j_jobslots { + old = js.j_jobslots - 1; + } + while js.j_firstj != old { + if js.j_firstj >= js.j_jobslots { + js.j_firstj = 0 ; + } + if !(*jobs.offset(js.j_firstj as isize)).is_null() || js.j_firstj == old { + break; + } + js.j_firstj += 1; + } + if js.j_firstj == old { + js.j_njobs = 0; + js.j_lastj = js.j_njobs; + js.j_firstj = js.j_lastj; + } + } + + if (*jobs.offset(js.j_lastj as isize)).is_null() { + js.j_lastj = js.j_lastj - 1; + old = js.j_lastj; + if old < 0 { + old = 0 ; + } + while js.j_lastj != old { + if js.j_lastj < 0 { + js.j_lastj = js.j_jobslots - 1 ; + } + if !(*jobs.offset(js.j_lastj as isize)).is_null() || js.j_lastj == old { + break; + } + js.j_lastj -= 1; + } + + if js.j_lastj == old { + js.j_njobs = 0 as c_int; + js.j_lastj = js.j_njobs; + js.j_firstj = js.j_lastj; + } + } +} + + +unsafe extern "C" fn cleanup_dead_jobs() { + let mut i: c_int = 0; + let mut os: c_int = 0; + let mut discard: *mut PROCESS = 0 as *mut PROCESS; + + if js.j_jobslots == 0 || jobs_list_frozen != 0 { + return; + } + QUEUE_SIGCHLD!(os); + + i = 0 ; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() + && DEADJOB!(i) + && IS_NOTIFIED!(i) + { + delete_job(i, 0 as c_int); + } + i += 1; + } + procsub_prune(); + last_procsub_child = 0 as *mut c_void as *mut PROCESS; + coproc_reap(); + UNQUEUE_SIGCHLD(os) + +} + +unsafe extern "C" fn processes_in_job(mut job: c_int) -> c_int { + let mut nproc: c_int = 0; + let mut p: *mut PROCESS = 0 as *mut PROCESS; + nproc = 0 as c_int; + p = (**jobs.offset(job as isize)).pipe; + loop { + p = (*p).next; + nproc += 1; + if !(p != (**jobs.offset(job as isize)).pipe) { + break; + } + } + return nproc; +} + +unsafe extern "C" fn delete_old_job(mut pid: pid_t) { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut job: c_int = 0; + + job = find_job(pid, 0 , &mut p); + if job != NO_JOB { + if JOBSTATE!(job) == JDEAD { + delete_job(job, 2 as c_int); + } else if !p.is_null() { + (*p).pid = 0 ; + } + } +} + + +unsafe extern "C" fn realloc_jobs_list() { + // println!("realloc_jobs_list"); + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + let mut nsize: c_int = 0; + let mut i: c_int = 0; + let mut j: c_int = 0; + let mut ncur: c_int = 0; + let mut nprev: c_int = 0; + let mut nlist: *mut *mut JOB = 0 as *mut *mut JOB; + + nprev = NO_JOB; + ncur = nprev; + nsize = (js.j_njobs + JOB_SLOTS as c_int - 1 ) / JOB_SLOTS as c_int ; + nsize *= JOB_SLOTS as c_int; + i = js.j_njobs % JOB_SLOTS as c_int; + if i == 0 || i > (JOB_SLOTS as c_int >> 1) { + nsize += JOB_SLOTS as c_int; + } + + BLOCK_CHILD(&mut set, &mut oset); + nlist = if js.j_jobslots == nsize { + jobs + } else { + xmalloc((nsize * std::mem::size_of::() as c_int) as usize) as *mut *mut JOB + }; + + js.j_ndead = 0 ; + js.c_reaped = js.j_ndead; + j = 0 ; + i = j; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() { + if i == js.j_current { + ncur = j; + } + if i == js.j_previous { + nprev = j; + } + + *nlist.offset(j as isize) = *jobs.offset(i as isize); + j = j + 1; // + if (**jobs.offset(i as isize)).state as c_int == JDEAD as c_int { + js.j_ndead += 1; + js.c_reaped += processes_in_job(i); + } + } + i += 1; + } + + js.j_firstj = 0 ; + js.j_lastj = if j > 0 { + j - 1 + } else { + 0 + }; + js.j_njobs = j; + + js.j_jobslots = nsize; + + while j < nsize { + *nlist.offset(j as isize) = 0 as *mut JOB; + j += 1; + } + + if jobs != nlist { + libc::free(jobs as *mut c_void); + jobs = nlist; + } + + if ncur != NO_JOB { + js.j_current = ncur; + } + + if nprev != NO_JOB { + js.j_previous = nprev; + } + if js.j_current == NO_JOB || js.j_previous == NO_JOB + || js.j_current > js.j_lastj || js.j_previous > js.j_lastj + { + reset_current(); + } + + UNBLOCK_CHILD (&mut oset); +} + +unsafe extern "C" fn compact_jobs_list(mut flags: c_int) -> c_int { + if js.j_jobslots == 0 || jobs_list_frozen != 0 { + return js.j_jobslots; + } + reap_dead_jobs(); + realloc_jobs_list(); + return if js.j_lastj != 0 || !(*jobs.offset(js.j_lastj as isize)).is_null() { + js.j_lastj + 1 + } else { + 0 + }; +} + +#[no_mangle] +pub unsafe extern "C" fn delete_job( + mut job_index: c_int, + mut dflags: c_int, +) { + let mut temp: *mut JOB = 0 as *mut JOB; + let mut proc_0: *mut PROCESS = 0 as *mut PROCESS; + let mut ndel: c_int = 0; + + if js.j_jobslots == 0 || jobs_list_frozen != 0 { + return; + } + if dflags & DEL_WARNSTOPPED as c_int != 0 && subshell_environment == 0 + && STOPPED!(job_index) + { + internal_warning(b"deleting stopped job %d with process group %ld\0" as *const u8 as *const c_char, + job_index + 1 , + (**jobs.offset(job_index as isize)).pgrp as libc::c_long, + ); + } + + temp = *jobs.offset(job_index as isize); + if temp.is_null() { + return; + } + + if dflags & DEL_NOBGPID as c_int == 0 as c_int + && (*temp).flags & (J_ASYNC as c_int|J_FOREGROUND as c_int) == J_ASYNC as c_int + { + proc_0 = find_last_proc(job_index, 0 ); + if !proc_0.is_null() { + bgp_add((*proc_0).pid, process_exit_status((*proc_0).status)); + } + } + + *jobs.offset(job_index as isize) = 0 as *mut JOB; + if temp == js.j_lastmade { + js.j_lastmade = 0 as *mut JOB; + } else if temp == js.j_lastasync { + js.j_lastasync = 0 as *mut JOB; + } + + libc::free((*temp).wd as *mut c_void); + ndel = discard_pipeline((*temp).pipe); + + js.c_injobs -= ndel; + if (*temp).state == JDEAD as c_int { + js.c_reaped -= ndel; + js.j_ndead -= 1; + if js.c_reaped < 0 { + js.c_reaped = 0 ; + } + } + if !((*temp).deferred).is_null() { + dispose_command((*temp).deferred); + } + + libc::free(temp as *mut c_void); + + js.j_njobs -= 1; + if js.j_njobs == 0 { + js.j_lastj = 0 ; + js.j_firstj = js.j_lastj; + } else if (*jobs.offset(js.j_firstj as isize)).is_null() + || (*jobs.offset(js.j_lastj as isize)).is_null() + { + reset_job_indices(); + } + + if job_index == js.j_current || job_index == js.j_previous { + reset_current(); + } +} + +#[no_mangle] +pub unsafe extern "C" fn nohup_job(mut job_index: c_int) { + let mut temp: *mut JOB = 0 as *mut JOB; + + if js.j_jobslots == 0 { + return; + } + temp = *jobs.offset(job_index as isize); + if !temp.is_null() { + (*temp).flags |= J_NOHUP as c_int; + } +} + +#[no_mangle] +pub unsafe extern "C" fn discard_pipeline(mut chain: *mut PROCESS) -> c_int { + let mut this: *mut PROCESS = 0 as *mut PROCESS; + let mut next: *mut PROCESS = 0 as *mut PROCESS; + let mut n: c_int = 0; + + this = chain; + n = 0; + loop { + next = (*this).next; + if !((*this).command).is_null() { + libc::free((*this).command as *mut c_void); + } + libc::free(this as *mut c_void); + n += 1; + this = next; + if !(this != chain) { + break; + } + } + return n; +} + +unsafe extern "C" fn add_process(mut name: *mut c_char, mut pid: pid_t) { + let mut t: *mut PROCESS = 0 as *mut PROCESS; + let mut p: *mut PROCESS = 0 as *mut PROCESS; + + t = xmalloc(::std::mem::size_of::() as usize) as *mut PROCESS; + (*t).next = the_pipeline; + (*t).pid = pid; + (*t).status = 0 ; + (*t).running = PS_RUNNING as c_int; + (*t).command = name; + the_pipeline = t; + + if ((*t).next).is_null() { + (*t).next = t; + } else { + p = (*t).next; + while (*p).next != (*t).next { + p = (*p).next; + } + (*p).next = t; + }; +} + +#[no_mangle] +pub unsafe extern "C" fn append_process( + mut name: *mut c_char, + mut pid: pid_t, + mut status: c_int, + mut jid: c_int, +) { + // println!("append_process"); + let mut t: *mut PROCESS = 0 as *mut PROCESS; + let mut p: *mut PROCESS = 0 as *mut PROCESS; + + t = xmalloc(::std::mem::size_of::() as usize) as *mut PROCESS; + (*t).next = 0 as *mut c_void as *mut PROCESS; + (*t).pid = pid; + (*t).status = (status & 0xff as c_int) << WEXITSTATUS_OFFSET as c_int; + (*t).running = PS_DONE as c_int; + (*t).command = name; + + js.c_reaped += 1; + p = (**jobs.offset(jid as isize)).pipe; + while (*p).next != (**jobs.offset(jid as isize)).pipe { + p = (*p).next; + } + + (*p).next = t; + (*t).next = (**jobs.offset(jid as isize)).pipe; +} + +unsafe extern "C" fn map_over_jobs( + mut func: Option::, + mut arg1: c_int, + mut arg2: c_int, +) -> c_int { + let mut i: c_int = 0; + let mut result: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + if js.j_jobslots == 0 { + return 0 ; + } + BLOCK_CHILD (&mut set, &mut oset); + result = 0 ; + i = result; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() { + result = (Some(func.expect("non-null function pointer"))) + .expect( + "non-null function pointer", + )(*jobs.offset(i as isize), arg1, arg2, i); + if result != 0 { + break; + } + } + i += 1; + } + UNBLOCK_CHILD (&mut oset); + return result; +} + +#[no_mangle] +pub unsafe extern "C" fn terminate_current_pipeline() { + if pipeline_pgrp != 0 && pipeline_pgrp != shell_pgrp { + killpg(pipeline_pgrp, SIGTERM as c_int); + killpg(pipeline_pgrp, SIGCONT as c_int); + } +} + +#[no_mangle] +pub unsafe extern "C" fn terminate_stopped_jobs() { + let mut i:c_int = 0; + i = 0 as c_int; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() + && STOPPED!(i) + { + killpg((**jobs.offset(i as isize)).pgrp, SIGTERM as c_int); + killpg((**jobs.offset(i as isize)).pgrp, SIGCONT as c_int); + } + i += 1; + } +} + +#[no_mangle] +pub unsafe extern "C" fn hangup_all_jobs() { + let mut i: c_int = 0; + i = 0 ; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() { + if !((**jobs.offset(i as isize)).flags & J_NOHUP as c_int != 0) { + continue; + } + killpg((**jobs.offset(i as isize)).pgrp, SIGHUP as c_int); + if STOPPED!(i) + { + killpg((**jobs.offset(i as isize)).pgrp, SIGCONT as c_int); + } + } + i += 1; + } +} + +#[no_mangle] +pub unsafe extern "C" fn kill_current_pipeline() { + stop_making_children(); + start_pipeline(); +} + +unsafe extern "C" fn find_pid_in_pipeline( + mut pid: pid_t, + mut pipeline: *mut PROCESS, + mut alive_only: c_int, +) -> *mut PROCESS { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + p = pipeline; + loop { + if (*p).pid == pid + && (alive_only == 0 && PRECYCLED!(p) == 0|| PALIVE!(p)) + { + return p; + } + p = (*p).next; + if !(p != pipeline) { + break; + } + } + return 0 as *mut PROCESS; +} + + +unsafe extern "C" fn find_pipeline( + mut pid: pid_t, + mut alive_only: c_int, + mut jobp: *mut c_int, +) -> *mut PROCESS { + // println!("find_pipeline"); + let mut job: c_int = 0; + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut save: *mut pipeline_saver = 0 as *mut pipeline_saver; + p = 0 as *mut libc::c_void as *mut PROCESS; + if !jobp.is_null() { + *jobp = -(1 as c_int); + } + if !the_pipeline.is_null() + && { + p = find_pid_in_pipeline(pid, the_pipeline, alive_only); + !p.is_null() + } + { + return p; + } + save = saved_pipeline; + while !save.is_null() { + if !((*save).pipeline).is_null() + && { + p = find_pid_in_pipeline(pid, (*save).pipeline, alive_only); + !p.is_null() + } + { + return p; + } + save = (*save).next; + } + if procsubs.nproc > 0 as c_int + && { + p = procsub_search(pid); + !p.is_null() + } + && (alive_only == 0 as c_int && 0 as c_int == 0 as c_int + || ((*p).running == 1 as c_int + || (*p).status & 0xff as c_int == 0x7f as c_int)) + { + return p; + } + job = find_job(pid, alive_only, &mut p); + if !jobp.is_null() { + *jobp = job; + } + return if job == -(1 as c_int) { + 0 as *mut libc::c_void as *mut PROCESS + } else { + (**jobs.offset(job as isize)).pipe + }; +} + + +unsafe extern "C" fn find_process( + mut pid: pid_t, + mut alive_only: c_int, + mut jobp: *mut c_int, +) -> *mut PROCESS { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + p = find_pipeline(pid, alive_only, jobp); + while !p.is_null() && (*p).pid != pid { + p = (*p).next; + } + return p; +} + +unsafe extern "C" fn find_job( + mut pid: pid_t, + mut alive_only: c_int, + mut procp: *mut *mut PROCESS, +) -> c_int { + let mut i: c_int = 0; + let mut p: *mut PROCESS = 0 as *mut PROCESS; + i = 0 as c_int; + // println!("j_jobslots {}",js.j_jobslots); + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() { + p = (**jobs.offset(i as isize)).pipe; + loop { + if (*p).pid == pid + && (alive_only == 0 as c_int + && 0 as c_int == 0 as c_int + || ((*p).running == 1 as c_int + || (*p).status & 0xff as c_int == 0x7f as c_int)) + { + if !procp.is_null() { + *procp = p; + } + return i; + } + p = (*p).next; + if !(p != (**jobs.offset(i as isize)).pipe) { + break; + } + } + } + i += 1; + } + return -(1 as c_int); +} + +#[no_mangle] +pub unsafe extern "C" fn get_job_by_pid( mut pid: pid_t, mut block: c_int, mut procp: *mut *mut PROCESS,) -> c_int { + // println!("get_job_by_pid"); + let mut job: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + if block != 0 { + BLOCK_CHILD (&mut set, &mut oset); + } + job = find_job(pid, 0 as c_int, procp); + if block != 0 { + UNBLOCK_CHILD (&mut oset); + } + return job; +} + +#[no_mangle] +pub unsafe extern "C" fn describe_pid(mut pid: pid_t) { + let mut job: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD (&mut set, &mut oset); + job = find_job(pid, 0, 0 as *mut *mut PROCESS); + + if job != NO_JOB { + libc::fprintf(stderr,b"[%d] %ld\n\0" as *const u8 as *const c_char,job + 1 as c_int,pid as libc::c_long, + ); + } else { + programming_error(b"describe_pid: %ld: no such pid\0" as *const u8 as *const c_char, pid as c_long, + ); + } + UNBLOCK_CHILD (&mut oset); +} + + +unsafe extern "C" fn j_strsignal(mut s: c_int) -> *mut c_char +{ + let mut x: *mut c_char = 0 as *mut c_char; + x = strsignal(s); + if x.is_null() { + x = retcode_name_buffer.as_mut_ptr(); + libc::snprintf(x,::std::mem::size_of::<[ c_char; 64]>() as usize, + b"Signal %d\0" as *const u8 as *const c_char, + s, + ); + } + return x; +} + +#[macro_export] +macro_rules! WSTOPSIG { + ($status:expr) => { + ($status & 0xff00) >> 8 + }; +} + +#[macro_export] +macro_rules! RUNNING { + ($j:expr) => { + (**jobs.offset($j as isize)).state as c_int == JRUNNING + }; +} + +#[macro_export] +macro_rules! WIFSIGNALED { + ($status:expr) => { + ((($status) & 0x7f) + 1) >> 1 > 0 + }; +} + +#[macro_export] +macro_rules! WTERMSIG { + ($status:expr) => { + ($status) & 0x7f + }; +} + +#[macro_export] +macro_rules! WIFEXITED { + ($status:expr) => { + ($status) & 0x7f == 0 + }; +} + +#[macro_export] +macro_rules! WEXITSTATUS { + ($status:expr) => { + (($status) & 0xff00) >> 8 + }; +} + +#[macro_export] +macro_rules! WSTATUS{ + ($t:expr) => { + $t + }; +} + +unsafe extern "C" fn printable_job_status(mut j: c_int, mut p: *mut PROCESS, mut format: c_int,) -> *mut c_char +{ + static mut temp: *mut c_char = 0 as *const c_char as *mut c_char; + let mut es: c_int = 0; + temp = b"Done\0" as *const u8 as *const c_char as *mut c_char; + + if STOPPED!(j) && format == 0 + { + if posixly_correct == 0 as c_int || p.is_null() || (WIFSTOPPED!((*p).status)) { + temp = b"Stopped\0" as *const u8 as *mut c_char; + } else { + temp = retcode_name_buffer.as_mut_ptr(); + libc::snprintf(temp,::std::mem::size_of::<[ c_char; 64]>() as usize, + b"Stopped(%s)\0" as *const u8 as *const c_char, + signal_name(WSTOPSIG!((*p).status)), + ); + } + } else if RUNNING!(j) + { + temp = b"Running\0" as *const u8 as *mut c_char; + } else { + if WIFSTOPPED!((*p).status) { + temp = j_strsignal(WSTOPSIG!((*p).status)); + } else if WIFSIGNALED!((*p).status) { + temp = j_strsignal(WTERMSIG!((*p).status)); + } else if WIFEXITED!((*p).status){ + temp = retcode_name_buffer.as_mut_ptr(); + es = WEXITSTATUS!((*p).status); + if es == 0 { + libc::strncpy (temp, b"Done\0" as *const u8 as *mut c_char, std::mem::size_of::<[ c_char; 64]>() - 1); + *temp.offset( + (::std::mem::size_of::<[ c_char; 64]>() as c_ulong) + .wrapping_sub(1 as c_int as c_ulong) as isize, + ) = '\u{0}' as i32 as c_char; + } else if posixly_correct != 0 { + libc::snprintf(temp,::std::mem::size_of::<[ c_char; 64]>() as usize, + b"Done(%d)\0" as *const u8 as *const c_char, + es + ); + } else { + libc::snprintf(temp,::std::mem::size_of::<[ c_char; 64]>() as usize, + b"Exit(%d)\0" as *const u8 as *const c_char, + es + ); + } + } + else { + temp = b"Unknown status\0" as *const u8 as *mut c_char; + } + } + + return temp; +} + +#[macro_export] +macro_rules! STRLEN{ + ($s:expr) => { + if !$s.is_null() && *$s.offset(0 as isize) as c_int != 0 + { + if *$s.offset(1 as isize) as c_int != 0 { + if *$s.offset(2 as isize) as c_int != 0 { + libc::strlen($s) + } else { + 2 + } + } else { + 1 + } + } else { + 0 + } + }; +} + +#[macro_export] +macro_rules! WIFCONTINUED{ + ($status:expr) => { + $status == 0xffff + }; +} + +#[macro_export] +macro_rules! WIFCORED{ + ($status:expr) => { + $status == 0x80 + }; +} + +#[macro_export] +macro_rules! J_FOREGROUND{ + () => { + 0x01 + }; +} + +#[macro_export] +macro_rules! IS_FOREGROUND{ + ($j:expr) => { + (**jobs.offset($j as isize)).flags & J_FOREGROUND!() != 0 + }; +} + +unsafe extern "C" fn print_pipeline( + mut p: *mut PROCESS, + mut job_index: c_int, + mut format: c_int, + mut stream: *mut libc::FILE, +) { + let mut first: *mut PROCESS = 0 as *mut PROCESS; + let mut last: *mut PROCESS = 0 as *mut PROCESS; + let mut show: *mut PROCESS = 0 as *mut PROCESS; + let mut es: c_int = 0; + let mut name_padding: c_int = 0; + let mut temp: *mut c_char = 0 as *mut c_char; + + if p.is_null() { + return; + } + + last = p; + first = last; + while (*last).next != first { + last = (*last).next; + } + + loop { + if p != first { + libc::fprintf( + stream, + if format != 0 { + b" \0" as *const u8 as *const c_char + } else { + b" |\0" as *const u8 as *const c_char + }, + ); + } + if format != 0 { + libc::fprintf( + stream, + b"%5ld\0" as *const u8 as *const c_char, + (*p).pid as libc::c_long, + ); + } + libc::fprintf(stream, b" \0" as *const u8 as *const c_char); + + if format > -1 && job_index >= 0 { + show = if format != 0 { p } else { last }; + temp = printable_job_status(job_index, show, format); + + if p != first { + if format != 0 { + if (*show).running == (*first).running + && WSTATUS!((*show).status) == WSTATUS!((*first).status) + { + temp = b"\0" as *const u8 as *mut c_char; + + } + } else { + temp = 0 as *mut c_char; + } + } + + if !temp.is_null() { + libc::fprintf(stream, b"%s\0" as *const u8 as *const c_char, temp); + es = STRLEN!(temp) as c_int; + + if es == 0 { + es = 2 ; + } + name_padding = LONGEST_SIGNAL_DESC as c_int - es; + libc::fprintf( + stream, + b"%*s\0" as *const u8 as *const c_char, + name_padding, + b"\0" as *const u8 as *const c_char, + ); + if (WIFSTOPPED!((*show).status)) as c_int == 0 + && (WIFCONTINUED!((*show).status)) as c_int == 0 && WIFCORED!((*show).status) as c_int != 0 + { + libc::fprintf(stream, b"(core dumped) \0" as *const u8 as *const c_char ); + } + } + } + if p != first && format != 0 { + libc::fprintf(stream, b"| \0" as *const u8 as *const c_char); + } + if !((*p).command).is_null() { + fprintf(stream, b"%s\0" as *const u8 as *const c_char, (*p).command); + } + if p == last && job_index >= 0 { + temp = current_working_directory(); + if RUNNING!(job_index) && IS_FOREGROUND!(job_index) as c_int == 0 + { + fprintf(stream, b" &\0" as *const u8 as *const c_char); + } + if libc::strcmp(temp, (**jobs.offset(job_index as isize)).wd) != 0 as c_int { + fprintf(stream,b" (wd: %s)\0" as *const u8 as *const c_char, + polite_directory_format((**jobs.offset(job_index as isize)).wd), + ); + } + } + if format != 0 || p == last { + if asynchronous_notification != 0 && interactive != 0 { + libc::fputc('\r' as i32, stream); + } + fprintf(stream, b"\n\0" as *const u8 as *const c_char); + } + if p == last { + break; + } + p = (*p).next; + } + libc::fflush(stream); +} + +unsafe extern "C" fn pretty_print_job( + mut job_index: c_int, + mut format: c_int, + mut stream: *mut libc::FILE, +) { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + + if format == JLIST_PID_ONLY as c_int { + fprintf( + stream, + b"%ld\n\0" as *const u8 as *const c_char, + (*(**jobs.offset(job_index as isize)).pipe).pid as libc::c_long, + ); + return; + } + if format == JLIST_CHANGED_ONLY as c_int{ + if IS_NOTIFIED! (job_index) + { + return; + } + format = JLIST_STANDARD as c_int; + } + if format != JLIST_NONINTERACTIVE as c_int{ + fprintf( + stream, + b"[%d]%c \0" as *const u8 as *const c_char, + job_index + 1 as c_int, + if job_index == js.j_current { + '+' as i32 + } else if job_index == js.j_previous { + '-' as i32 + } else { + ' ' as i32 + }, + ); + } + if format == JLIST_NONINTERACTIVE as c_int{ + format = JLIST_LONG as c_int; + } + p = (**jobs.offset(job_index as isize)).pipe; + print_pipeline(p, job_index, format, stream); + (**jobs.offset(job_index as isize)).flags |= J_NOTIFIED as c_int; +} + + +unsafe extern "C" fn print_job(mut job: *mut JOB, mut format: c_int, mut state: c_int, mut job_index: c_int) -> c_int +{ + if state == -(1 as c_int) + || state as JOB_STATE as c_int == (*job).state as c_int + { + pretty_print_job(job_index, format, stdout); + } + return 0 as c_int; +} + +#[no_mangle] +pub unsafe extern "C" fn list_one_job(mut job: *mut JOB, mut format: c_int, mut ignore: c_int,mut job_index: c_int,) +{ + pretty_print_job(job_index, format, stdout); + cleanup_dead_jobs(); +} + +#[no_mangle] +pub unsafe extern "C" fn list_stopped_jobs(mut format: c_int) { + cleanup_dead_jobs(); + map_over_jobs( + ::std::mem::transmute::< + Option:: c_int>, + Option::, + >( + Some( + ::std::mem::transmute::< + unsafe extern "C" fn( + *mut JOB, + c_int, + c_int, + c_int, + ) -> c_int, + unsafe extern "C" fn() -> c_int, + >(print_job), + ), + ), + format, + JSTOPPED as c_int, + ); +} +#[no_mangle] +pub unsafe extern "C" fn list_running_jobs(mut format: c_int) { + cleanup_dead_jobs(); + map_over_jobs( + ::std::mem::transmute::< + Option:: c_int>, + Option::, + >( + Some( + ::std::mem::transmute::< + unsafe extern "C" fn( + *mut JOB, + c_int, + c_int, + c_int, + ) -> c_int, + unsafe extern "C" fn() -> c_int, + >(print_job), + ), + ), + format, + JRUNNING as c_int, + ); +} + +#[no_mangle] +pub unsafe extern "C" fn list_all_jobs(mut format: c_int) { + cleanup_dead_jobs(); + map_over_jobs( + ::std::mem::transmute::< + Option:: c_int>, + Option::, + >( + Some( + ::std::mem::transmute::< + unsafe extern "C" fn( + *mut JOB, + c_int, + c_int, + c_int, + ) -> c_int, + unsafe extern "C" fn() -> c_int, + >(print_job), + ), + ), + format, + -(1 as c_int), + ); +} + +#[macro_export] +macro_rules! errno { + () => { + *__errno_location() + }; +} + +#[macro_export] +macro_rules! CLRINTERRUPT { + () => { + interrupt_state = 0 + }; +} + +#[no_mangle] +pub unsafe extern "C" fn make_child( + mut command: *mut c_char, + mut flags: c_int, +) -> pid_t { + // println!("make_child"); + let mut async_p: c_int = 0; + let mut forksleep: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + let mut termset: sigset_t = __sigset_t { __val: [0; 16] }; + let mut chldset: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset_copy: sigset_t = __sigset_t { __val: [0; 16] }; + let mut pid: pid_t = 0; + let mut oterm:*mut SigHandler = 0 as *mut SigHandler; + sigemptyset(&mut oset_copy); + sigprocmask( + 0 as c_int, + 0 as *mut libc::c_void as *mut sigset_t, + &mut oset_copy, + ); + sigaddset(&mut oset_copy, 15 as c_int); + sigemptyset(&mut set); + sigaddset(&mut set, 17 as c_int); + sigaddset(&mut set, 2 as c_int); + sigaddset(&mut set, 15 as c_int); + sigemptyset(&mut oset); + sigprocmask(0 as c_int, &mut set, &mut oset); + if interactive_shell != 0 { + oterm = set_signal_handler(15 as c_int, &mut None); + } + making_children(); + async_p = flags & 1 as c_int; + forksleep = 1 as c_int; + if default_buffered_input != -(1 as c_int) + && (async_p == 0 || default_buffered_input > 0 as c_int) + { + sync_buffered_stream(default_buffered_input); + } + loop { + pid = fork(); + if !(pid < 0 as c_int && *__errno_location() == 11 as c_int + && forksleep < 16 as c_int) + { + break; + } + sigprocmask( + 2 as c_int, + &mut oset_copy, + 0 as *mut libc::c_void as *mut sigset_t, + ); + waitchld(-(1 as c_int), 0 as c_int); + *__errno_location() = 11 as c_int; + sys_error(b"fork: retry\0" as *const u8 as *const c_char); + if sleep(forksleep as libc::c_uint) != 0 as c_int as libc::c_uint { + break; + } + forksleep <<= 1 as c_int; + if interrupt_state != 0 { + break; + } + sigprocmask(2 as c_int, &mut set, 0 as *mut libc::c_void as *mut sigset_t); + } + + if pid != 0 as c_int { + if interactive_shell != 0 { + set_signal_handler(15 as c_int, oterm); + } + } + if pid < 0 as c_int { + sys_error(b"fork\0" as *const u8 as *const c_char); + terminate_current_pipeline(); + if !the_pipeline.is_null() { + kill_current_pipeline(); + } + set_exit_status(126 as c_int); + throw_to_top_level(); + } + + if pid == 0 as c_int { + let mut mypid: pid_t = 0; + mypid = getpid(); + unset_bash_input(0 as c_int); + ::std::ptr::write_volatile( + &mut interrupt_state as *mut sig_atomic_t, + 0 as c_int, + ); + restore_sigmask(); + if job_control != 0 { + if pipeline_pgrp == 0 as c_int { + pipeline_pgrp = mypid; + } + if pipeline_pgrp == shell_pgrp { + ignore_tty_job_signals(); + } else { + default_tty_job_signals(); + } + if setpgid(mypid, pipeline_pgrp) < 0 as c_int { + sys_error( + dcgettext( + 0 as *const c_char, + b"child setpgid (%ld to %ld)\0" as *const u8 + as *const c_char, + 5 as c_int, + ), + mypid as libc::c_long, + pipeline_pgrp as libc::c_long, + ); + } + if flags & 4 as c_int == 0 as c_int + && async_p == 0 as c_int && pipeline_pgrp != shell_pgrp + && subshell_environment & (0x1 as c_int | 0x10 as c_int) + == 0 as c_int && running_in_background == 0 as c_int + { + give_terminal_to(pipeline_pgrp, 0 as c_int); + } + if pipeline_pgrp == mypid { + pipe_read(pgrp_pipe.as_mut_ptr()); + } + } else { + if pipeline_pgrp == 0 as c_int { + pipeline_pgrp = shell_pgrp; + } + default_tty_job_signals(); + } + sh_closepipe(pgrp_pipe.as_mut_ptr()); + } else { + if job_control != 0 { + if pipeline_pgrp == 0 as c_int { + pipeline_pgrp = pid; + } + setpgid(pid, pipeline_pgrp); + } else if pipeline_pgrp == 0 as c_int { + pipeline_pgrp = shell_pgrp; + } + add_process(command, pid); + if async_p != 0 { + ::std::ptr::write_volatile(&mut last_asynchronous_pid as *mut pid_t, pid); + } + delete_old_job(pid); + bgp_delete(pid); + ::std::ptr::write_volatile(&mut last_made_pid as *mut pid_t, pid); + js.c_totforked += 1; + js.c_living += 1; + sigprocmask( + 2 as c_int, + &mut oset, + 0 as *mut libc::c_void as *mut sigset_t, + ); + } + // println!("make child pid {}",pid); + return pid; +} + +#[no_mangle] +pub unsafe extern "C" fn ignore_tty_job_signals() { + set_signal_handler( + SIGTSTP as c_int, + SIG_IGN!() + ); + set_signal_handler( + SIGTTIN as c_int, + SIG_IGN!() + ); + set_signal_handler( + SIGTTOU as c_int, + SIG_IGN!() + ); +} + +#[no_mangle] +pub unsafe extern "C" fn default_tty_job_signals() { + if signal_is_trapped(SIGTSTP as c_int) == 0 + && signal_is_hard_ignored(SIGTSTP as c_int) != 0 + { + set_signal_handler( + SIGTSTP as c_int, + SIG_IGN!() + ); + } else { + set_signal_handler(SIGTSTP as c_int, &mut None); + } + if signal_is_trapped(SIGTTIN as c_int) == 0 + && signal_is_hard_ignored(SIGTTIN as c_int) != 0 + { + set_signal_handler( + SIGTTIN as c_int, + SIG_IGN!() + ); + } else { + set_signal_handler(SIGTTIN as c_int, &mut None); + } + if signal_is_trapped(SIGTTOU as c_int) == 0 + && signal_is_hard_ignored(SIGTTOU as c_int) != 0 + { + set_signal_handler( + SIGTTOU as c_int, + SIG_IGN!() + ); + } else { + set_signal_handler(SIGTTOU as c_int, &mut None); + }; +} + +#[no_mangle] +pub unsafe extern "C" fn get_original_tty_job_signals() { + static mut fetched: c_int = 0 as c_int; + if fetched == 0 as c_int { + if interactive_shell != 0 { + set_original_signal(SIGTSTP as c_int, None); + set_original_signal(SIGTTIN as c_int, None); + set_original_signal(SIGTTOU as c_int, None); + } else { + get_original_signal(SIGTSTP as c_int); + get_original_signal(SIGTTIN as c_int); + get_original_signal(SIGTTOU as c_int); + } + fetched = 1; + } +} + +static mut shell_tty_info: libc::termios = libc::termios { + c_iflag: 0, + c_oflag: 0, + c_cflag: 0, + c_lflag: 0, + c_line: 0, + c_cc: [0; 32], + c_ispeed: 0, + c_ospeed: 0, +}; + +#[macro_export] +macro_rules! input_tty { + () => { + if shell_tty != -1 { shell_tty } else { fileno(stderr) } + }; +} + +#[no_mangle] +pub unsafe extern "C" fn get_tty_state() -> c_int { + let mut tty: c_int = 0; + + tty = input_tty!(); + if tty != -1 { + if libc::tcgetattr(tty, &mut shell_tty_info) < 0 { + return -(1 as c_int); + } + if check_window_size != 0 { + get_new_window_size(0 as c_int, 0 as *mut c_int, 0 as *mut c_int); + } + } + return 0 as c_int; +} + +#[no_mangle] +pub unsafe extern "C" fn set_tty_state() -> c_int { + let mut tty: c_int = 0; + tty = input_tty!(); + if tty != -1 { + if libc::tcsetattr(tty, 1 as c_int, &mut shell_tty_info) < 0 as c_int { + if interactive != 0 { + sys_error( + b"[%ld: %d (%d)] tcsetattr\0" as *const u8 as *const c_char, + getpid() as libc::c_long, + shell_level, + tty, + ); + } + return -1; + } + } + return 0 ; +} + +unsafe extern "C" fn find_last_proc(mut job: c_int, mut block: c_int) -> *mut PROCESS +{ + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + if block != 0 { + BLOCK_CHILD (&mut set, &mut oset); + } + p = (**jobs.offset(job as isize)).pipe; + while !p.is_null() && (*p).next != (**jobs.offset(job as isize)).pipe { + p = (*p).next; + } + if block != 0 { + UNBLOCK_CHILD (&mut oset); + } + return p; +} + +unsafe extern "C" fn find_last_pid(mut job: c_int, mut block: c_int) -> pid_t +{ + let mut p: *mut PROCESS = 0 as *mut PROCESS; + p = find_last_proc(job, block); + return (*p).pid; +} + +#[macro_export] +macro_rules! CHECK_WAIT_INTR { + () => { + if wait_intr_flag != 0 && wait_signal_received != 0 && this_shell_builtin.is_some() + && this_shell_builtin + == (Some(wait_builtin as unsafe extern "C" fn(*mut WORD_LIST) -> c_int)) + { + siglongjmp(wait_intr_buf.as_mut_ptr(), 1 as c_int); + } + }; +} + +#[macro_export] +macro_rules! CHECK_TERMSIG { + () => { + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + }; +} + +#[no_mangle] +pub unsafe extern "C" fn wait_for_single_pid(mut pid: pid_t, mut flags: c_int) -> c_int +{ + let mut child: *mut PROCESS = 0 as *mut PROCESS; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + let mut r: c_int = 0; + let mut job: c_int = 0; + let mut alive: c_int = 0; + + BLOCK_CHILD (&mut set, &mut oset); + child = find_pipeline(pid,0 ,0 as *mut c_int); + UNBLOCK_CHILD (&mut oset); + + if child.is_null() { + r = bgp_search(pid); + if r >= 0 { + return r; + } + } + if child.is_null() { + if flags & JWAIT_PERROR as c_int != 0 { + internal_error(b"wait: pid %ld is not a child of this shell\0" as *const u8 as *const c_char, + pid as libc::c_long, + ); + } + return 127 ; + } + alive = 0 ; + loop { + r = wait_for(pid, 0 ); + if flags & JWAIT_FORCE as c_int == 0 { + break; + } + + BLOCK_CHILD (&mut set, &mut oset); + alive = PALIVE!(child) as c_int; + UNBLOCK_CHILD (& mut oset); + + if !(alive != 0) { + break; + } + } + + BLOCK_CHILD (&mut set, &mut oset); + job = find_job(pid, 0 , 0 as *mut *mut PROCESS); + if job != NO_JOB && !(*jobs.offset(job as isize)).is_null() + && DEADJOB!(job) + { + (**jobs.offset(job as isize)).flags |= J_NOTIFIED as c_int; + } + UNBLOCK_CHILD (&mut oset); + + + if posixly_correct != 0 { + cleanup_dead_jobs(); + bgp_delete(pid); + } + + CHECK_WAIT_INTR!(); + + return r; +} + +#[macro_export] +macro_rules! QUIT { + () => { + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + if interrupt_state != 0 { + throw_to_top_level(); + } + }; +} + +#[no_mangle] +pub unsafe extern "C" fn wait_for_background_pids(mut ps: *mut procstat) { + let mut i: c_int = 0; + let mut r: c_int = 0; + let mut any_stopped: c_int = 0; + let mut check_async: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + let mut pid: pid_t = 0; + + + any_stopped = 0 ; + check_async = 1; + loop { + BLOCK_CHILD (&mut set, &mut set); + + i = 0; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() && STOPPED! (i) + { + builtin_warning( + b"job %d[%d] stopped\0" as *const u8 as *const c_char, + i + 1 , + find_last_pid(i, 0 ), + ); + any_stopped = 1; + } + if !(*jobs.offset(i as isize)).is_null() && RUNNING!(i) && IS_FOREGROUND!(i) + { + break; + } + i += 1; + } + if i == js.j_jobslots { + UNBLOCK_CHILD (&mut oset); + break; + } + + pid = find_last_pid(i, 0 ); + UNBLOCK_CHILD (&mut oset); + QUIT!(); + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + if interrupt_state != 0 { + throw_to_top_level(); + } + *__errno_location() = 0 ; + r = wait_for_single_pid(pid, JWAIT_PERROR as c_int); + if !ps.is_null() { + (*ps).pid = pid; + (*ps) + .status = (if r < 0 as c_int { 127 as c_int } else { r }) + as libc::c_short; + } + if r == -1 && *__errno_location() == ECHILD as c_int { + check_async = 0 ; + mark_all_jobs_as_dead(); + } + + } + procsub_waitall(); + mark_dead_jobs_as_notified(1); + cleanup_dead_jobs(); + bgp_clear(); +} + +pub type SigHandler1 = Option; +#[macro_export] +macro_rules! INVALID_SIGNAL_HANDLER { + () => { + wait_for_background_pids as *mut SigHandler + } +} +static mut old_sigint_handler:*mut SigHandler = INVALID_SIGNAL_HANDLER!(); + + + + +unsafe extern "C" fn restore_sigint_handler() { + if old_sigint_handler != INVALID_SIGNAL_HANDLER!() + { + set_signal_handler(SIGINT as c_int, old_sigint_handler); + old_sigint_handler = INVALID_SIGNAL_HANDLER!(); + waiting_for_child = 0 ; + } +} + + + +unsafe extern "C" fn wait_sigint_handler(mut sig: c_int) { + println!("wait_sigint_handler"); + let mut sigint_handler: Option:: = None; + + if this_shell_builtin.is_some() && this_shell_builtin == Some(wait_builtin) + { + set_exit_status(128 + SIGINT as c_int); + restore_sigint_handler(); + if this_shell_builtin.is_some() + && this_shell_builtin == Some(wait_builtin) && signal_is_trapped(SIGINT as c_int) != 0 + && { + sigint_handler = Some(trap_to_sighandler(SIGINT as c_int)); + sigint_handler + == Some(Some(trap_handler as unsafe extern "C" fn(c_int) -> ())) + } + { + trap_handler(SIGINT as c_int); + wait_signal_received = SIGINT as c_int; + if wait_intr_flag != 0 { + siglongjmp(wait_intr_buf.as_mut_ptr(), 1 ); + } else { + return + } + } else { + kill(getpid(), SIGINT as c_int); + } + } + if waiting_for_child != 0 { + wait_sigint_received = 1 ; + } else { + set_exit_status(128 + SIGINT as c_int); + restore_sigint_handler(); + kill(getpid(), SIGINT as c_int); + }; +} + + +unsafe extern "C" fn process_exit_signal(mut status: WAIT) -> c_int { + + if libc::WIFSIGNALED(status) { + return libc::WTERMSIG(status); + } else { + return 0; + } +} + + +unsafe extern "C" fn process_exit_status(mut status: WAIT) -> c_int { + if WIFSIGNALED!(status) { + return 128 + WTERMSIG! (status); + } else if WIFSTOPPED! (status) as c_int == 0 { + return WEXITSTATUS!(status); + } else { + return 0; + } + +} + +unsafe extern "C" fn job_signal_status(mut job: c_int) -> WAIT { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut s: WAIT = 0; + + p = (**jobs.offset(job as isize)).pipe; + loop { + s = (*p).status; + if WIFSIGNALED!(s) || WIFSTOPPED!(s) + { + break; + } + p = (*p).next; + if !(p != (**jobs.offset(job as isize)).pipe) { + break; + } + } + return s; +} + +unsafe extern "C" fn raw_job_exit_status(mut job: c_int) -> WAIT { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut fail: c_int = 0; + let mut ret: WAIT = 0; + + if (**jobs.offset(job as isize)).flags & J_PIPEFAIL as c_int != 0 { + fail = 0; + p = (**jobs.offset(job as isize)).pipe; + loop { + if WSTATUS!((*p).status) != 0 { + fail = WSTATUS!((*p).status); + } + p = (*p).next; + if !(p != (**jobs.offset(job as isize)).pipe) { + break; + } + } + WSTATUS!(ret) = fail; + return ret; + } + p = (**jobs.offset(job as isize)).pipe; + while (*p).next != (**jobs.offset(job as isize)).pipe { + p = (*p).next; + } + return (*p).status; +} + + +#[no_mangle] +pub unsafe extern "C" fn job_exit_status(mut job: c_int) -> c_int { + return process_exit_status(raw_job_exit_status(job)); +} +#[no_mangle] +pub unsafe extern "C" fn job_exit_signal(mut job: c_int) -> c_int { + return process_exit_signal(raw_job_exit_status(job)); +} + +pub const ANY_PID:pid_t = -1; +#[macro_export] +macro_rules! IS_JOBCONTROL { + ($job:expr) => { + (**jobs.offset($job as isize)).flags & 0x4 as c_int + != 0 as c_int + }; +} + +#[macro_export] +macro_rules! RL_ISSTATE { + ($x:expr) => { + rl_readline_state & ($x) + }; +} +#[macro_export] +macro_rules! RL_STATE_COMPLETING { + () => { + 0x0004000 + }; +} + +#[macro_export] +macro_rules! ADDINTERRUPT { + () => { + interrupt_state += 1 + }; +} + +#[no_mangle] +pub unsafe extern "C" fn wait_for( + mut pid: pid_t, + mut flags: c_int, +) -> c_int { + let mut current_block: u64; + let mut job: c_int = 0; + let mut termination_state: c_int = 0; + let mut r: c_int = 0; + let mut s: WAIT = 0; + let mut child: *mut PROCESS = 0 as *mut PROCESS; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + child = 0 as *mut PROCESS; + sigemptyset(&mut set); + sigaddset(&mut set, 17 as c_int); + sigemptyset(&mut oset); + sigprocmask(0 as c_int, &mut set, &mut oset); + child_caught_sigint = 0 as c_int; + wait_sigint_received = child_caught_sigint; + if job_control == 0 as c_int || subshell_environment & 0x4 as c_int != 0 + { + let mut temp_sigint_handler: *mut SigHandler; + temp_sigint_handler = set_signal_handler(SIGINT as c_int, wait_sigint_handler as *mut Option); + if !(temp_sigint_handler == wait_sigint_handler as *mut SigHandler) { + old_sigint_handler = temp_sigint_handler; + } + waiting_for_child = 0; + if old_sigint_handler + == &mut ::std::mem::transmute::< + libc::intptr_t, + __sighandler_t, + >(1 as c_int as libc::intptr_t) + { + set_signal_handler(2 as c_int, old_sigint_handler); + } + } + termination_state = last_command_exit_value; + if interactive != 0 && job_control == 0 as c_int { + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + if interrupt_state != 0 { + throw_to_top_level(); + } + } + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + if wait_intr_flag != 0 && wait_signal_received != 0 && this_shell_builtin.is_some() + && this_shell_builtin + == Some(wait_builtin as unsafe extern "C" fn(*mut WordList) -> c_int) + { + siglongjmp(wait_intr_buf.as_mut_ptr(), 1 as c_int); + } + job = -(1 as c_int); + loop { + if pid != -(1 as c_int) { + child = find_pipeline( + pid, + 0 as c_int, + 0 as *mut libc::c_void as *mut c_int, + ); + if child.is_null() { + give_terminal_to(shell_pgrp, 0 as c_int); + sigprocmask( + 2 as c_int, + &mut oset, + 0 as *mut libc::c_void as *mut sigset_t, + ); + internal_error( + dcgettext( + 0 as *const c_char, + b"wait_for: No record of process %ld\0" as *const u8 + as *const c_char, + 5 as c_int, + ), + pid as libc::c_long, + ); + restore_sigint_handler(); + termination_state = 127 as c_int; + return termination_state; + } + } + if job == -(1 as c_int) && pid != -(1 as c_int) { + job = find_job(pid, 0 as c_int, 0 as *mut *mut PROCESS); + } + if pid == -(1 as c_int) || (*child).running == 1 as c_int + || job != -(1 as c_int) + && (**jobs.offset(job as isize)).state as c_int + == JRUNNING as c_int + { + let mut old_waiting: c_int = 0; + queue_sigchld = 1 as c_int; + old_waiting = waiting_for_child; + waiting_for_child = 1 as c_int; + if wait_intr_flag != 0 && wait_signal_received != 0 + && this_shell_builtin.is_some() + && this_shell_builtin + == Some( + wait_builtin + as unsafe extern "C" fn(*mut WordList) -> c_int, + ) + { + siglongjmp(wait_intr_buf.as_mut_ptr(), 1 as c_int); + } + r = waitchld(pid, 1 as c_int); + waiting_for_child = old_waiting; + queue_sigchld = 0 as c_int; + if r == -(1 as c_int) && *__errno_location() == 10 as c_int + && this_shell_builtin + == Some( + wait_builtin + as unsafe extern "C" fn(*mut WordList) -> c_int, + ) + { + termination_state = -(1 as c_int); + restore_sigint_handler(); + current_block = 6718615339517147058; + break; + } else if r == -(1 as c_int) + && *__errno_location() == 10 as c_int + { + if !child.is_null() { + (*child).running = 0 as c_int; + (*child).status = 0 as c_int; + } + js.c_living = 0 as c_int; + if job != -(1 as c_int) { + (**jobs.offset(job as isize)).state = JDEAD; + js.c_reaped += 1; + js.j_ndead += 1; + } + if pid == -(1 as c_int) { + termination_state = -(1 as c_int); + current_block = 7072655752890836508; + break; + } + } + } + if interactive != 0 && job_control == 0 as c_int { + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + if interrupt_state != 0 { + throw_to_top_level(); + } + } + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + if wait_intr_flag != 0 && wait_signal_received != 0 + && this_shell_builtin.is_some() + && this_shell_builtin + == Some( + wait_builtin as unsafe extern "C" fn(*mut WordList) -> c_int, + ) + { + siglongjmp(wait_intr_buf.as_mut_ptr(), 1 as c_int); + } + if pid == -(1 as c_int) { + restore_sigint_handler(); + current_block = 6718615339517147058; + break; + } else if !((*child).running == 1 as c_int + || job != -(1 as c_int) + && (**jobs.offset(job as isize)).state as c_int + == JRUNNING as c_int) + { + current_block = 7072655752890836508; + break; + } + } + match current_block { + 7072655752890836508 => { + restore_sigint_handler(); + termination_state = if job != -(1 as c_int) { + job_exit_status(job) + } else if !child.is_null() { + process_exit_status((*child).status) + } else { + 0 as c_int + }; + last_command_exit_signal = if job != -(1 as c_int) { + job_exit_signal(job) + } else if !child.is_null() { + process_exit_signal((*child).status) + } else { + 0 as c_int + }; + if job != -(1 as c_int) + && (**jobs.offset(job as isize)).state as c_int + == JSTOPPED as c_int + || !child.is_null() + && (*child).status & 0xff as c_int == 0x7f as c_int + { + termination_state = 128 as c_int + + (((*child).status & 0xff00 as c_int) >> 8 as c_int); + } + if job == -(1 as c_int) + || (**jobs.offset(job as isize)).flags & 0x4 as c_int + != 0 as c_int + { + if flags & (1 as c_int) << 8 as c_int == 0 as c_int + && running_in_background == 0 as c_int + && subshell_environment & (0x1 as c_int | 0x10 as c_int) + == 0 as c_int + { + give_terminal_to(shell_pgrp, 0 as c_int); + } + } + if job != -(1 as c_int) { + if interactive_shell != 0 && subshell_environment == 0 as c_int { + s = job_signal_status(job); + if ((s & 0x7f as c_int) + 1 as c_int) as libc::c_schar + as c_int >> 1 as c_int > 0 as c_int + || s & 0xff as c_int == 0x7f as c_int + { + set_tty_state(); + if check_window_size != 0 + && (job == js.j_current + || (**jobs.offset(job as isize)).flags & 0x1 as c_int + != 0 as c_int) + { + get_new_window_size( + 0 as c_int, + 0 as *mut c_int, + 0 as *mut c_int, + ); + } + } else if rl_readline_state & 0x4000 as c_int as libc::c_ulong + == 0 as c_int as libc::c_ulong + { + get_tty_state(); + } + if job_control != 0 + && (**jobs.offset(job as isize)).flags & 0x4 as c_int + != 0 as c_int + && (**jobs.offset(job as isize)).flags & 0x1 as c_int + != 0 as c_int + && ((s & 0x7f as c_int) + 1 as c_int) + as libc::c_schar as c_int >> 1 as c_int + > 0 as c_int + && s & 0x7f as c_int == 2 as c_int + { + if signal_is_trapped(2 as c_int) == 0 as c_int + && (loop_level != 0 + || shell_compatibility_level > 32 as c_int + && executing_list != 0) + { + ::std::ptr::write_volatile( + &mut interrupt_state as *mut sig_atomic_t, + ::std::ptr::read_volatile::< + sig_atomic_t, + >(&interrupt_state as *const sig_atomic_t) + 1, + ); + } else if signal_is_trapped(2 as c_int) != 0 + && loop_level != 0 + { + ::std::ptr::write_volatile( + &mut interrupt_state as *mut sig_atomic_t, + ::std::ptr::read_volatile::< + sig_atomic_t, + >(&interrupt_state as *const sig_atomic_t) + 1, + ); + } else if interactive_shell != 0 + && signal_is_trapped(2 as c_int) == 0 as c_int + && sourcelevel != 0 + { + ::std::ptr::write_volatile( + &mut interrupt_state as *mut sig_atomic_t, + ::std::ptr::read_volatile::< + sig_atomic_t, + >(&interrupt_state as *const sig_atomic_t) + 1, + ); + } else { + putchar('\n' as i32); + libc::fflush(stdout); + } + } + } else if subshell_environment + & (0x4 as c_int | 0x10 as c_int) != 0 + && wait_sigint_received != 0 + { + if child_caught_sigint == 0 as c_int + && signal_is_trapped(2 as c_int) == 0 as c_int + { + sigprocmask( + 2 as c_int, + &mut oset, + 0 as *mut libc::c_void as *mut sigset_t, + ); + old_sigint_handler = set_signal_handler(2 as c_int, &mut None); + if old_sigint_handler == SIG_IGN!() + { + restore_sigint_handler(); + } else { + kill(getpid(), 2 as c_int); + } + } + } else if interactive_shell == 0 as c_int + && subshell_environment == 0 as c_int + && (**jobs.offset(job as isize)).flags & 0x1 as c_int + != 0 as c_int + { + s = job_signal_status(job); + if job_control != 0 + && (**jobs.offset(job as isize)).flags & 0x4 as c_int + != 0 as c_int + && ((s & 0x7f as c_int) + 1 as c_int) + as libc::c_schar as c_int >> 1 as c_int + > 0 as c_int + && s & 0x7f as c_int == 2 as c_int + { + ::std::ptr::write_volatile( + &mut interrupt_state as *mut sig_atomic_t, + ::std::ptr::read_volatile::< + sig_atomic_t, + >(&interrupt_state as *const sig_atomic_t) + 1, + ); + } + if check_window_size != 0 { + get_new_window_size( + 0 as c_int, + 0 as *mut c_int, + 0 as *mut c_int, + ); + } + } + if (**jobs.offset(job as isize)).state as c_int + == JDEAD as c_int + && (**jobs.offset(job as isize)).flags & 0x1 as c_int + != 0 as c_int + { + setjstatus(job); + } + notify_and_cleanup(); + } + } + _ => {} + } + sigprocmask(2 as c_int, &mut oset, 0 as *mut libc::c_void as *mut sigset_t); + return termination_state; +} + +#[no_mangle] +pub unsafe extern "C" fn wait_for_job(mut job: c_int, mut flags: c_int, mut ps: *mut procstat) -> c_int +{ + let mut pid: pid_t = 0; + let mut r: c_int = 0; + let mut state: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD(&mut set, &mut oset); + state = JOBSTATE!(job); + if state == JSTOPPED as c_int { + internal_warning(b"wait_for_job: job %d is stopped\0" as *const u8 as *const c_char, + job + 1 as c_int); + } + + pid = find_last_pid(job, 0 ); + UNBLOCK_CHILD(&mut oset); + + loop { + r = wait_for(pid, 0); + if r == -1 && errno!() == ECHILD { + mark_all_jobs_as_dead(); + } + + CHECK_WAIT_INTR!(); + + if flags & JWAIT_FORCE as c_int == 0 { + break; + } + BLOCK_CHILD (&mut set, &mut oset); + state = if job != NO_JOB && !(*jobs.offset(job as isize)).is_null() + { + JOBSTATE!(job) + } else { + JDEAD as c_int + }; + UNBLOCK_CHILD (&mut oset); + if !(state != JDEAD as c_int) { + break; + } + } + + BLOCK_CHILD (&mut set, &mut oset); + if job != NO_JOB && !(*jobs.offset(job as isize)).is_null() && DEADJOB!(job) + { + (**jobs.offset(job as isize)).flags |= J_NOTIFIED as c_int; + } + UNBLOCK_CHILD (&mut oset); + if !ps.is_null() { + (*ps).pid = pid; + (*ps).status = (if r < 0 { 127 } else { r }) as libc::c_short; + } + return r; +} + +#[macro_export] +macro_rules! IS_WAITING { + ($i:expr) => { + (**jobs.offset($i as isize)).flags & 0x80 as c_int != 0 as c_int + }; +} + +#[no_mangle] +pub unsafe extern "C" fn wait_for_any_job(mut flags: c_int, mut ps: *mut procstat) -> c_int +{ + let mut current_block: u64; + let mut pid: pid_t = 0; + let mut i: c_int = 0; + let mut r: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + if jobs_list_frozen != 0 { + return -1; + } + + BLOCK_CHILD (&mut set, &mut oset); + i = 0 as c_int; + loop { + if i < js.j_jobslots { + if !(flags & JWAIT_WAITING as c_int != 0 && !(*jobs.offset(i as isize)).is_null() + && IS_WAITING!(i) as c_int == 0) + { + if !(*jobs.offset(i as isize)).is_null() && DEADJOB!(i) && IS_NOTIFIED! (i) as c_int == 0 + { + current_block = 2729223887955387488; + break; + } + } + i += 1; + } else { + UNBLOCK_CHILD (&mut oset); + current_block = 7172762164747879670; + break; + } + } + 'c_22951: loop { + match current_block { + 2729223887955387488 => { + r = job_exit_status(i); + break; + } + _ => { + BLOCK_CHILD (&mut set, &mut oset); + i = 0 as c_int; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() + && RUNNING!(i) + && IS_FOREGROUND!(i) as c_int == 0 + { + break; + } + i += 1; + } + if i == js.j_jobslots { + UNBLOCK_CHILD (&mut oset); + return -1; + } + UNBLOCK_CHILD (&mut oset); + + QUIT!(); + CHECK_TERMSIG!(); + CHECK_WAIT_INTR!(); + + errno!() = 0; + r = wait_for(ANY_PID, 0 ); + if r == -1 && errno!() == ECHILD { + mark_all_jobs_as_dead(); + } + BLOCK_CHILD (&mut set, &mut oset); + + i = 0 as c_int; + while i < js.j_jobslots { + if !(flags & JWAIT_WAITING as c_int != 0 && !(*jobs.offset(i as isize)).is_null() && IS_WAITING!(i) as c_int == 0) + { + if !(*jobs.offset(i as isize)).is_null() + && DEADJOB!(i) + { + current_block = 2729223887955387488; + continue 'c_22951; + } + } + i += 1; + } + UNBLOCK_CHILD (&mut oset); + current_block = 7172762164747879670; + } + } + } + pid = find_last_pid(i, 0 ); + if !ps.is_null() { + (*ps).pid = pid; + (*ps).status = r as libc::c_short; + } + notify_of_job_status(); + delete_job(i, 0 ); + coproc_reap(); + UNBLOCK_CHILD (&mut oset); + return r; +} + +#[no_mangle] +pub unsafe extern "C" fn notify_and_cleanup() { + if jobs_list_frozen != 0 { + return; + } + if interactive != 0 || interactive_shell == 0 || sourcelevel != 0 { + notify_of_job_status(); + } + cleanup_dead_jobs(); +} + +#[no_mangle] +pub unsafe extern "C" fn reap_dead_jobs() { + mark_dead_jobs_as_notified(0); + cleanup_dead_jobs(); +} + +unsafe extern "C" fn most_recent_job_in_state( + mut job: c_int, + mut state: JOB_STATE, +) -> c_int { + let mut i: c_int = 0; + let mut result: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + sigemptyset(&mut set); + sigaddset(&mut set, 17 as c_int); + sigemptyset(&mut oset); + sigprocmask(0 as c_int, &mut set, &mut oset); + result = -(1 as c_int); + i = job - 1 as c_int; + while i >= 0 as c_int { + if !(*jobs.offset(i as isize)).is_null() + && (**jobs.offset(i as isize)).state as c_int == state as c_int + { + result = i; + break; + } else { + i -= 1; + } + } + sigprocmask(2 as c_int, &mut oset, 0 as *mut libc::c_void as *mut sigset_t); + return result; +} + +unsafe extern "C" fn job_last_stopped(mut job: c_int) -> c_int { + return most_recent_job_in_state(job, JSTOPPED as c_int); +} + +unsafe extern "C" fn job_last_running(mut job: c_int) -> c_int { + return most_recent_job_in_state(job, JRUNNING as c_int); +} + + +unsafe extern "C" fn set_current_job(mut job: c_int) { + let mut candidate: c_int = 0; + + if js.j_current != job { + js.j_previous = js.j_current; + js.j_current = job; + } + + if js.j_previous != js.j_current && js.j_previous != NO_JOB + && !(*jobs.offset(js.j_previous as isize)).is_null() + && (**jobs.offset(js.j_previous as isize)).state as c_int + == JSTOPPED as c_int + { + return; + } + candidate = NO_JOB; + if (**jobs.offset(js.j_current as isize)).state as c_int + == JSTOPPED as c_int + { + candidate = job_last_stopped(js.j_current); + if candidate != NO_JOB { + js.j_previous = candidate; + return; + } + } + candidate = if (**jobs.offset(js.j_current as isize)).state as c_int + == JRUNNING as c_int + { + job_last_running(js.j_current) + } else { + job_last_running(js.j_jobslots) + }; + if candidate != NO_JOB { + js.j_previous = candidate; + return; + } + js.j_previous = js.j_current; +} +unsafe extern "C" fn reset_current() { + let mut candidate: c_int = 0; + + if js.j_jobslots != 0 && js.j_current != NO_JOB + && !(*jobs.offset(js.j_current as isize)).is_null() + && STOPPED!(js.j_current) + { + candidate = js.j_current; + } else { + candidate = NO_JOB; + + if js.j_previous != NO_JOB + && !(*jobs.offset(js.j_previous as isize)).is_null() + && STOPPED!(js.j_previous) + { + candidate = js.j_previous; + } + if candidate == NO_JOB { + candidate = job_last_stopped(js.j_jobslots); + } + if candidate == NO_JOB { + candidate = job_last_running(js.j_jobslots); + } + } + if candidate != NO_JOB { + set_current_job(candidate); + } else { + js.j_previous = NO_JOB; + js.j_current = js.j_previous; + }; +} + +unsafe extern "C" fn set_job_running(mut job: c_int) { + let mut p: *mut PROCESS = 0 as *mut PROCESS; + + p = (**jobs.offset(job as isize)).pipe; + loop { + if WIFSTOPPED!((*p).status) { + (*p).running = PS_RUNNING as c_int; + } + p = (*p).next; + if !(p != (**jobs.offset(job as isize)).pipe) { + break; + } + } + JOBSTATE!(job) = JRUNNING; +} + +pub type cc_t = libc::c_uchar; +pub type speed_t = libc::c_uint; +pub type tcflag_t = libc::c_uint; + +#[no_mangle] +pub unsafe extern "C" fn start_job(mut job: c_int, mut foreground: c_int) -> c_int +{ + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut already_running: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + let mut wd: *mut c_char = 0 as *mut c_char; + let mut s: *mut c_char = 0 as *mut c_char; + static mut save_stty: libc::termios = libc::termios { + c_iflag: 0, + c_oflag: 0, + c_cflag: 0, + c_lflag: 0, + c_line: 0, + c_cc: [0; 32], + c_ispeed: 0, + c_ospeed: 0, + }; + + BLOCK_CHILD (&mut set, &mut oset); + if subshell_environment & SUBSHELL_COMSUB as c_int != 0 && pipeline_pgrp == shell_pgrp { + internal_error( + b"%s: no current jobs\0" as *const u8 as *const c_char, + this_command_name, + ); + UNBLOCK_CHILD (&mut oset); + return -1; + } + if DEADJOB!(job){ + internal_error( + b"%s: job has terminated\0" as *const u8 as *const c_char, + this_command_name, + ); + UNBLOCK_CHILD(&mut oset); + return -1; + } + already_running = RUNNING! (job) as c_int; + + if foreground == 0 && already_running != 0 { + internal_error( + b"%s: job %d already in background\0" as *const u8 as *const c_char, + this_command_name, + job + 1 as c_int, + ); + UNBLOCK_CHILD (&mut oset); + return 0 ; + } + + wd = current_working_directory(); + + (**jobs.offset(job as isize)).flags &= !(J_NOTIFIED as c_int); + + if foreground != 0 { + set_current_job(job); + (**jobs.offset(job as isize)).flags |= J_FOREGROUND as c_int; + } + + p = (**jobs.offset(job as isize)).pipe; + + if foreground == 0 { + if posixly_correct == 0 as c_int { + s = (if job == js.j_current { + b"+ \0" as *const u8 as *const c_char + } else if job == js.j_previous { + b"- \0" as *const u8 as *const c_char + } else { + b" \0" as *const u8 as *const c_char + }) as *mut c_char; + } else { + s = b" \0" as *const u8 as *const c_char as *mut c_char; + } + print!("[{}]{}",job + 1 as c_int, CStr::from_ptr(s).to_str().unwrap()); + } + loop { + print!( + "{}{}", + if !((*p).command).is_null() { + let str1 = (*p).command; + CStr::from_ptr(str1).to_str().unwrap() + } else { + let str1 = b"\0" as *const u8 as *const c_char; + CStr::from_ptr(str1).to_str().unwrap() + }, + + if (*p).next != (**jobs.offset(job as isize)).pipe { + let str1 = b" | \0" as *const u8 as *const c_char; + CStr::from_ptr(str1).to_str().unwrap() + } else { + let str1 = b"\0" as *const u8 as *const c_char; + CStr::from_ptr(str1).to_str().unwrap() + }, + ); + p = (*p).next; + if !(p != (**jobs.offset(job as isize)).pipe) { + break; + } + } + if foreground == 0 { + print!(" &"); + } + if strcmp(wd, (**jobs.offset(job as isize)).wd) != 0 { + let str1 = polite_directory_format((**jobs.offset(job as isize)).wd); + print!( + " (wd:{})", + CStr::from_ptr(str1).to_str().unwrap() + ); + } + print!("\n"); + + if already_running == 0 { + set_job_running(job); + } + if foreground != 0 { + get_tty_state(); + save_stty = shell_tty_info; + if IS_JOBCONTROL!(job) { + give_terminal_to((**jobs.offset(job as isize)).pgrp, 0); + } + } else { + (**jobs.offset(job as isize)).flags &= !(J_FOREGROUND as c_int); + } + if already_running == 0 { + (**jobs.offset(job as isize)).flags |= J_NOTIFIED as c_int; + killpg((**jobs.offset(job as isize)).pgrp, 18 as c_int); + } + if foreground != 0 { + let mut pid: pid_t = 0; + let mut st: c_int = 0; + + pid = find_last_pid(job, 0 as c_int); + UNBLOCK_CHILD (&mut oset); + st = wait_for(pid, 0 ); + shell_tty_info = save_stty; + set_tty_state(); + return st; + } else { + reset_current(); + UNBLOCK_CHILD (&mut set); + return 0 as c_int; + }; +} + +#[macro_export] +macro_rules! PEXITED { + ($p:expr) => { + (*$p).running == 0 as c_int + }; +} + + +#[no_mangle] +pub unsafe extern "C" fn kill_pid(mut pid: pid_t, mut sig: c_int, mut group: c_int) -> c_int +{ + let mut p: *mut PROCESS = 0 as *mut PROCESS; + let mut job: c_int = 0; + let mut result: c_int = 0; + let mut negative: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + if pid < -1 { + pid = -pid; + negative = 1; + group = negative; + } else { + negative = 0 ; + } + result = 0 ; + if group != 0 { + BLOCK_CHILD ( &mut set, &mut oset); + p = find_pipeline(pid, 0, &mut job); + + if job != NO_JOB { + (**jobs.offset(job as isize)).flags &= !(J_NOTIFIED as c_int); + if negative != 0 && (**jobs.offset(job as isize)).pgrp == shell_pgrp { + result = killpg(pid, sig); + } else if (**jobs.offset(job as isize)).pgrp == shell_pgrp { + p = (**jobs.offset(job as isize)).pipe; + loop { + if !(PALIVE!(p) as c_int == 0) + { + kill((*p).pid, sig); + if PEXITED!(p) + && (sig == SIGTERM as c_int || sig == SIGHUP as c_int) + { + kill((*p).pid, SIGCONT as c_int); + } + p = (*p).next; + } + if !(p != (**jobs.offset(job as isize)).pipe) { + break; + } + } + } else { + result = killpg((**jobs.offset(job as isize)).pgrp, sig); + if !p.is_null() + && STOPPED!(job) + && (sig == SIGTERM as c_int || sig == SIGHUP as c_int) + { + killpg((**jobs.offset(job as isize)).pgrp, SIGCONT as c_int); + } + if !p.is_null() + && STOPPED!(job) && sig == SIGCONT as c_int + { + set_job_running(job); + (**jobs.offset(job as isize)).flags &= !(J_FOREGROUND as c_int); + (**jobs.offset(job as isize)).flags |= J_NOTIFIED as c_int; + } + } + } else { + result = killpg(pid, sig); + } + UNBLOCK_CHILD (&mut oset); + } else { + result = kill(pid, sig); + } + return result; +} + +unsafe extern "C" fn sigchld_handler(mut sig: c_int) { + let mut n: c_int = 0; + let mut oerrno: c_int = 0; + + oerrno = errno!(); + sigchld += 1; + n = 0 ; + if queue_sigchld == 0 { + n = waitchld(-1, 0 ); + } + errno!() = oerrno; + return; +} + + +#[macro_export] +macro_rules! sh_longjmp { + ($x:expr,$n:expr) => { + siglongjmp($x, $n as c_int) + }; +} + + +pub const EINVAL:i32 = 22; +pub const EINTR:i32 = 22; + +#[macro_export] +macro_rules! IMPOSSIBLE_TRAP_HANDLER { + () => { + initialize_traps as *mut SigHandler + }; +} + +#[macro_export] +macro_rules! IGNORE_SIG { + () => { + SIG_IGN!() + }; +} +unsafe extern "C" fn waitchld(mut wpid: pid_t, mut block: c_int) -> c_int { + let mut status: WAIT = 0; + let mut child: *mut PROCESS = 0 as *mut PROCESS; + let mut pid: pid_t = 0; + let mut ind: c_int = 0; + let mut call_set_current: c_int = 0; + let mut last_stopped_job: c_int = 0; + let mut job: c_int = 0; + let mut children_exited: c_int = 0; + let mut waitpid_flags: c_int = 0; + static mut wcontinued: c_int = 8 as c_int; + children_exited = 0 as c_int; + call_set_current = children_exited; + last_stopped_job = -(1 as c_int); + loop { + waitpid_flags = if job_control != 0 && subshell_environment == 0 as c_int { + 2 as c_int | wcontinued + } else { + 0 as c_int + }; + if sigchld != 0 || block == 0 as c_int { + waitpid_flags |= 1 as c_int; + } + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + if wait_intr_flag != 0 && wait_signal_received != 0 + && this_shell_builtin.is_some() + && this_shell_builtin + == Some( + wait_builtin as unsafe extern "C" fn(*mut WordList) -> c_int, + ) + { + siglongjmp(wait_intr_buf.as_mut_ptr(), 1 as c_int); + } + if block == 1 as c_int && queue_sigchld == 0 as c_int + && waitpid_flags & 1 as c_int == 0 as c_int + { + internal_warning( + dcgettext( + 0 as *const c_char, + b"waitchld: turning on WNOHANG to avoid indefinite block\0" + as *const u8 as *const c_char, + 5 as c_int, + ), + ); + waitpid_flags |= 1 as c_int; + } + pid = waitpid(-(1 as c_int), &mut status, waitpid_flags); + if wcontinued != 0 && pid < 0 as c_int + && *__errno_location() == 22 as c_int + { + wcontinued = 0 as c_int; + } else { + if sigchld > 0 as c_int && waitpid_flags & 1 as c_int != 0 { + sigchld -= 1; + } + if pid < 0 as c_int && *__errno_location() == 10 as c_int { + if !(children_exited == 0 as c_int) { + break; + } + return -(1 as c_int); + } else { + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + if wait_intr_flag != 0 && wait_signal_received != 0 + && this_shell_builtin.is_some() + && this_shell_builtin + == Some( + wait_builtin + as unsafe extern "C" fn(*mut WordList) -> c_int, + ) + { + siglongjmp(wait_intr_buf.as_mut_ptr(), 1 as c_int); + } + if pid < 0 as c_int && *__errno_location() == 4 as c_int + && wait_sigint_received != 0 + { + child_caught_sigint = 1 as c_int; + } + if !(pid <= 0 as c_int) { + if wait_sigint_received != 0 + && ((((status & 0x7f as c_int) + 1 as c_int) + as libc::c_schar as c_int >> 1 as c_int + > 0 as c_int) as c_int == 0 as c_int + || status & 0x7f as c_int != 2 as c_int) + { + child_caught_sigint = 1 as c_int; + } + if ((status & 0x7f as c_int) + 1 as c_int) + as libc::c_schar as c_int >> 1 as c_int + > 0 as c_int + && status & 0x7f as c_int == 2 as c_int + { + child_caught_sigint = 0 as c_int; + } + if (status == 0xffff as c_int) as c_int + == 0 as c_int + { + children_exited += 1; + js.c_living -= 1; + } + child = find_process(pid, 1 as c_int, &mut job); + coproc_pidchk(pid, status); + ind = find_procsub_child(pid); + if ind >= 0 as c_int { + set_procsub_status(ind, pid, status); + } + if child.is_null() { + if status & 0x7f as c_int == 0 as c_int + || ((status & 0x7f as c_int) + 1 as c_int) + as libc::c_schar as c_int >> 1 as c_int + > 0 as c_int + { + js.c_reaped += 1; + } + } else { + (*child).status = status; + (*child) + .running = if status == 0xffff as c_int { + 1 as c_int + } else { + 0 as c_int + }; + if (*child).running == 0 as c_int { + js.c_totreaped += 1; + if job != -(1 as c_int) { + js.c_reaped += 1; + } + } + if !(job == -(1 as c_int)) { + call_set_current += set_job_status_and_cleanup(job); + if (**jobs.offset(job as isize)).state as c_int + == JSTOPPED as c_int + { + last_stopped_job = job; + } else if (**jobs.offset(job as isize)).state as c_int + == JDEAD as c_int && last_stopped_job == job + { + last_stopped_job = -(1 as c_int); + } + } + } + } + } + } + if !((sigchld != 0 || block == 0 as c_int) && pid > 0 as c_int) { + break; + } + } + if call_set_current != 0 { + if last_stopped_job != -(1 as c_int) { + set_current_job(last_stopped_job); + } else { + reset_current(); + } + } + if children_exited != 0 + && (signal_is_trapped(17 as c_int) != 0 + || *trap_list.as_mut_ptr().offset(17 as c_int as isize) + == ::std::mem::transmute::< + *mut SigHandler, + *mut c_char, + >( + ::std::mem::transmute::< + unsafe extern "C" fn() -> (), + *mut SigHandler, + >(initialize_traps as unsafe extern "C" fn() -> ()), + )) + && *trap_list.as_mut_ptr().offset(17 as c_int as isize) + != ::std::mem::transmute::< + __sighandler_t, + *mut c_char, + >( + ::std::mem::transmute::< + libc::intptr_t, + __sighandler_t, + >(1 as c_int as libc::intptr_t), + ) + { + if posixly_correct != 0 && this_shell_builtin.is_some() + && this_shell_builtin + == Some( + wait_builtin as unsafe extern "C" fn(*mut WordList) -> c_int, + ) + { + queue_sigchld_trap(children_exited); + wait_signal_received = 17 as c_int; + if sigchld == 0 as c_int && wait_intr_flag != 0 { + siglongjmp(wait_intr_buf.as_mut_ptr(), 1 as c_int); + } + } else if sigchld != 0 { + queue_sigchld_trap(children_exited); + } else if signal_in_progress(17 as c_int) != 0 { + queue_sigchld_trap(children_exited); + } else if *trap_list.as_mut_ptr().offset(17 as c_int as isize) + == ::std::mem::transmute::< + *mut SigHandler, + *mut c_char, + >( + ::std::mem::transmute::< + unsafe extern "C" fn() -> (), + *mut SigHandler, + >(initialize_traps as unsafe extern "C" fn() -> ()), + ) + { + queue_sigchld_trap(children_exited); + } else if running_trap != 0 { + queue_sigchld_trap(children_exited); + } else if this_shell_builtin + == Some( + wait_builtin as unsafe extern "C" fn(*mut WordList) -> c_int, + ) + { + run_sigchld_trap(children_exited); + } else { + queue_sigchld_trap(children_exited); + } + } + if asynchronous_notification != 0 && interactive != 0 + && executing_builtin == 0 as c_int + { + notify_of_job_status(); + } + return children_exited; +} + +unsafe extern "C" fn set_job_status_and_cleanup(mut job: c_int) -> c_int { + let mut child: *mut PROCESS = 0 as *mut PROCESS; + let mut tstatus: c_int = 0; + let mut job_state: c_int = 0; + let mut any_stopped: c_int = 0; + let mut any_tstped: c_int = 0; + let mut call_set_current: c_int = 0; + let mut temp_handler: *mut SigHandler; + + child = (**jobs.offset(job as isize)).pipe; + (**jobs.offset(job as isize)).flags &= !(J_NOTIFIED as c_int); + + call_set_current = 0; + + any_tstped = 0; + any_stopped = any_tstped; + job_state = any_stopped; + loop { + job_state |= PRUNNING! (child) as c_int; + if PSTOPPED (child) != 0 { + any_stopped = 1; + any_tstped |= (job_control != 0 && WSTOPSIG!((*child).status) == SIGTSTP as c_int) as c_int; + } + child = (*child).next; + if !(child != (**jobs.offset(job as isize)).pipe) { + break; + } + } + + if job_state != 0 + && JOBSTATE!(job) != JSTOPPED as c_int + { + return 0 ; + } + + if any_stopped != 0 { + (**jobs.offset(job as isize)).state = JSTOPPED; + (**jobs.offset(job as isize)).flags &= !(J_FOREGROUND as c_int); + call_set_current += 1; + + if any_tstped != 0 && loop_level != 0 { + breaking = loop_level; + } + } else if job_state != 0 { + (**jobs.offset(job as isize)).state = JRUNNING; + call_set_current += 1; + } else { + (**jobs.offset(job as isize)).state = JDEAD; + js.j_ndead += 1; + + if ((**jobs.offset(job as isize)).j_cleanup).is_some() { + (Some( + ((**jobs.offset(job as isize)).j_cleanup) + .expect("non-null function pointer"), + )) + .expect( + "non-null function pointer", + )((**jobs.offset(job as isize)).cleanarg); + + (**jobs.offset(job as isize)).j_cleanup = ::std::mem::transmute::<*mut libc::c_void, sh_vptrfunc_t>(0 as *mut libc::c_void); + } + } + if JOBSTATE!(job) == JDEAD as c_int { + if wait_sigint_received != 0 && interactive_shell == 0 + && child_caught_sigint != 0 + && IS_FOREGROUND!(job) && signal_is_trapped(SIGINT as c_int) != 0 + { + let mut old_frozen: c_int = 0; + wait_sigint_received = 0 ; + last_command_exit_value = process_exit_status ((*child).status); + + old_frozen = jobs_list_frozen; + jobs_list_frozen = 1 ; + tstatus = maybe_call_trap_handler(SIGINT as c_int); + jobs_list_frozen = old_frozen; + } else if wait_sigint_received != 0 && child_caught_sigint == 0 + && IS_FOREGROUND!(job) + && IS_JOBCONTROL!(job) as c_int == 0 + { + let mut old_frozen_0: c_int = 0; + + wait_sigint_received = 0 ; + + if signal_is_trapped(SIGINT as c_int) != 0 { + last_command_exit_value = process_exit_status ((*child).status); + } + old_frozen_0 = jobs_list_frozen; + jobs_list_frozen = 1 ; + tstatus = maybe_call_trap_handler(SIGINT as c_int); + jobs_list_frozen = old_frozen_0; + if tstatus == 0 + && old_sigint_handler != INVALID_SIGNAL_HANDLER!() + { + temp_handler = old_sigint_handler; + if temp_handler == trap_handler as *mut Option + && signal_is_trapped(SIGINT as c_int) == 0 + { + temp_handler = &mut trap_to_sighandler(SIGINT as c_int); + } + println!("161616161616"); + restore_sigint_handler(); + if !temp_handler.is_null() { + termsig_handler(SIGINT as c_int); + } else if temp_handler + != SIG_IGN!() + { + //这里是函数回调传入参数 + (*temp_handler).unwrap()(SIGINT as c_int); + } + } + } + } + return call_set_current; +} + + +unsafe extern "C" fn setjstatus(mut j: c_int) { + let mut i: c_int = 0; + let mut p: *mut PROCESS = 0 as *mut PROCESS; + + i = 1 ; + p = (**jobs.offset(j as isize)).pipe; + while (*p).next != (**jobs.offset(j as isize)).pipe { + p = (*p).next; + i += 1; + } + i += 1; + if statsize < i { + pstatuses = libc::realloc(pstatuses as *mut c_void, (i * 4) as usize) as *mut c_int; //i * sizeof (int) + statsize = i; + } + i = 0 as c_int; + p = (**jobs.offset(j as isize)).pipe; + loop { + *pstatuses.offset(i as isize) = process_exit_status((*p).status); + i = i + 1; + p = (*p).next; + if !(p != (**jobs.offset(j as isize)).pipe) { + break; + } + } + + *pstatuses.offset(i as isize) = -1; + set_pipestatus_array(pstatuses, i); +} + + +#[macro_export] +macro_rules! savestring { + ($x:expr) => { + libc::strcpy(libc::malloc(1+ libc::strlen($x)) as *mut c_char , ($x)) + }; +} + + +pub const SEVAL_NOHIST:c_int = 0x004; +pub const SEVAL_RESETLINE:c_int = 0x010; + + +#[no_mangle] +pub unsafe extern "C" fn run_sigchld_trap(mut nchild: c_int) { + let mut trap_command: *mut c_char ; + let mut i: c_int = 0; + trap_command = savestring!(*trap_list.as_mut_ptr().offset(SIGCHLD as c_int as isize)); + + begin_unwind_frame( + b"SIGCHLD trap\0" as *const u8 as *mut c_char, + ); + + unwind_protect_mem( + &mut last_command_exit_value as *mut c_int as *mut c_char, + ::std::mem::size_of::() as libc::c_ulong as c_int, + ); + unwind_protect_mem( + &mut last_command_exit_signal as *mut c_int as *mut c_char, + ::std::mem::size_of::() as libc::c_ulong as c_int, + ); + unwind_protect_mem( + &mut last_made_pid as *mut pid_t as *mut c_char, + ::std::mem::size_of::() as libc::c_ulong as c_int, + ); + unwind_protect_mem( + &mut jobs_list_frozen as *mut c_int as *mut c_char, + ::std::mem::size_of::() as libc::c_ulong as c_int, + ); + unwind_protect_mem( + &mut the_pipeline as *mut *mut PROCESS as *mut c_char, + ::std::mem::size_of::<*mut PROCESS>() as libc::c_ulong as c_int, + ); + unwind_protect_mem( + &mut subst_assign_varlist as *mut *mut WordList as *mut c_char, + ::std::mem::size_of::<*mut WordList>() as libc::c_ulong as c_int, + ); + unsafe{ + unwind_protect_mem( + &mut this_shell_builtin as *const sh_builtin_func_t as *mut c_char, + ::std::mem::size_of::>() as libc::c_ulong + as c_int, + ); + } + unwind_protect_mem( + &mut temporary_env as *mut *mut HASH_TABLE as *mut c_char, + ::std::mem::size_of::<*mut HASH_TABLE>() as libc::c_ulong as c_int, + ); + + extern "C" { + pub fn xfree(arg1: *mut ::std::os::raw::c_void); + } + let t1=xfree; + unsafe{ + let t = xfree as *const libc::c_void; + let t2=t1 as *const unsafe extern "C" fn() ->i32; + let t3 = t2 as *mut unsafe extern "C" fn() -> ::std::os::raw::c_int; + + + + + let mut t4=&Some(t2); + let mut t5=&Some(t3); + let mut t6=t5; + + add_unwind_protect( + t5.unwrap() as *const ::std::option::Option<*mut unsafe extern "C" fn()->i32> + as *mut ::std::option::Optioni32>, + trap_command, + ); + + + let r1=maybe_set_sigchld_trap as *const fn(_: *mut c_char); + let r2=&Some(r1); + add_unwind_protect( + Some(maybe_set_sigchld_trap as *mut unsafe extern "C" fn() -> std::os::raw::c_int).unwrap() as *const ::std::option::Option<*mut unsafe extern "C" fn()->i32> + as *mut ::std::option::Optioni32>, + trap_command, + ); + + subst_assign_varlist = 0 as *mut WordList; + the_pipeline = 0 as *mut PROCESS; + temporary_env = 0 as *mut HASH_TABLE; + + running_trap = SIGCHLD as c_int + 1 ; + + set_impossible_sigchld_trap(); + jobs_list_frozen = 1 ; + i = 0 ; + while i < nchild { + parse_and_execute( + savestring! (trap_command), + b"trap\0" as *const u8 as *const c_char, + SEVAL_NOHIST | SEVAL_RESETLINE + ); + i += 1; + } + run_unwind_frame( + b"SIGCHLD trap\0" as *const u8 as *const c_char as *mut c_char, + ); + running_trap = 0 as c_int; +} +} + +unsafe extern "C" fn notify_of_job_status() { + let mut job: c_int = 0; + let mut termsig: c_int = 0; + let mut dir: *mut c_char = 0 as *mut c_char; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + let mut s: WAIT = 0; + + if jobs.is_null() || js.j_jobslots == 0 { + return; + } + if !old_ttou.is_null(){ + sigemptyset(&mut set); + sigaddset(&mut set, SIGCHLD as c_int); + sigaddset(&mut set, SIGTTOU as c_int); + sigemptyset(&mut oset); + sigprocmask(SIG_BLOCK as c_int, &mut set, &mut oset); + } else { + queue_sigchld += 1; + } + job = 0 ; + dir = 0 as *mut c_char; + while job < js.j_jobslots { + if !(*jobs.offset(job as isize)).is_null() + && IS_NOTIFIED!(job)as c_int == 0 + { + s = raw_job_exit_status(job); + termsig = WTERMSIG! (s); + + if !(startup_state == 0 && WIFSIGNALED!(s) as c_int == 0 + && ((DEADJOB!(job) && IS_FOREGROUND!(job) as c_int == 0 || STOPPED!(job)))) + { + if job_control == 0 && interactive_shell != 0 + || startup_state == 2 && subshell_environment & SUBSHELL_COMSUB as c_int != 0 + || startup_state == 2 && posixly_correct != 0 + && subshell_environment & SUBSHELL_COMSUB as c_int == 0 as c_int + { + if (DEADJOB! (job) && (interactive_shell != 0 + || find_last_pid(job, 0)!= last_asynchronous_pid)) + { + (**jobs.offset(job as isize)).flags |= J_NOTIFIED as c_int; + } + } else { + match (**jobs.offset(job as isize)).state as c_int { + JDEAD => { + if interactive_shell == 0 && termsig != 0 + && WIFSIGNALED! (s) + && termsig != SIGINT as c_int + && termsig != SIGTERM as c_int + && signal_is_trapped(termsig) == 0 + { + fprintf( + stderr, + b"%s: line %d: \0" as *const u8 as *const c_char, + get_name_for_error(), + if line_number == 0 { + 1 + } else { + line_number + }, + ); + pretty_print_job(job, JLIST_NONINTERACTIVE as c_int, stderr); + } else if IS_FOREGROUND!(job) + { + if termsig != 0 + && WIFSIGNALED! (s) + && termsig != SIGINT as c_int + && termsig != SIGPIPE as c_int + { + fprintf( + stderr, + b"%s\0" as *const u8 as *const c_char, + j_strsignal(termsig), + ); + if WIFCORED! (s) { + fprintf( + stderr, + b" (core dumped)\0" as *const u8 as *const c_char); + } + fprintf( + stderr, + b"\n\0" as *const u8 as *const c_char, + ); + } + } else if job_control != 0 { + if dir.is_null() { + dir = current_working_directory(); + } + pretty_print_job(job, JLIST_STANDARD as c_int, stderr); + if !dir.is_null() + && strcmp(dir, (**jobs.offset(job as isize)).wd) + != 0 + { + fprintf( + stderr, + b"(wd now: %s)\n\0" as *const u8 as *const c_char, + polite_directory_format(dir) + ); + } + } + (**jobs.offset(job as isize)).flags |= J_NOTIFIED as c_int; + } + JSTOPPED => { + fprintf(stderr, b"\n\0" as *const u8 as *const c_char); + if dir.is_null() { + dir = current_working_directory(); + } + pretty_print_job(job, JLIST_STANDARD as c_int, stderr); + if !dir.is_null() + && strcmp(dir, (**jobs.offset(job as isize)).wd) + != 0 + { + fprintf( + stderr, + b"(wd now: %s)\n\0" as *const u8 as *const c_char, + polite_directory_format(dir), + ); + } + (**jobs.offset(job as isize)).flags |= J_NOTIFIED as c_int; + } + JRUNNING | JMIXED => {} + _ => { + programming_error( + b"notify_of_job_status\0" as *const u8 + as *const c_char, + ); + } + } + } + } + } + job += 1; + } + if !old_ttou.is_null() { + sigprocmask( + SIG_SETMASK as c_int, + &mut oset, + 0 as *mut libc::c_void as *mut sigset_t, + ); + } else { + queue_sigchld -= 1; + }; +} + +pub const O_RDWR:i32 = 0o2; +pub const O_NONBLOCK:i32 = 0o4000; +pub const F_SETFD:i32 = 2; +pub const FD_CLOEXEC:i32 = 1; + +#[macro_export] +macro_rules! SET_CLOSE_ON_EXEC { + ($fd:expr) => { + libc::fcntl (($fd), F_SETFD, FD_CLOEXEC) + }; +} + + +#[no_mangle] +pub unsafe extern "C" fn initialize_job_control(mut force: c_int) -> c_int { + let mut current_block: u64; + let mut t: pid_t = 0; + let mut t_errno: c_int = 0; + let mut tty_sigs: c_int = 0; + + t_errno = -(1 as c_int); + shell_pgrp = getpgid(0); + + if shell_pgrp == -(1 as c_int) { + sys_error( + dcgettext( + 0 as *const c_char, + b"initialize_job_control: getpgrp failed\0" as *const u8 + as *const c_char, + 5 as c_int, + ), + ); + exit(1 as c_int); + } + + if interactive == 0 as c_int && force == 0 as c_int { + job_control = 0 as c_int; + original_pgrp = -(1 as c_int); + shell_tty = fileno(stderr); + terminal_pgrp = tcgetpgrp(shell_tty); + } else { + shell_tty = -(1 as c_int); + if forced_interactive != 0 && isatty(fileno(stderr)) == 0 as c_int { + shell_tty = open( + b"/dev/tty\0" as *const u8 as *const c_char, + 0o2 as c_int | 0o4000 as c_int, + ); + } + if shell_tty == -(1 as c_int) { + shell_tty = dup(fileno(stderr)); + } + if shell_tty != -(1 as c_int) { + shell_tty = move_to_high_fd( + shell_tty, + 1 as c_int, + -(1 as c_int), + ); + } + if shell_pgrp == 0 as c_int { + shell_pgrp = getpid(); + setpgid(0 as c_int, shell_pgrp); + if shell_tty != -(1 as c_int) { + tcsetpgrp(shell_tty, shell_pgrp); + } + } + tty_sigs = 0 as c_int; + loop { + terminal_pgrp = tcgetpgrp(shell_tty); + if !(terminal_pgrp != -(1 as c_int)) { + current_block = 5529461102203738653; + break; + } + if !(shell_pgrp != terminal_pgrp) { + current_block = 5529461102203738653; + break; + } + let mut ottin: *mut SigHandler ; + if terminating_signal != 0 { + termsig_handler(terminating_signal); + } + ottin = set_signal_handler(21 as c_int, &mut None); + kill(0 as c_int, 21 as c_int); + set_signal_handler(21 as c_int, ottin); + let fresh35 = tty_sigs; + tty_sigs = tty_sigs + 1; + if !(fresh35 > 16 as c_int) { + continue; + } + sys_error( + dcgettext( + 0 as *const c_char, + b"initialize_job_control: no job control in background\0" + as *const u8 as *const c_char, + 5 as c_int, + ), + ); + job_control = 0 as c_int; + original_pgrp = terminal_pgrp; + current_block = 16073591882049499585; + break; + } + match current_block { + 16073591882049499585 => {} + _ => { + if terminal_pgrp == -(1 as c_int) { + t_errno = *__errno_location(); + } + if set_new_line_discipline(shell_tty) < 0 as c_int { + sys_error( + dcgettext( + 0 as *const c_char, + b"initialize_job_control: line discipline\0" as *const u8 + as *const c_char, + 5 as c_int, + ), + ); + job_control = 0 as c_int; + } else { + original_pgrp = shell_pgrp; + shell_pgrp = getpid(); + if original_pgrp != shell_pgrp + && setpgid(0 as c_int, shell_pgrp) < 0 as c_int + { + sys_error( + dcgettext( + 0 as *const c_char, + b"initialize_job_control: setpgid\0" as *const u8 + as *const c_char, + 5 as c_int, + ), + ); + shell_pgrp = original_pgrp; + } + job_control = 1 as c_int; + if shell_pgrp != original_pgrp && shell_pgrp != terminal_pgrp { + if give_terminal_to(shell_pgrp, 0 as c_int) + < 0 as c_int + { + t_errno = *__errno_location(); + setpgid(0 as c_int, original_pgrp); + shell_pgrp = original_pgrp; + *__errno_location() = t_errno; + sys_error( + dcgettext( + 0 as *const c_char, + b"cannot set terminal process group (%d)\0" as *const u8 + as *const c_char, + 5 as c_int, + ), + shell_pgrp, + ); + job_control = 0 as c_int; + } + } + if job_control != 0 + && { + t = tcgetpgrp(shell_tty); + t == -(1 as c_int) || t != shell_pgrp + } + { + if t_errno != -(1 as c_int) { + *__errno_location() = t_errno; + } + sys_error( + dcgettext( + 0 as *const c_char, + b"cannot set terminal process group (%d)\0" as *const u8 + as *const c_char, + 5 as c_int, + ), + t, + ); + job_control = 0 as c_int; + } + } + if job_control == 0 as c_int { + internal_error( + dcgettext( + 0 as *const c_char, + b"no job control in this shell\0" as *const u8 + as *const c_char, + 5 as c_int, + ), + ); + } + } + } + } + running_in_background = (terminal_pgrp != shell_pgrp) as c_int; + if shell_tty != fileno(stderr) { + fcntl(shell_tty, 2 as c_int, 1 as c_int); + } + set_signal_handler( + 17 as c_int, + sigchld_handler as *mut Option + ); + change_flag('m' as i32, if job_control != 0 { '-' as i32 } else { '+' as i32 }); + if interactive != 0 { + get_tty_state(); + } + set_maxchild(0 as c_int); + return job_control; +} + +unsafe extern "C" fn set_new_line_discipline(mut tty: c_int) -> c_int { + return 0 as c_int; +} + +#[no_mangle] +pub unsafe extern "C" fn initialize_job_signals() { + if interactive != 0 { + set_signal_handler( + 2 as c_int, + std::mem::transmute::< + std::option::Option, + *mut std::option::Option + >(Some(sigint_sighandler as unsafe extern "C" fn(c_int) -> ()),), + ); + set_signal_handler (SIGTSTP as c_int, SIG_IGN!()); + set_signal_handler (SIGTTOU as c_int, SIG_IGN!()); + set_signal_handler (SIGTTIN as c_int, SIG_IGN!()); + } else if job_control != 0 { + old_tstp = set_signal_handler( + SIGTSTP as c_int, + sigstop_sighandler as *mut Option, + ); + old_ttin = set_signal_handler( + SIGTTIN as c_int, + sigstop_sighandler as *mut Option, + ); + old_ttou = set_signal_handler( + SIGTTOU as c_int, + sigstop_sighandler as *mut Option, + ); + } +} + +unsafe extern "C" fn sigcont_sighandler(mut sig: c_int) { + initialize_job_signals(); + set_signal_handler(SIGCONT as c_int, old_cont); + kill(getpid(), SIGCONT as c_int); +} +unsafe extern "C" fn sigstop_sighandler(mut sig: c_int) { + set_signal_handler(SIGTSTP as c_int, old_tstp); + set_signal_handler(SIGTTOU as c_int, old_ttou); + set_signal_handler(SIGTTIN as c_int, old_ttin); + old_cont = set_signal_handler( + SIGCONT as c_int, + sigcont_sighandler as *mut Option + ); + give_terminal_to(shell_pgrp, 0 ); + kill(getpid(), sig); +} + + +#[no_mangle] +pub unsafe extern "C" fn give_terminal_to(mut pgrp: pid_t,mut force: c_int) -> c_int +{ + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + let mut r: c_int = 0; + let mut e: c_int = 0; + + if job_control != 0 || force != 0 { + sigemptyset(&mut set); + sigaddset(&mut set, SIGTTOU as c_int); + sigaddset(&mut set, SIGTTIN as c_int); + sigaddset(&mut set, SIGTSTP as c_int); + sigaddset(&mut set, SIGCHLD as c_int); + sigemptyset(&mut oset); + sigprocmask(SIG_BLOCK as c_int, &mut set, &mut oset); + + if tcsetpgrp(shell_tty, pgrp) < 0 { + r = -1; + e = errno!(); + } else { + terminal_pgrp = pgrp; + } + sigprocmask( + SIG_SETMASK as c_int, + &mut oset, + 0 as *mut sigset_t, + ); + } + if r == -1 { + errno!() = e; + } + return r; +} + +pub const ENOTTY:i32 = 25; + +unsafe extern "C" fn maybe_give_terminal_to(mut opgrp: pid_t, mut npgrp: pid_t, mut flags: c_int) -> c_int +{ + let mut tpgrp: c_int = 0; + + tpgrp = tcgetpgrp(shell_tty); + if tpgrp < 0 && errno!() == ENOTTY { + return -1; + } + if tpgrp == npgrp { + terminal_pgrp = npgrp; + return 0 ; + } else if tpgrp != opgrp { + return -1 + } else { + return give_terminal_to(npgrp, flags) + }; +} + + +#[no_mangle] +pub unsafe extern "C" fn delete_all_jobs(mut running_only: c_int) { + let mut i: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD (&mut set, &mut oset); + if js.j_jobslots != 0 { + js.j_previous = NO_JOB; + js.j_current = js.j_previous; + i = 0 ; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() + && (running_only == 0 + || running_only != 0 + && RUNNING!(i)) + { + delete_job(i, DEL_WARNSTOPPED as c_int | DEL_NOBGPID as c_int); + } + i += 1; + } + if running_only == 0 { + libc::free(jobs as *mut c_void); + + js.j_jobslots = 0 ; + js.j_njobs = 0 ; + js.j_lastj = js.j_njobs; + js.j_firstj = js.j_lastj; + } + } + if running_only == 0 { + bgp_clear(); + } + UNBLOCK_CHILD (&mut oset); +} + +#[no_mangle] +pub unsafe extern "C" fn nohup_all_jobs(mut running_only: c_int) { + let mut i: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD (&mut set, &mut oset); + if js.j_jobslots != 0 { + i = 0 ; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() + && (running_only == 0 || running_only != 0 && RUNNING!(i)) + { + nohup_job(i); + } + i += 1; + } + } + UNBLOCK_CHILD (&mut oset); +} + +#[no_mangle] +pub unsafe extern "C" fn count_all_jobs() -> c_int { + let mut i: c_int = 0; + let mut n: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + BLOCK_CHILD (&mut set, &mut oset); + n = 0 ; + i = n; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() + && DEADJOB!(i)as c_int == 0 as c_int + { + n += 1; + } + i += 1; + } + UNBLOCK_CHILD (&mut oset); + return n; +} + +unsafe extern "C" fn mark_all_jobs_as_dead() { + let mut i: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + if js.j_jobslots == 0 { + return; + } + BLOCK_CHILD (&mut set, &mut oset); + i = 0 ; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() { + (**jobs.offset(i as isize)).state = JDEAD; + js.j_ndead += 1; + } + i += 1; + } + UNBLOCK_CHILD (&mut oset); +} + + +unsafe extern "C" fn mark_dead_jobs_as_notified(mut force: c_int) { + let mut i: c_int = 0; + let mut ndead: c_int = 0; + let mut ndeadproc: c_int = 0; + let mut set: sigset_t = __sigset_t { __val: [0; 16] }; + let mut oset: sigset_t = __sigset_t { __val: [0; 16] }; + + if js.j_jobslots == 0 { + return; + } + BLOCK_CHILD (&mut set, &mut oset); + if force != 0 { + i = 0 ; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() + && DEADJOB!(i) + && (interactive_shell != 0 + || find_last_pid(i, 0 as c_int) != last_asynchronous_pid) + { + (**jobs.offset(i as isize)).flags |= J_NOTIFIED as c_int; + } + i += 1; + } + UNBLOCK_CHILD (&mut oset); + return; + } + ndeadproc = 0 ; + ndead = ndeadproc; + i = ndead; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() + && DEADJOB!(i) + { + ndead += 1; + ndeadproc += processes_in_job(i); + } + i += 1; + } + if js.c_childmax < 0 { + set_maxchild(0 ); + } + if ndeadproc as libc::c_long <= js.c_childmax { + UNBLOCK_CHILD (&mut oset); + return; + } + i = 0 ; + while i < js.j_jobslots { + if !(*jobs.offset(i as isize)).is_null() + && DEADJOB!(i) + && (interactive_shell != 0 + || find_last_pid(i, 0 as c_int) != last_asynchronous_pid) + { + ndeadproc -= processes_in_job(i); + if ndeadproc as libc::c_long <= js.c_childmax { + break; + } + (**jobs.offset(i as isize)).flags |= J_NOTIFIED as c_int; + } + i += 1; + } + UNBLOCK_CHILD (&mut oset); +} + +#[no_mangle] +pub unsafe extern "C" fn freeze_jobs_list() -> c_int { + let mut o: c_int = 0; + + o = jobs_list_frozen; + jobs_list_frozen = 1; + return o; +} + +#[no_mangle] +pub unsafe extern "C" fn unfreeze_jobs_list() { + jobs_list_frozen = 0; +} + +#[no_mangle] +pub unsafe extern "C" fn set_jobs_list_frozen(mut s: c_int) { + jobs_list_frozen = s; +} + +#[no_mangle] +pub unsafe extern "C" fn set_job_control(mut arg: c_int) -> c_int { + let mut old: c_int = 0; + + old = job_control; + job_control = arg; + + if terminal_pgrp ==NO_PID as c_int { + terminal_pgrp = tcgetpgrp(shell_tty); + } + if job_control != old && job_control != 0 { + shell_pgrp = getpgid(0); + } + running_in_background = (terminal_pgrp != shell_pgrp) as c_int; + + if job_control != old && job_control != 0 { + pipeline_pgrp = 0; + } + return old; +} + +#[no_mangle] +pub unsafe extern "C" fn without_job_control() { + stop_making_children(); + start_pipeline(); + sh_closepipe(pgrp_pipe.as_mut_ptr()); + delete_all_jobs(0 ); + set_job_control(0 ); +} +#[no_mangle] +pub unsafe extern "C" fn end_job_control() { + if job_control != 0 { + terminate_stopped_jobs(); + } + if original_pgrp >= 0 as c_int && terminal_pgrp != original_pgrp { + give_terminal_to(original_pgrp, 1 ); + } + if original_pgrp >= 0 + && setpgid(0 , original_pgrp) == 0 + { + shell_pgrp = original_pgrp; + } +} +#[no_mangle] +pub unsafe extern "C" fn restart_job_control() { + if shell_tty != -1 { + libc::close(shell_tty); + } + initialize_job_control(0 ); +} + +#[no_mangle] +pub unsafe extern "C" fn set_maxchild(mut nchild: c_int) { + static mut lmaxchild: c_int =-1; + + if lmaxchild < 0{ + errno!() = 0 ; + lmaxchild = getmaxchild() as c_int; + if lmaxchild < 0 && *__errno_location() == 0 { + lmaxchild = MAX_CHILD_MAX as c_int; + } + } + if lmaxchild < 0 { + lmaxchild = DEFAULT_CHILD_MAX as c_int; + } + if nchild < lmaxchild { + nchild = lmaxchild; + } else if nchild > MAX_CHILD_MAX as c_int { + nchild = MAX_CHILD_MAX as c_int; + } + js.c_childmax = nchild as libc::c_long; +} + +#[no_mangle] +pub unsafe extern "C" fn set_sigchld_handler() { + set_signal_handler( + SIGCHLD as c_int,sigchld_handler as *mut Option); +} + + +unsafe extern "C" fn pipe_read(mut pp: *mut c_int) { + let mut ch: c_char = 0; + + if *pp.offset(1 as isize) >= 0 { + libc::close(*pp.offset(1 as c_int as isize)); + *pp.offset(1 as isize) = -(1 as c_int); + } + if *pp.offset(0 as c_int as isize) >= 0 { + while libc::read( + *pp.offset(0 as c_int as isize), + &mut ch as *mut c_char as *mut libc::c_void, + 1 as c_int as size_t, + ) == -1 + && errno!() == EINTR as c_int + {} + } +} + + + +#[no_mangle] +pub unsafe extern "C" fn close_pgrp_pipe() { + sh_closepipe(pgrp_pipe.as_mut_ptr()); +} + + +#[no_mangle] +pub unsafe extern "C" fn save_pgrp_pipe(mut p: *mut c_int, mut clear: c_int,) +{ + *p.offset(0 as c_int as isize) = pgrp_pipe[0 as c_int as usize]; + *p.offset(1 as c_int as isize) = pgrp_pipe[1 as c_int as usize]; + if clear != 0 { + pgrp_pipe[1] = -1; + pgrp_pipe[0] = pgrp_pipe[1]; + } +} +#[no_mangle] +pub unsafe extern "C" fn restore_pgrp_pipe(mut p: *mut c_int) { + pgrp_pipe[0 ] = *p.offset(0 ); + pgrp_pipe[1 ] = *p.offset(1 as c_int as isize); +} + diff --git a/bash-5.1/r_print_cmd/src/lib.rs b/bash-5.1/r_print_cmd/src/lib.rs new file mode 100644 index 0000000000000000000000000000000000000000..7413f629ac5b03a48c5081b31678de558aaca6f8 --- /dev/null +++ b/bash-5.1/r_print_cmd/src/lib.rs @@ -0,0 +1,1799 @@ +use libc::{c_int,c_char,FILE, c_void, fprintf,fileno, strnlen, size_t}; +use std::ffi::{CString, CStr, }; + +use r_bash::*;extern "C"{ + static mut stdout: *mut FILE; + static mut stderr: *mut FILE; +} + +pub const FUNC_MULTILINE:i32 = 0x01; +pub const FUNC_EXTERNAL:i32 = 0x02; +pub static mut indentation:c_int = 0; +pub static mut indentation_amount:c_int = 4; +pub const PRINTED_COMMAND_INITIAL_SIZE:c_int = 64; +pub const PRINTED_COMMAND_CROW_SIZE:c_int = 128; +static mut inside_function_def:c_int = 0; +static mut skip_this_indent:c_int = 0; +static mut was_heredoc:c_int = 0; +static mut printing_connection:c_int = 0; +static mut deferred_heredocs:*mut REDIRECT = 0 as *mut REDIRECT; +static mut group_command_nesting:c_int = 0; +static mut indirection_string:*mut c_char = 0 as *mut c_char; +static mut indirection_stringsiz:c_int = 0; + +const MB_LEN_MAX:usize = 16; //在C端这是一个宏, +const MB_CUR_MAX:usize = 1; +const AND_AND:i32 = 288; +const OR_OR:i32 = 289; + +/* 宏定义 */ +#[macro_export] +macro_rules! CHECK_XTRACE_FP{ + () => ( + if !xtrace_fp.is_null(){ + xtrace_fp = xtrace_fp; + } + else{ + xtrace_fp = stderr; + } + ) +} + +#[macro_export] +macro_rules! EXPCHAR{ + ($c:expr) => ( + if $c == b'{' as c_char || $c == b'~' as c_char || $c == b'$' as c_char || $c == b'`' as c_char{ + 1 + } + else{ + 0 + } + ) +} + +#[macro_export] +macro_rules! PRINT_DEFERRED_HEREDOCS{ + ($x:expr) => ( + if !deferred_heredocs.is_null(){ + print_deferred_heredocs($x); + } + ) +} + +#[macro_export] +macro_rules! RESIZE_MALLOCED_BUFFER{ + ($str:expr, $cind:expr, $room:expr, $csize:expr, $simcr:expr) => ( + if $cind + $room >= $csize { + while $cind + $room >= $csize { + $csize = $csize + $simcr; + } + $str = libc::realloc($str as *mut c_void, $csize as usize ) as *mut c_char; + } + ) + +} + +pub fn MBLEN(s: *const c_char ,n:size_t) -> c_int +{ + if MB_CUR_MAX > 1 + { + return unsafe { mblen(s,n) }; + } + else { + return 1; + } +} + +unsafe fn DIGIT(c:c_char) -> bool{ + char::from(c as u8 ) >= '0' && char::from(c as u8) <= '9' +} + +//pub type Function = unsafe extern "C" fn() -> c_int; +pub type Function = ::std::option::Option ::std::os::raw::c_int>; + +extern "C" { + static indirection_level:c_int; + static posixly_correct:c_int; + static mut the_printed_command:*mut c_char; + static mut the_printed_command_size:c_int; + static mut command_string_index:c_int ; + + fn command_error(func:*const c_char, code:c_int, e:c_int, flags:c_int); + fn sh_validfd(fd:c_int)->c_int; + + //fn internal_error(format:*mut c_char, arg1:*mut c_char, arg2:*mut c_char)->c_int; + fn internal_error(format:*const c_char, _:...); + fn internal_warning(_:*const c_char, _:...); + fn get_string_value(_:*const c_char)->*mut c_char; + //fn change_flag(flag:c_int, on_or_off:c_int)->c_int; + fn decode_prompt_string(string:*mut c_char)->*mut c_char; + fn sh_contains_shell_metas(string:*const c_char)->c_int; + fn sh_single_quote(string:*mut c_char)->*mut c_char; + fn ansic_shouldquote(string:*const c_char)->c_int; + fn ansic_quote(str:*mut c_char, flags:c_int, rlen:*mut c_int)->*mut c_char; + fn dispose_redirects(list:*mut REDIRECT); + fn add_unwind_protect(cleanup:*mut Function, arg:*mut c_char); + + fn remove_unwind_protect(); + fn dispose_command(command:*mut COMMAND); + fn find_reserved_word(tokstr:*mut c_char)->c_int; + fn remove_quoted_escapes(string:*mut c_char)->*mut c_char; + fn mblen(s:*const c_char, n:size_t)->c_int; + fn cprintf(control:*const c_char,...); +} + +#[no_mangle] +pub unsafe extern "C" fn r_print_command(command:*mut COMMAND) +{ + let _str:*mut c_char; + command_string_index = 0; + print!("{}",CStr::from_ptr(r_make_command_string(command)).to_str().unwrap()); + +} + +#[no_mangle] +pub unsafe extern "C" fn r_make_command_string(command:*mut COMMAND) -> *mut c_char +{ + command_string_index = 0; + was_heredoc = 0; + deferred_heredocs = 0 as *mut REDIRECT; + make_command_string_internal(command); + the_printed_command + +} + +#[no_mangle] +unsafe fn make_command_string_internal(command:*mut COMMAND) +{ + let mut s:[c_char;3] = [0;3]; + + if command.is_null(){ + cprintf_1 (b"\0" as *const u8 as *const i8); + } + else + { + if skip_this_indent != 0 { + skip_this_indent = skip_this_indent - 1; + } + else{ + indent(indentation); + } + if (*command).flags != 0 && CMD_TIME_PIPELINE != 0{ + cprintf_1(b"time \0" as *const u8 as *const i8); + if (*command).flags != 0 && CMD_TIME_POSIX != 0{ + cprintf_1(b"-p \0" as *const u8 as *const i8); + } + } + if (*command).flags != 0 && CMD_INVERT_RETURN != 0{ + cprintf_1(b"! \0" as *const u8 as *const i8); + } + + // (*command).type_ = 11; + match (*command).type_ as libc::c_uint { + command_type_cm_for => print_for_command((*command).value.For), + command_type_cm_arith_for => print_arith_for_command((*command).value.ArithFor), + command_type_cm_select => print_select_command((*command).value.Select), + command_type_cm_case => print_case_command((*command).value.Case), + command_type_cm_while => print_while_command((*command).value.While), + command_type_cm_until => print_until_command((*command).value.While), + command_type_cm_if => print_if_command((*command).value.If), + command_type_cm_arith => r_print_arith_command((*(*command).value.Arith).exp), + command_type_cm_cond => r_print_cond_command((*command).value.Cond), + command_type_cm_simple => r_print_simple_command((*command).value.Simple), + command_type_cm_connection => { + skip_this_indent = skip_this_indent + 1; + printing_connection = printing_connection + 1; + make_command_string_internal((*(*command).value.Connection).first); + let _str_1 = b'&' as i32; + let _str_1 = b'|' as i32; + let _str_3 = b';' as i32; + match (*(*command).value.Connection).connector{ + 38 | 124 => { + let c:c_char = (*(*command).value.Connection).connector as c_char; + s[0] = ' ' as i32 as c_char; + s[1] = c; + s[2] = '\u{0}' as i32 as c_char; + print_deferred_heredocs(s.as_mut_ptr()); + if c as c_int != '&' as i32 || !((*(*command).value.Connection).second.is_null()) + { + cprintf_1(b" \0" as *const u8 as *const i8); + skip_this_indent = skip_this_indent + 1; + } + } + + AND_AND => { + print_deferred_heredocs(b" && \0" as *const u8 as *const c_char); + if !(*(*command).value.Connection).second.is_null() + { + skip_this_indent = skip_this_indent + 1; + } + } + + OR_OR => { + print_deferred_heredocs(b" || \0" as *const u8 as *const c_char); + if !(*(*command).value.Connection).second.is_null() { + skip_this_indent = skip_this_indent + 1; + } + } + + 59 => { + if deferred_heredocs.is_null() { + if was_heredoc == 0 + { + cprintf_1(b";\0" as *const u8 as *const c_char); + } + else{ + was_heredoc = 0; + } + } + + else{ + print_deferred_heredocs( + if inside_function_def != 0{ + b"\0" as *const u8 as *const c_char + } + else{ + b";\0" as *const u8 as *const c_char + }, + ) + } + + if inside_function_def != 0 { + cprintf_1(b"\n\0" as *const u8 as *const c_char); + } + + else{ + cprintf_1(b" \0" as *const u8 as *const c_char); + if !(*(*command).value.Connection).second.is_null() { + skip_this_indent = skip_this_indent + 1; + } + } + } + + _ => { + // cprintf_2( CString::new("print_command:bad connector").as_mut() as *const c_char, (*(*command).value.Connection).connector); + let mut str = format!("print_command:bas connector {}\0", (*(*command).value.Connection).connector); + cprintf_1(str.as_mut_ptr() as *mut c_char); + } + } + make_command_string_internal((*(*command).value.Connection).second); + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + printing_connection = printing_connection - 1; + } + command_type_cm_function_def => print_function_def((*command).value.Function_def), + command_type_cm_group => print_group_command((*command).value.Group), + command_type_cm_subshell =>{ + cprintf_1(b"( \0" as *const u8 as *const c_char); + skip_this_indent = skip_this_indent + 1; + make_command_string_internal((*(*command).value.Subshell).command); + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + cprintf_1(b" )\0" as *const u8 as *const c_char); + + } + + command_type_cm_coproc => { + let mut str = format!("coproc {}\0", CStr::from_ptr((*(*command).value.Coproc).name).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + skip_this_indent += 1; + make_command_string_internal((*(*command).value.Coproc).command); + } + + _ => { + // let c_str = CString::new("print_command").unwrap(); + // let c_str_ptr = c_str.as_ptr(); + command_error(b"print_command\0" as *const u8 as *const c_char, CMDERR_BADTYPE as i32, (*command).type_ as i32, 0 as i32); + } + } + + if !(*command).redirects.is_null() { + cprintf_1(b" \0" as *const u8 as *const c_char); + print_redirection_list((*command).redirects); + } + +} + +#[no_mangle] +pub unsafe extern "C" fn r_print_word_list(list:*mut WORD_LIST, separator:*mut c_char) +{ + let mut w:*mut WORD_LIST; + // let mut str:*mut c_char; + w = list; + + while !w.is_null() { + if !(*w).word.is_null(){ + print!("{}{}",CStr::from_ptr((*(*w).word).word).to_str().unwrap(),CStr::from_ptr(separator).to_str().unwrap()); + } + else { + print!("{}",CStr::from_ptr((*(*w).word).word).to_str().unwrap()); + } + + w = (*w).next; + } +} + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_set(fd:c_int, fp:*mut FILE) +{ + + if fd >= 0 && sh_validfd(fd) == 0 { + internal_error(b"xtrace_set: %d: invalid file descriptor\0" as *const u8 as *const c_char as *mut c_char, fd ); + return; + } + if fp.is_null() { + internal_error(b"xtrace_set: NULL file pointer\0" as *const u8 as *const c_char); + return; + } + if fd >= 0 && fileno(fp) != fd { + internal_warning(b"xtrace fd (%d) != fileno xtrace fp (%d)\0" as *const u8 as *const c_char as *mut c_char, fd, fileno(fp)); + } + + xtrace_fd = fd; + xtrace_fp = fp; +} + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_init() +{ + r_xtrace_set(-1, stderr); +} + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_reset() +{ + if xtrace_fd >= 0 && !xtrace_fp.is_null(){ + libc::fflush(xtrace_fp); + libc::fclose(xtrace_fp); + } + else if xtrace_fd >= 0{ + libc::close(xtrace_fd); + } + xtrace_fd = -1; + xtrace_fp = stderr; +} + + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_fdchk(fd:c_int) +{ + if fd == xtrace_fd{ + r_xtrace_reset(); + } +} + +#[no_mangle] +pub unsafe extern "C" fn r_indirection_level_string()->*mut c_char +{ + + let mut i:c_int; + let mut j:c_int; + let mut ps4:*mut c_char; + let mut ps4_firstc:[c_char;MB_LEN_MAX+1] = [0;MB_LEN_MAX+1]; + let ps4_firstc_len:c_int; + let ps4_len:c_int; + let ineed:c_int; + let old:c_int; + + ps4 = get_string_value(b"PS4\0" as *const u8 as *const c_char); + + if indirection_string.is_null(){ + indirection_stringsiz = 100 ; + indirection_string = libc::malloc(100) as *mut c_char; + } + + *indirection_string.offset(0 as isize) = '\u{0}' as i32 as c_char; + + if ps4.is_null() || *ps4 as c_int == '\u{0}' as i32{ + return indirection_string; + } + + ps4_len = strnlen(ps4 as *const c_char , MB_CUR_MAX) as c_int; + ps4_firstc_len = MBLEN(ps4, ps4_len as size_t); + + if ps4_firstc_len == 1 || ps4_firstc_len == 0 || ps4_firstc_len < 0 + { + ps4_firstc[0] = *ps4.offset(0 as isize); + ps4_firstc[1] = '\u{0}' as i32 as c_char; + } + + else + { + libc::memcpy(ps4_firstc.as_mut_ptr() as *mut c_void, ps4 as *const c_void , ps4_firstc_len as usize); + } + + ineed = ((ps4_firstc_len * indirection_level) as libc::c_ulong).wrapping_add(libc::strlen(ps4).try_into().unwrap()) as c_int; + + if ineed > indirection_stringsiz - 1{ + indirection_stringsiz = ineed + 1; + indirection_string = libc::realloc(indirection_string as *mut c_void, indirection_stringsiz as size_t) as *mut c_char; + } + + i = 0; + j = 0; + + while j < indirection_level && (i < indirection_stringsiz - 1) { + if ps4_firstc_len == 1{ + *indirection_string.offset(i as isize) = ps4_firstc[0]; + } + else{ + libc::memcpy(indirection_string.offset(i as isize) as *mut c_void, ps4_firstc.as_mut_ptr() as *const c_void, ps4_firstc_len as usize); + } + i += ps4_firstc_len; + j += 1; + } + j = ps4_firstc_len; + while *ps4 as c_int != 0 && *ps4.offset(j as isize) != 0 && (i < indirection_stringsiz -1 ) { + *indirection_string.offset(i as isize) = *ps4.offset(j as isize); + i += 1; + j += 1; + } + + *indirection_string.offset(i as isize) = '\u{0}' as i32 as c_char; + libc::free(ps4 as *mut libc::c_void); + return indirection_string; + +} + + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_print_word_list(list:*mut WORD_LIST, xtflags: c_int) +{ + + let mut w:*mut WORD_LIST; + let mut t:*mut c_char; + let mut x:*mut c_char; + + CHECK_XTRACE_FP!(); + + + if (xtflags & 1) != 0 + { + fprintf(xtrace_fp, CString::new("%s").unwrap().as_ptr(), r_indirection_level_string()); + } + + w = list; + while !w.is_null() + { + + t = (*(*w).word).word; + + if t.is_null() || *t as c_int == '\u{0}' as i32 + { + fprintf(xtrace_fp, CString::new("''%s").unwrap().as_ptr(), + if !((*w).next).is_null(){ + b" \0" as *const u8 as *const c_char + }else{ + b"\0" as *const u8 as *const c_char + }, + ); + } + + else if (xtflags & 2) != 0 + { + fprintf(xtrace_fp, CString::new("%s%s").unwrap().as_ptr(),t, + if !((*w).next).is_null(){ + b" \0" as *const u8 as *const c_char + }else{ + b"\0" as *const u8 as *const c_char + }, + ); + } + + else if sh_contains_shell_metas(t) != 0 + { + + x = sh_single_quote(t); + fprintf(xtrace_fp,CString::new("%s%s").unwrap().as_ptr(),x, + if !((*w).next).is_null(){ + b" \0" as *const u8 as *const c_char + }else{ + b"\0" as *const u8 as *const c_char + }, + ); + libc::free(x as *mut c_void); + } + + else if ansic_shouldquote(t) != 0 + { + x = ansic_quote(t,0,0 as *mut c_int); + fprintf(xtrace_fp, CString::new("%s%s").unwrap().as_ptr(), x, + if !((*w).next).is_null(){ + b" \0" as *const u8 as *const c_char + }else{ + b"\0" as *const u8 as *const c_char + }, + ); + libc::free(x as *mut c_void); + } + + else + { + fprintf(xtrace_fp, CString::new("%s%s").unwrap().as_ptr(), t, + if !((*w).next).is_null(){ + b" \0" as *const u8 as *const c_char + }else{ + b"\0" as *const u8 as *const c_char + }, + ); + } + } +} + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_print_assignment(name:*mut c_char, value:*mut c_char, assign_list:c_int,xflags:c_int) +{ + let nval:*mut c_char; + + CHECK_XTRACE_FP!(); + + if xflags != 0{ + fprintf(xtrace_fp, CString::new("%s \0").unwrap().as_ptr(), r_indirection_level_string()); + } + + if *value as c_int == '\u{0}' as i32 || assign_list != 0 + { + nval = value; + } + else if sh_contains_shell_metas(value) != 0 + { + nval = sh_single_quote(value); + } + else if ansic_shouldquote(value) != 0 + { + nval = ansic_quote(value, 0, 0 as *mut c_int); + } + else + { + nval = value; + } + + if assign_list != 0 + { + fprintf(xtrace_fp, CString::new("%s=(%s)\n").unwrap().as_ptr(), name, nval); + } + else + { + fprintf(xtrace_fp, CString::new("%s=%s\n").unwrap().as_ptr(), name, nval); + } + + if nval != value { + if !nval.is_null() { + libc::free(nval as *mut c_void); + } + } + + libc::fflush(xtrace_fp); +} + + +#[no_mangle] +pub unsafe extern "C" fn command_print_word_list(list:*mut WORD_LIST, separator:*mut c_char) +{ + //_print_word_list(list,separator,cprintf); + let mut w:*mut WORD_LIST; + w = list; + + while !w.is_null() + { + if !(*w).next.is_null() + { + let mut str = format!("{}{}\0",CStr::from_ptr((*(*w).word).word).to_str().unwrap(),CStr::from_ptr(separator).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + } + else + { + let mut str = format!("{}\0",CStr::from_ptr((*(*w).word).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + } + + w = (*w).next; + + } +} + + +// 有个cprintf函数 +#[no_mangle] + +pub unsafe extern "C" fn r_print_for_command_head(for_command:*mut FOR_COM) +{ + println!("r_print_for_command_head"); + let mut str = format!("for {} in ", CStr::from_ptr((*(*for_command).name).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + command_print_word_list((*for_command).map_list, b" " as *const u8 as *mut c_char); +} + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_print_for_command_head(for_command:*mut FOR_COM) +{ + + println!("r_xtrace_print_for_command_head"); + CHECK_XTRACE_FP!(); + fprintf(xtrace_fp, CString::new("%s").unwrap().as_ptr(), r_indirection_level_string()); + fprintf(xtrace_fp,CString::new("for %s in ").unwrap().as_ptr(),(*(*for_command).name).word); + r_xtrace_print_word_list((*for_command).map_list,2); + +} + +#[no_mangle] +pub unsafe extern "C" fn print_for_command(for_command:*mut FOR_COM) +{ + r_print_for_command_head(for_command); + cprintf_1(b";\0" as *const u8 as *const i8); + newline(b"do\n" as *const u8 as *const c_char as *mut c_char); + indentation += indentation_amount; + make_command_string_internal((*for_command).action); + + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *mut c_char); + semicolon(); + + indentation -= indentation_amount; + newline(b"done\0" as *const u8 as *const c_char as *mut c_char); + +} + +#[no_mangle] +pub unsafe extern "C" fn print_arith_for_command(arith_for_command:*mut ARITH_FOR_COM) +{ + + cprintf_1(b"for ((\0" as *const u8 as *const i8 ); + command_print_word_list((*arith_for_command).init, b" \0" as *const u8 as *const c_char as *mut c_char); + cprintf_1(b"; \0" as *const u8 as *const i8); + command_print_word_list((*arith_for_command).test, b" \0" as *const u8 as *const c_char as *mut c_char); + cprintf_1(b"; \0" as *const u8 as *const i8); + command_print_word_list((*arith_for_command).step, b" \0" as *const u8 as *const c_char as *mut c_char); + cprintf_1(b"))\0" as *const u8 as *const i8); + newline(b"do\n\0" as *const u8 as *const c_char as *mut c_char); + + indentation += indentation_amount; + make_command_string_internal((*arith_for_command).action); + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + semicolon(); + indentation -= indentation_amount; + newline(b"done\0" as *const u8 as *const c_char as *mut c_char); + +} + +#[no_mangle] +pub unsafe extern "C" fn r_print_select_command_head(select_command:*mut SELECT_COM) +{ + + let mut str = format!("select {} in \0", CStr::from_ptr((*(*select_command).name).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + command_print_word_list((*select_command).map_list, b" \0" as *const u8 as *const c_char as *mut c_char); + +} + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_print_select_command_head(select_command:*mut SELECT_COM) +{ + + println!("r_xtrace_print_select_command_head"); + CHECK_XTRACE_FP!(); + fprintf(xtrace_fp, CString::new("%s").unwrap().as_ptr(),r_indirection_level_string()); + fprintf(xtrace_fp, CString::new("select %s in ").unwrap().as_ptr(),(*(*select_command).name).word); + r_xtrace_print_word_list((*select_command).map_list, 2); + +} + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_print_select_command_head(select_command:*mut SELECT_COM) +{ + + println!("r_xtrace_print_select_command_head"); + CHECK_XTRACE_FP!(); + fprintf(xtrace_fp, CString::new("%s").unwrap().as_ptr(),r_indirection_level_string()); + fprintf(xtrace_fp, CString::new("select %s in ").unwrap().as_ptr(),(*(*select_command).name).word); + r_xtrace_print_word_list((*select_command).map_list, 2); + +} + +#[no_mangle] +pub unsafe extern "C" fn print_select_command(select_command:*mut SELECT_COM) +{ + r_print_select_command_head(select_command); + cprintf_1(b";\0" as *const u8 as *const i8); + newline(b"do\n\0" as *const u8 as *const c_char as *mut c_char); + indentation += indentation_amount; + make_command_string_internal((*select_command).action); + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + semicolon(); + indentation -= indentation_amount; + newline(b"done\0" as *const u8 as *const c_char as *mut c_char); +} + +#[no_mangle] +pub unsafe extern "C" fn print_group_command(group_command:*mut GROUP_COM) +{ + group_command_nesting += 1; + cprintf_1(b"{{ \0" as *const u8 as *const i8); + if inside_function_def == 0{ + skip_this_indent += 1; + } + else { + cprintf_1(b"\n\0" as *const u8 as *const i8); + indentation += indentation_amount; + } + make_command_string_internal((*group_command).command); + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + if inside_function_def != 0{ + cprintf_1(b"\n\0" as *const u8 as *const i8); + indentation -= indentation_amount; + indent(indentation); + } + else{ + semicolon(); + cprintf_1(b" \0" as *const u8 as *const i8); + } + cprintf_1(b"}\0" as *const u8 as *const i8); + group_command_nesting -= 1; + +} + + +#[no_mangle] +pub unsafe extern "C" fn r_print_case_command_head(case_command:*mut CASE_COM) +{ + let mut str = format!("case {} in \0", CStr::from_ptr((*(*case_command).word).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); +} + + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_print_case_command_head(case_command:*mut CASE_COM) +{ + + println!("r_xtrace_print_case_command_head"); + CHECK_XTRACE_FP!(); + fprintf(xtrace_fp, CString::new("%s").unwrap().as_ptr(), r_indirection_level_string()); + fprintf(xtrace_fp,CString::new("case %s in\n").unwrap().as_ptr(), (*(*case_command).word).word); + +} + +#[no_mangle] +pub unsafe extern "C" fn print_case_command(case_command:*mut CASE_COM) +{ + r_print_case_command_head(case_command); + if !(*case_command).clauses.is_null() + { + print_case_clauses((*case_command).clauses); + } + newline(b"esac\0" as *const u8 as *const c_char as *mut c_char); +} + +#[no_mangle] +pub unsafe extern "C" fn print_case_clauses(mut clauses:*mut PATTERN_LIST) +{ + indentation += indentation_amount; + + while !clauses.is_null() + { + + newline(b"\0" as *const u8 as *const c_char as *mut c_char); + command_print_word_list((*clauses).patterns, CString::new(" | ").unwrap().as_ptr() as *mut c_char); + cprintf_1(b")\n\0" as *const u8 as *const i8); + indentation += indentation_amount; + make_command_string_internal((*clauses).action); + indentation -= indentation_amount; + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + + if (*clauses).flags & CASEPAT_FALLTHROUGH as i32 != 0{ + newline(b";&\0" as *const u8 as *const c_char as *mut c_char); + } + else if (*clauses).flags & CASEPAT_TESTNEXT as i32 != 0{ + newline(b";;&\0" as *const u8 as *const c_char as *mut c_char); + } + else { + newline(b";;\0" as *const u8 as *const c_char as *mut c_char); + } + + clauses = (*clauses).next; + + } + + indentation -= indentation_amount; + +} + + +#[no_mangle] +pub unsafe extern "C" fn print_while_command(while_command:*mut WHILE_COM) +{ + print_until_or_while(while_command, CString::new("while").unwrap().as_ptr() as *mut c_char); +} + + +#[no_mangle] +pub unsafe extern "C" fn print_until_command(while_command:*mut WHILE_COM) +{ + print_until_or_while(while_command,CString::new("until").unwrap().as_ptr() as *mut c_char); +} + +#[no_mangle] +pub unsafe extern "C" fn print_until_or_while(while_command:*mut WHILE_COM, which:*mut c_char) +{ + let mut str = format!("{}\0",CStr::from_ptr(which).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + + skip_this_indent += 1; + make_command_string_internal((*while_command).test); + semicolon(); + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + cprintf_1(b"do\n\0" as *const u8 as *const i8); + indentation += indentation_amount; + make_command_string_internal((*while_command).action); + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + indentation -= indentation_amount; + semicolon(); + newline(b"done\0" as *const u8 as *const c_char as *mut c_char); +} + +#[no_mangle] +pub unsafe extern "C" fn print_if_command(if_command:*mut IF_COM) +{ + + cprintf_1(b"if \0" as *const u8 as *const i8); + skip_this_indent += 1; + make_command_string_internal((*if_command).test); + semicolon(); + cprintf_1(b" then\n\0" as *const u8 as *const i8); + indentation += indentation_amount; + make_command_string_internal((*if_command).true_case); + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + indentation -= indentation_amount; + + if !(*if_command).false_case.is_null() + { + semicolon(); + newline(b"else\n\0" as *const u8 as *const c_char as *mut c_char); + indentation += indentation_amount; + make_command_string_internal((*if_command).false_case); + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + indentation -= indentation_amount; + } + + semicolon(); + newline(b"fi\0" as *const u8 as *const c_char as *mut c_char ); +} + +#[no_mangle] +pub unsafe extern "C" fn r_print_arith_command(arith_cmd_list:*mut WORD_LIST) +{ + cprintf_1(b"((\0" as *const u8 as *const i8); + command_print_word_list(arith_cmd_list, CString::new(" ").unwrap().as_ptr() as *mut c_char); + cprintf_1(b"))\0" as *const u8 as *const i8); +} + +#[no_mangle] +pub unsafe extern "C" fn print_cond_node(cond:*mut COND_COM) +{ + if (*cond).flags & CMD_INVERT_RETURN as i32 != 0 + { + cprintf_1(b"! \0" as *const u8 as *const i8); + } + + if (*cond).type_ == COND_EXPR as i32{ + cprintf_1(b"( \0" as *const u8 as *const i8); + print_cond_node((*cond).left); + cprintf_1(b" )\0" as *const u8 as *const i8); + } + else if (*cond).type_ == COND_AND as i32 + { + print_cond_node((*cond).left); + cprintf_1(b" && \0" as *const u8 as *const i8); + print_cond_node((*cond).right); + } + else if (*cond).type_ == COND_OR as i32 + { + print_cond_node((*cond).left); + cprintf_1(b" || \0" as *const u8 as *const i8); + print_cond_node((*cond).right); + } + else if (*cond).type_ == COND_UNARY as i32 + { + cprintf_1((*(*cond).op).word); + cprintf_1(b" \0" as *const u8 as *const i8); + print_cond_node((*cond).left); + } + else if (*cond).type_ == COND_BINARY as i32 + { + print_cond_node((*cond).left); + cprintf_1(b" \0" as *const u8 as *const i8); + cprintf_1((*(*cond).op).word); + cprintf_1(b" \0" as *const u8 as *const i8); + print_cond_node((*cond).right); + } + else if(*cond).type_ == COND_TERM as i32 + { + cprintf_1((*(*cond).op).word); + } +} + +#[no_mangle] +pub unsafe extern "C" fn r_print_cond_command(cond:*mut COND_COM) +{ + println!("r_print_cond_command"); + cprintf_1(b"[[ \0" as *const u8 as *const i8); + print_cond_node(cond); + cprintf_1(b" ]]\0" as *const u8 as *const i8); +} + +/ifdef debug中没有内容 +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_print_cond_term(type_0:c_int, invert:c_int, op:*mut WORD_DESC, arg1:*mut c_char, arg2:*mut c_char) +{ + println!("r_xtrace_print_cond_term"); + CHECK_XTRACE_FP!(); + command_string_index = 0; + fprintf(xtrace_fp, CString::new("%s").unwrap().as_ptr(), r_indirection_level_string()); + fprintf(xtrace_fp, CString::new("[[ ").unwrap().as_ptr()); + + if invert != 0 + { + fprintf(xtrace_fp, CString::new("! ").unwrap().as_ptr()); + } + if type_0 == COND_UNARY as i32 + { + let str:*mut c_char; + if !arg1.is_null() && *arg1 as c_int != 0 + { + str = arg1; + } + else{ + str = CString::new("''").unwrap().as_ptr() as *mut c_char; + } + fprintf(xtrace_fp, CString::new("%s ").unwrap().as_ptr(), (*op).word); + fprintf(xtrace_fp, CString::new("%s ").unwrap().as_ptr(), str); + } + + else if type_0 == COND_BINARY as i32 + { + let str1:*mut c_char; + let str2:*mut c_char; + if !arg1.is_null() && *arg1 as c_int != 0 + { + str1 = arg1; + } + else{ + str1 = CString::new("''").unwrap().as_ptr() as *mut c_char; + } + if !arg2.is_null() && *arg2 as c_int != 0 + { + str2 = arg2; + } + else{ + str2 = CString::new("''").unwrap().as_ptr() as *mut c_char; + } + fprintf(xtrace_fp, CString::new("%s ").unwrap().as_ptr(), str1); + fprintf(xtrace_fp, CString::new("%s ").unwrap().as_ptr(), (*op).word); + fprintf(xtrace_fp, CString::new("%s ").unwrap().as_ptr(), str2); + } + + else if type_0 == COND_BINARY as i32 + { + let str1:*mut c_char; + let str2:*mut c_char; + if !arg1.is_null() && *arg1 as c_int != 0 + { + str1 = arg1; + } + else{ + str1 = CString::new("''").unwrap().as_ptr() as *mut c_char; + } + if !arg2.is_null() && *arg2 as c_int != 0 + { + str2 = arg2; + } + else{ + str2 = CString::new("''").unwrap().as_ptr() as *mut c_char; + } + fprintf(xtrace_fp, CString::new("%s ").unwrap().as_ptr(), str1); + fprintf(xtrace_fp, CString::new("%s ").unwrap().as_ptr(), (*op).word); + fprintf(xtrace_fp, CString::new("%s ").unwrap().as_ptr(), str2); + } + + + fprintf(xtrace_fp, CString::new(" ]]\n").unwrap().as_ptr()); + libc::fflush(xtrace_fp); + +} + + +#[no_mangle] +pub unsafe extern "C" fn r_xtrace_print_arith_cmd(list:*mut WORD_LIST) +{ + let mut w:*mut WORD_LIST; + + CHECK_XTRACE_FP!(); + fprintf(xtrace_fp, CString::new("%s").unwrap().as_ptr(), r_indirection_level_string()); + fprintf(xtrace_fp, CString::new("(( ").unwrap().as_ptr()); + w = list; + while !w.is_null() + { + let str:*const c_char; + + if !((*w).next).is_null() + { + str = b" \0" as *const u8 as *const c_char; + } + else{ + str = b"\0" as *const u8 as *const c_char; + } + + str = b" \0" as *const u8 as *const c_char; + fprintf(xtrace_fp, CString::new("%s%s").unwrap().as_ptr(), (*(*w).word).word, str); + w = (*w).next; + } + + fprintf(xtrace_fp, CString::new(" ))\n").unwrap().as_ptr()); + libc::fflush(xtrace_fp); +} + +#[no_mangle] +pub unsafe extern "C" fn r_print_simple_command(simple_command:*mut SIMPLE_COM) +{ + command_print_word_list((*simple_command).words, b" \0" as *const u8 as *const i8 as *mut i8); + if !(*simple_command).redirects.is_null() + { + cprintf_1(b" \0" as *const u8 as *const i8); + print_redirection_list((*simple_command).redirects); + } +} + +#[no_mangle] +pub unsafe extern "C" fn print_heredocs(heredocs:*mut REDIRECT) +{ + let mut hdtail:*mut REDIRECT; + cprintf_1(b" \0" as *const u8 as *const i8); + hdtail = heredocs; + while !hdtail.is_null() + { + print_redirection(hdtail); + cprintf_1(b"\n\0" as *const u8 as *const i8); + hdtail = (*hdtail).next; + } + was_heredoc = 1; +} + + +#[no_mangle] +pub unsafe extern "C" fn print_heredoc_bodies(heredocs:*mut REDIRECT) +{ + let mut hdtail:*mut REDIRECT; + cprintf_1(b"\n\0" as *const u8 as *const i8); + hdtail = heredocs; + while !hdtail.is_null() + { + print_heredoc_body(hdtail); + cprintf_1(b"\n\0" as *const u8 as *const i8); + hdtail = (*hdtail).next; + } + was_heredoc = 1; +} + + +#[no_mangle] +pub unsafe extern "C" fn print_deferred_heredocs(cstring:*const c_char) +{ + if !cstring.is_null() && *cstring.offset(0) != 0 && (*cstring.offset(0) != ';' as i8|| *cstring.offset(1) != 0) + { + cprintf_1( cstring as *const i8); + } + if !deferred_heredocs.is_null() + { + print_heredoc_bodies(deferred_heredocs); + if !cstring.is_null() && *cstring.offset(0) != 0 && (*cstring.offset(0) != ';' as i8|| *cstring.offset(1) != 0) + { + cprintf_1(b" \0" as *const u8 as *const i8); + } + dispose_redirects(deferred_heredocs); + was_heredoc = 1; + } + deferred_heredocs = std::ptr::null_mut() as *mut REDIRECT; +} + +#[no_mangle] +pub unsafe extern "C" fn print_redirection_list(mut redirects:*mut REDIRECT) +{ + // println!("print_redirection_list"); + let mut heredocs:*mut REDIRECT; + let mut hdtail:*mut REDIRECT; + let mut newredir:*mut REDIRECT; + let mut rw:*mut c_char; + heredocs = std::ptr::null_mut(); + hdtail = heredocs; + + was_heredoc = 0; + + while !redirects.is_null() + { + if (*redirects).instruction == r_instruction_r_reading_until || (*redirects).instruction == r_instruction_r_deblank_reading_until + { + newredir = copy_redirect(redirects); + (*newredir).next = std::ptr::null_mut(); + print_heredoc_header(newredir); + if !heredocs.is_null() + { + (*hdtail).next = newredir; + hdtail = newredir; + } + else{ + hdtail = newredir; + heredocs = newredir; + } + } + + else if (*redirects).instruction == r_instruction_r_duplicating_output_word && ((*redirects).flags & REDIR_VARASSIGN as i32) == 0 && (*redirects).redirector.dest == 1 + { + rw = (*(*redirects).redirectee.filename).word; + if !rw.is_null() && *rw as c_int != '-' as i32 && DIGIT(*rw) == false && EXPCHAR!(*rw) == 0 + { + (*redirects).instruction = r_instruction_r_err_and_out; + } + print_redirection(redirects); + (*redirects).instruction = r_instruction_r_duplicating_output_word; + } + else{ + print_redirection(redirects); + } + redirects = (*redirects).next; + + if !redirects.is_null() + { + cprintf_1(b" \0" as *const u8 as *const i8); + } + } + + if !heredocs.is_null() && printing_connection != 0 + { + deferred_heredocs = heredocs; + } + else if !heredocs.is_null() { + print_heredoc_bodies(heredocs); + dispose_redirects(heredocs); + } + +} + + +#[no_mangle] +pub unsafe extern "C" fn print_heredoc_header(redirect:*mut REDIRECT) +{ + let kill_leading:c_int; + let x:*mut c_char; + kill_leading = (r_instruction_r_deblank_reading_until == (*redirect).instruction) as c_int; + + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0 + { + cprintf_1( (*(*redirect).redirector.filename).word); + } + else if (*redirect).redirector.dest != 0 + { + let mut str = format!("{}\0",(*redirect).redirector.dest); + cprintf_1(str.as_mut_ptr() as *mut c_char) + } + + if (*(*redirect).redirectee.filename).flags & W_QUOTED as i32 !=0 + { + x = sh_single_quote((*redirect).here_doc_eof); + let str1 = if kill_leading !=0 { + "-" + } + else{ + "" + }; + let str2 = "<<"; + let str3 = CStr::from_ptr(x).to_str().unwrap(); + let mut str = format!("{}{}{}\0",str2,str1,str3); + cprintf_1(str.as_mut_ptr() as *mut c_char); + libc::free(x as *mut c_void); + } + else{ + let str1 = if kill_leading !=0 { + "-" + } + else{ + "" + }; + let str2 = "<<"; + let str3 = CStr::from_ptr((*redirect).here_doc_eof).to_str().unwrap(); + let mut str = format!("{}{}{}\0",str2,str1,str3); + cprintf_1(str.as_mut_ptr() as *mut c_char); + } +} + +#[no_mangle] +pub unsafe extern "C" fn print_heredoc_body(redirect:*mut REDIRECT) +{ + let mut str = format!("{}{}\0", CStr::from_ptr((*(*redirect).redirectee.filename).word).to_str().unwrap(), + CStr::from_ptr((*redirect).here_doc_eof).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); +} + + +#[no_mangle] +pub unsafe extern "C" fn print_redirection(redirect:*mut REDIRECT) +{ + let redirector:c_int; + let redir_fd:c_int; + let redirectee:*mut WORD_DESC; + let redir_word:*mut WORD_DESC; + + redirectee = (*redirect).redirectee.filename; + redir_fd = (*redirect).redirectee.dest; + redir_word = (*redirect).redirector.filename; + redirector = (*redirect).redirector.dest; + + match (*redirect).instruction { + + r_instruction_r_input_direction => + { + if (*redirect).flags & REDIR_VARASSIGN as i32 != 0{ + cprintf_1( (*redir_word).word); + } + else if !redirect.is_null() + { + cprintf_1(redirector as *mut c_char); + } + let mut str = format!("< {}\0",CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + } + + r_instruction_r_output_direction => + { + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0 + { + cprintf_1((*redir_word).word); + } + else if redirector != 1 + { + cprintf_1(redirector as *mut c_char); + } + let mut str = format!("< {}\0",CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + } + + r_instruction_r_inputa_direction => + { + let mut str = format!("&\0"); + cprintf_1(str.as_mut_ptr() as *mut c_char); + } + + r_instruction_r_output_force => + { + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0 + { + cprintf_1((*redir_word).word); + } + else if redirector != 1 + { + cprintf_1(redirector as *mut c_char); + } + let mut str = format!(">| {}\0", CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + //cprintf_2(">| {}", *(*redirectee).word); + } + + r_instruction_r_appending_to => { + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0{ + cprintf_1((*redir_word).word); + } + else if redirector != 1{ + cprintf_1(redirector as *mut c_char); + } + let mut str = format!(">> {}\0", CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_2(">> {}", *(*redirectee).word); + } + + r_instruction_r_input_output =>{ + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0{ + cprintf_1((*redir_word).word); + } + else if redirector != 1{ + cprintf_1( redirector as *mut c_char); + } + let mut str = format!("<> {}\0", CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("<> {}", *(*redirectee).word); + } + + r_instruction_r_deblank_reading_until | r_instruction_r_reading_until =>{ + print_heredoc_header(redirect); + cprintf_1(b"\n\0" as *const u8 as *const i8); + print_heredoc_body(redirect); + } + + r_instruction_r_reading_string =>{ + if (*redirect).rflags & REDIR_VARASSIGN as i32 !=0 { + cprintf_1((*redir_word).word); + } + else if redirector != 0{ + cprintf_1(redirector as *const c_char); + } + let mut str = format!("<<< {}\0", CStr::from_ptr((*(*redirect).redirectee.filename).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("<<< {}", *(*(*redirect).redirectee.filename).word); + } + + r_instruction_r_duplicating_input =>{ + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0{ + let mut str = format!("{{{}}}<&{}\0", CStr::from_ptr((*redir_word).word).to_str().unwrap(),redir_fd); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{}<&{}", *(*redir_word).word, redir_fd); + } + else{ + let mut str = format!("{}<&{}\0", redirector,redir_fd); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{}<&{}",redirector, redir_fd); + } + } + + r_instruction_r_duplicating_output => { + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0{ + let mut str = format!("{{ {} }}>&{}\0", CStr::from_ptr((*redir_word).word).to_str().unwrap(),redir_fd); + cprintf_1(str.as_mut_ptr() as *mut c_char); + //cprintf_1("{{ {} }}>&{}", *(*redir_word).word, redir_fd); + } + else{ + let mut str = format!("{}>&{}\0", redirector,redir_fd); + cprintf_1(str.as_mut_ptr() as *mut c_char); + //cprintf_1("{}>&{}",redirector, redir_fd); + } + } + + r_instruction_r_duplicating_input_word =>{ + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0 { + let mut str = format!("{{ {} }}<&{}\0", CStr::from_ptr((*redir_word).word).to_str().unwrap(),CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + //cprintf_1("{{ {} }}<&{}", *(*redir_word).word, *(*redirectee).word); + } + else{ + let mut str = format!("{}<&{}\0", redirector,CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + //cprintf_1("{}<&{}",redirector, *(*redirectee).word); + } + } + + r_instruction_r_duplicating_output_word =>{ + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0{ + let mut str = format!("{{ {} }}>&{}\0", CStr::from_ptr((*redir_word).word).to_str().unwrap(),CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{{ {} }}>&{}", *(*redir_word).word, *(*redirectee).word); + } + else{ + let mut str = format!("{}>&{}\0", redirector,CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{}>&{}",redirector, *(*redirectee).word); + } + } + + r_instruction_r_move_input => { + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0{ + let mut str = format!("{{ {} }}<&{}-\0", CStr::from_ptr((*redir_word).word).to_str().unwrap(),redir_fd); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{{ {} }}<&{}-", *(*redir_word).word, redir_fd); + } + else{ + let mut str = format!("{}<&{}-\0", redirector,redir_fd); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{}<&{}-",redirector, redir_fd); + } + } + + r_instruction_r_move_output => { + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0{ + let mut str = format!("{{ {} }}>&{}-\0", CStr::from_ptr((*redir_word).word).to_str().unwrap(),redir_fd); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{{ {} }}>&{}-", *(*redir_word).word, redir_fd); + } + else{ + let mut str = format!("{}>&{}-\0", redirector,redir_fd); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{}>&{}-",redirector, redir_fd); + } + } + + r_instruction_r_move_input_word => { + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0{ + let mut str = format!("{{ {} }}<&{}-\0", CStr::from_ptr((*redir_word).word).to_str().unwrap(),CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + //cprintf_1("{{ {} }}<&{}-", *(*redir_word).word, *(*redirectee).word); + } + else{ + let mut str = format!("{}<&{}-\0", redirector,CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{}<&{}-",redirector, *(*redirectee).word); + } + } + + r_instruction_r_move_output_word =>{ + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0{ + let mut str = format!("{{ {} }}>&{}-\0", CStr::from_ptr((*redir_word).word).to_str().unwrap(),CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{{ {} }}>&{}-", *(*redir_word).word, *(*redirectee).word); + } + else{ + let mut str = format!("{}>&{}-\0", redirector,CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{}>&{}-",redirector, *(*redirectee).word); + } + } + + r_instruction_r_close_this =>{ + if (*redirect).rflags & REDIR_VARASSIGN as i32 != 0{ + let mut str = format!("{{ {} }}>&-\0", CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{{ {} }}>&-", *(*redir_word).word); + } + else{ + let mut str = format!("{}>&-\0", redirector); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("{}>&-",redirector); + } + } + r_instruction_r_err_and_out =>{ + let mut str = format!("&> {}\0", CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("&> {}", *(*redirectee).word); + } + + r_instruction_r_append_err_and_out =>{ + let mut str = format!("&>> {}\0", CStr::from_ptr((*redirectee).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + // cprintf_1("&>> {}", *(*redirectee).word); + } + + _ =>{} + + } + +} + + +#[no_mangle] +pub unsafe extern "C" fn reset_locals() +{ + inside_function_def = 0; + indentation = 0; + printing_connection = 0; + deferred_heredocs = 0 as *mut REDIRECT; +} + + +#[no_mangle] +pub unsafe extern "C" fn print_function_def(func: *mut FUNCTION_DEF) +{ + let mut cmdcopy: *mut COMMAND; + let mut func_redirects:*mut REDIRECT; + func_redirects = std::ptr::null_mut(); + + if posixly_correct == 0 + { + let mut str = format!("function {} () \n\0", CStr::from_ptr((*(*func).name).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + } + else{ + let mut str = format!("{} () \n\0", CStr::from_ptr((*(*func).name).word).to_str().unwrap()); + cprintf_1(str.as_mut_ptr() as *mut c_char); + } + + //add_unwind_protect(reset_locals, 0 ); + add_unwind_protect(reset_locals as *mut Function, 0 as *mut c_char); + indent(indentation); + + cprintf_1(b"{ \n\0" as *const u8 as *const c_char); + inside_function_def += 1; + indentation += indentation_amount; + cmdcopy = copy_command((*func).command); + + if (*cmdcopy).type_ == command_type_cm_group + { + func_redirects = (*cmdcopy).redirects; + (*cmdcopy).redirects = 0 as *mut REDIRECT; + } + + make_command_string_internal(if (*cmdcopy).type_ == command_type_cm_group{ + (*(*cmdcopy).value.Group).command + } else { + cmdcopy + } + ); + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char ); + + remove_unwind_protect(); + indentation -= indentation_amount; + inside_function_def -= 1; + + + if !func_redirects.is_null() + { + newline(b"} \0" as *const u8 as *const c_char as *mut c_char); + print_redirection_list(func_redirects); + (*cmdcopy).redirects = func_redirects; + } + else + { + newline(b"}\0" as *const u8 as *const c_char as *mut c_char); + } + + dispose_command(cmdcopy); +} + + +#[no_mangle] +pub unsafe extern "C" fn r_named_function_string(name:*mut c_char, command:*mut COMMAND, flags:c_int)-> *mut c_char +{ + // println!("r_named_function_string"); + r_print_command(command); + let mut result:*mut c_char; + let old_indent:c_int; + let old_amount:c_int; + let mut cmdcopy:*mut COMMAND; + let mut func_redirects:*mut REDIRECT; + + old_indent = indentation; + old_amount = indentation_amount; + command_string_index = was_heredoc; + command_string_index = 0; + was_heredoc = 0; + deferred_heredocs = std::ptr::null_mut(); + + if !name.is_null() && *name as c_int != 0 + { + if find_reserved_word(name) >= 0 + { + cprintf_1(b"function \0" as *const u8 as *const c_char); + } + cprintf_1(name); + } + cprintf_1(b"() \0" as *const u8 as *const c_char); + if (flags & FUNC_MULTILINE) == 0 + { + indentation = 1; + indentation_amount = 0; + } + else + { + cprintf_1(b"\n\0" as *const u8 as *const c_char); + indentation += indentation_amount; + } + + inside_function_def += 1; + cprintf_1(if (flags & FUNC_MULTILINE) == 0 { + b"{ \n\0" as *const u8 as *const c_char + } + else { + b"{ \0" as *const u8 as *const c_char + }, + ); + + cmdcopy = copy_command(command); + func_redirects = std::ptr::null_mut(); + if (*cmdcopy).type_ == command_type_cm_group + { + func_redirects = (*cmdcopy).redirects; + (*cmdcopy).redirects = 0 as *mut redirect ; + } + + make_command_string_internal(if (*cmdcopy).type_ == command_type_cm_group { + (*(*cmdcopy).value.Group).command + } else { + cmdcopy + }, + ); + + PRINT_DEFERRED_HEREDOCS!(b"\0" as *const u8 as *const c_char); + + indentation = old_indent; + indentation = old_amount; + indentation_amount = old_amount; + inside_function_def -= 1; + if !func_redirects.is_null() + { + newline(b"} \0" as *const u8 as *const c_char as *mut c_char); + print_redirection_list(func_redirects); + (*cmdcopy).redirects = func_redirects; + } + else{ + newline(b"}\0" as *const u8 as *const c_char as *mut c_char); + } + + + result = the_printed_command; + if (flags & FUNC_MULTILINE) == 0 + { + if *result.offset(2) == '\n' as i8 + { + libc::memmove(result.offset(2) as *mut c_void, result.offset(3) as *const c_void, libc::strlen(result).wrapping_sub(2)); + } + } + + dispose_command(cmdcopy); + if (flags & FUNC_EXTERNAL) != 0 + { + result = remove_quoted_escapes(result); + } + return result; +} + + +#[no_mangle] +pub unsafe extern "C" fn newline(string: *mut c_char) +{ + cprintf_1(b"\n\0" as *const u8 as *const i8); + indent(indentation); + if !string.is_null() && *string as c_int != 0 + { + cprintf_1(string); + } +} + +static mut indentation_string:*mut c_char = std::ptr::null_mut(); +static mut indentation_size:c_int = 0; + +#[no_mangle] +unsafe extern "C" fn indent(mut amount:c_int) +{ + let mut i:c_int; + RESIZE_MALLOCED_BUFFER!(indentation_string, 0 as c_int, amount, indentation_size , 16); + i = 0; + while amount > 0 + { + *indentation_string.offset(i as isize) = ' ' as c_char; + i += 1; + amount -= 1; + } + *indentation_string.offset(i as isize) = '\0' as c_char; + cprintf_1(indentation_string); +} + +#[no_mangle] +unsafe extern "C" fn semicolon() +{ + if command_string_index > 0 && + (*the_printed_command.offset((command_string_index -1) as isize) == '&' as c_char || + *the_printed_command.offset((command_string_index -1) as isize) == '\n' as c_char) + { + return; + } + cprintf_1(b";\0" as *const u8 as *const i8); +} + + +#[no_mangle] +unsafe extern "C" fn the_printed_command_resize(length:c_int) +{ + if the_printed_command.is_null() + { + the_printed_command_size = (length + PRINTED_COMMAND_INITIAL_SIZE - 1) & !PRINTED_COMMAND_INITIAL_SIZE - 1; + the_printed_command = libc::malloc(the_printed_command_size as usize) as *mut c_char; + command_string_index = 0; + } + else if (command_string_index + length) >= the_printed_command_size { + let mut new:c_int; + new = command_string_index + length + 1; + new = (new + PRINTED_COMMAND_CROW_SIZE -1 ) & !(PRINTED_COMMAND_CROW_SIZE -1); + the_printed_command_size = new; + the_printed_command = libc::realloc(the_printed_command as *mut c_void, the_printed_command_size as usize) as *mut c_char; + } +} + +//xprintf 没有重构,用到xprint的地方直接换成println! +//cprintf测试 +unsafe fn cprintf_1(str:*const c_char) +{ + let mut _c:c_int; + let arg_len:i32; + arg_len = libc::strlen(str) as i32; + the_printed_command_resize(arg_len + 1); + libc::strncpy(the_printed_command.offset(command_string_index as isize), str, arg_len as usize); + command_string_index += arg_len; + *the_printed_command.offset(command_string_index as isize) = '\u{0}' as i32 as libc::c_char; +} + +unsafe fn cprintf_2(str1:*const c_char,str2:*mut c_char) +{ + let mut _c:c_int; + let arg_len_1:i32; + let arg_len_2:i32; + // println!("cprintf_2"); + arg_len_1 = libc::strlen(str1) as i32; + arg_len_2 = libc::strlen(str2 as *const c_char) as i32; + the_printed_command_resize(arg_len_1 + arg_len_2 + 1); + libc::strncpy(the_printed_command.offset(command_string_index as isize), str1, arg_len_1 as usize); + command_string_index += arg_len_1; + libc::strncpy(the_printed_command.offset(command_string_index as isize), str2, arg_len_1 as usize); + command_string_index += arg_len_2; + *the_printed_command.offset(command_string_index as isize) = '\u{0}' as i32 as libc::c_char; +} + +/* +unsafe extern "C" fn cprintf(mut control: *const libc::c_char, mut args: ...) { + let mut s: *const libc::c_char = 0 as *const libc::c_char; + let mut char_arg: [libc::c_char; 2] = [0; 2]; + let mut argp: *mut libc::c_char = 0 as *mut libc::c_char; + let mut intbuf: [libc::c_char; 11] = [0; 11]; + let mut digit_arg: libc::c_int = 0; + let mut arg_len: libc::c_int = 0; + let mut c: libc::c_int = 0; + let mut args_0: ::std::ffi::VaListImpl; + args_0 = args.clone(); + arg_len = strlen(control) as libc::c_int; + the_printed_command_resize(arg_len + 1 as libc::c_int); + char_arg[1 as libc::c_int as usize] = '\u{0}' as i32 as libc::c_char; + s = control; + while !s.is_null() && *s as libc::c_int != 0 { + let fresh7 = s; + s = s.offset(1); + c = *fresh7 as libc::c_int; + argp = 0 as *mut libc::c_void as *mut libc::c_char; + if c != '%' as i32 || *s == 0 { + char_arg[0 as libc::c_int as usize] = c as libc::c_char; + argp = char_arg.as_mut_ptr(); + arg_len = 1 as libc::c_int; + } else { + let fresh8 = s; + s = s.offset(1); + c = *fresh8 as libc::c_int; + match c { + 37 => { + char_arg[0 as libc::c_int as usize] = c as libc::c_char; + argp = char_arg.as_mut_ptr(); + arg_len = 1 as libc::c_int; + } + 115 => { + argp = args_0.arg::<*mut libc::c_char>(); + arg_len = strlen(argp) as libc::c_int; + } + 100 => { + digit_arg = args_0.arg::(); + if digit_arg < 0 as libc::c_int { + sprintf( + intbuf.as_mut_ptr(), + b"%u\0" as *const u8 as *const libc::c_char, + -(1 as libc::c_int) as libc::c_uint, + ); + argp = intbuf.as_mut_ptr(); + } else { + argp = inttostr( + digit_arg as intmax_t, + intbuf.as_mut_ptr(), + ::std::mem::size_of::<[libc::c_char; 11]>() as libc::c_ulong, + ); + } + arg_len = strlen(argp) as libc::c_int; + } + 99 => { + char_arg[0 as libc::c_int + as usize] = args_0.arg::() as libc::c_char; + argp = char_arg.as_mut_ptr(); + arg_len = 1 as libc::c_int; + } + _ => { + programming_error( + dcgettext( + 0 as *const libc::c_char, + b"cprintf: `%c': invalid format character\0" as *const u8 + as *const libc::c_char, + 5 as libc::c_int, + ), + c, + ); + } + } + } + if !argp.is_null() && arg_len != 0 { + the_printed_command_resize(arg_len + 1 as libc::c_int); + libc::memcpy( + the_printed_command.offset(command_string_index as isize) + as *mut libc::c_void, + argp as *const libc::c_void, + arg_len as libc::c_ulong as libc::size_t, + ); + command_string_index += arg_len; + } + } + *the_printed_command + .offset(command_string_index as isize) = '\u{0}' as i32 as libc::c_char; +} +*/ \ No newline at end of file diff --git a/bash-5.1/r_variables/src/lib.rs b/bash-5.1/r_variables/src/lib.rs index d4364a959b28d268f99833fa01f687f465cc633b..cb0e1fede3d3b90135e2fd865a6ca66b5cb7ca6c 100644 --- a/bash-5.1/r_variables/src/lib.rs +++ b/bash-5.1/r_variables/src/lib.rs @@ -166,42 +166,3 @@ unsafe extern "C" fn create_variable_tables() { shell_function_defs = hash_create(FUNCTIONS_HASH_BUCKETS!() as libc::c_int); } } - -#[no_mangle] -pub unsafe extern "C" fn sh_get_home_dir() -> *mut libc::c_char { - - if (current_user.home_dir).is_null() { - // get_current_user_info in file of shell.c - get_current_user_info(); - } - return current_user.home_dir; -} - -unsafe extern "C" fn set_home_var() { - let mut temp_var: *mut SHELL_VAR = 0 as *mut SHELL_VAR; - // find_variable 下文会实现 - temp_var = find_variable(b"HOME\0" as *const u8 as *const libc::c_char); - if temp_var.is_null() { - temp_var =bind_variable( - b"HOME\0" as *const u8 as *const libc::c_char, - sh_get_home_dir(), - 0 as libc::c_int); - } -} - -unsafe extern "C" fn set_shell_var() { - let mut temp_var: *mut SHELL_VAR = 0 as *mut SHELL_VAR; - // find_variable 下文会实现 - temp_var = find_variable(b"SHELL\0" as *const u8 as *const libc::c_char); - if temp_var.is_null() { - if (current_user.shell).is_null() { - // get_current_user_info in file of shell.c - get_current_user_info(); - } - temp_var =bind_variable( - b"SHELL\0" as *const u8 as *const libc::c_char, - current_user.shell, - 0 as libc::c_int); - } -} - diff --git a/bash-5.1/src/main.rs b/bash-5.1/src/main.rs deleted file mode 100644 index fbac9e408a5ae0a71ecb9e6dc7984babd6422209..0000000000000000000000000000000000000000 --- a/bash-5.1/src/main.rs +++ /dev/null @@ -1,15 +0,0 @@ -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. - -//# SPDX-License-Identifier: GPL-3.0-or-later -//# SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. - -//# SPDX-License-Identifier: GPL-3.0-or-later -//use command1::say_hello; -//use command2::hello2; - -fn main() { -// hello2(); -// say_hello(); - println!("Hello, world!"); - //execute_cmd(); -} diff --git a/bash-5.1/stamp-h b/bash-5.1/stamp-h deleted file mode 100644 index 9788f70238c91894045d22366fa941580826c3c1..0000000000000000000000000000000000000000 --- a/bash-5.1/stamp-h +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/bash-5.1/stringlib.c b/bash-5.1/stringlib.c index 0cc26cf832ee9efccdd0ae5ce105b5ad98e3a9d6..2fc3a9478ccaa81d3ceb344e287eed798c760b11 100644 --- a/bash-5.1/stringlib.c +++ b/bash-5.1/stringlib.c @@ -192,7 +192,7 @@ strcreplace (string, c, text, do_glob) int len, rlen, ind, tlen; len = STRLEN (text); - rlen = len + strlen (string) + 2; + rlen = len + strlen (string) + 2; // 先预留出string和text之和的长度+2 ret = (char *)xmalloc (rlen); for (p = string, r = ret; p && *p; ) @@ -214,7 +214,7 @@ strcreplace (string, c, text, do_glob) } else { - RESIZE_MALLOCED_BUFFER (ret, ind, len, rlen, rlen); + RESIZE_MALLOCED_BUFFER (ret, ind, len, rlen, rlen);//ret 2*strlen string, ind=offset ret, //里面会计算一下ind+len大于已分配的,就会realloc r = ret + ind; /* in case reallocated */ strcpy (r, text); r += len; diff --git a/bash-5.1/support/Makefile b/bash-5.1/support/Makefile deleted file mode 100644 index 3f20675606a3c96ab7885d8e437e3f4cde40b3ce..0000000000000000000000000000000000000000 --- a/bash-5.1/support/Makefile +++ /dev/null @@ -1,88 +0,0 @@ -# -# Simple Makefile for the support programs. -# -# documentation support: man2html -# testing support: printenv recho zecho xcase -# -# bashbug.sh lives here (created by configure), but bashbug is created by -# the top-level makefile -# -# Currently only man2html is built -# -# Copyright (C) 1998-2018 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# -# Boilerplate -# -topdir = .. -srcdir = . - -BUILD_DIR = /home/tong/src/bash/bash-5.1 - -RM = rm -f -SHELL = /bin/sh -CC = gcc -CC_FOR_BUILD = $(CC) - -EXEEXT = - -# -# Compiler options: -# -PROFILE_FLAGS = - -CFLAGS = -g -O2 -Wno-parentheses -Wno-format-security -CFLAGS_FOR_BUILD = -g -O2 -Wno-parentheses -Wno-format-security -CPPFLAGS = -CPPFLAGS_FOR_BUILD = -LOCAL_CFLAGS = -DEFS = -DHAVE_CONFIG_H -LOCAL_DEFS = -DSHELL - -LIBS = -ldl -LIBS_FOR_BUILD = ${LIBS} # XXX - -LOCAL_LDFLAGS = -rdynamic -LDFLAGS = $(LOCAL_LDFLAGS) $(CFLAGS) -LDFLAGS_FOR_BUILD = $(LDFLAGS) $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD) - -INCLUDES = -I${BUILD_DIR} -I${topdir} - -BASE_CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) \ - ${INCLUDES} $(LOCAL_CFLAGS) - -CCFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS) -CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) - -SRC1 = man2html.c -OBJ1 = man2html.o - -.c.o: - $(RM) $@ - $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $< - -all: man2html$(EXEEXT) - -man2html$(EXEEXT): $(OBJ1) - $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS_FOR_BUILD} - -clean: - $(RM) man2html$(EXEEXT) $(OBJ1) - -distclean maintainer-clean mostlyclean: clean - $(RM) bash.pc bashbug.sh - -man2html.o: man2html.c diff --git a/bash-5.1/vendor/stdext/.cargo-checksum.json b/bash-5.1/vendor/stdext/.cargo-checksum.json deleted file mode 100644 index c7a25fe727c5b94524a7a6a0fe89852c04e2efa2..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"files":{"CHANGELOG.md":"25083d6f00a303ea6b34e65ca809ecd2cd7a5e5dfea94456a38d70b6d6833f74","CONTRIBUTING.md":"97e85621fe7efff96aa56aa192da23c89d711278d1fe8ff6c9c9d8cc1c8ec40a","Cargo.toml":"41242d887268b6fc6c76f28b9327a343f8770f1d44a2c95234c80248374619f3","LICENSE":"f5d516121794c24b7facaa236364eab0b639694e2d69f78ec2de5deccadcf9d3","README.md":"027c4918296fd85df8f9e4a5bab47e3444ee136a4018eaefa0c40bf16bb1a913","src/duration.rs":"9b66cdca0320bc0d9d27589f76badbb3295e8f10aa9637e68983a11894c0bce9","src/lib.rs":"1949754206e205b9d98b9515daa403c837448dcba8fa6164cee44ebd07316e5a","src/macros.rs":"fbe37d37d74abfd417b768f2b34383651b2bd47ad7f9096badb37aa17ea6181e","src/num/float_convert.rs":"0d9ff64a84836707861622c876dceae277c279c5633d372929d6db0f329f02aa","src/num/integer.rs":"366e80cffeb0de5e1524ce74e9452e76fba0d0c30688d215028edc4f6fb23c66","src/num/mod.rs":"b4c8297ab8556a8c9b30e79b1866fcc7194120415d042b1457908d894266e2f8","src/option.rs":"689a7f2975f1606809d5e266504b95c32891cc6e54eb822b38d80b25360fa99a","src/result.rs":"1ec5f7344794094faf80e5f8e8fe2a4c402e3f6848aae66131f0a3c78d800bd3","src/str.rs":"1141ff3c39df22a6a507453e4e3e4adc574fb74e636c422775e085b18ead048a","src/sync/mod.rs":"cb5591f32593f3f105dbbc1c4b4ca3093712650f30950f2f97aaeebb841489ec","src/sync/mutex.rs":"51de035e1723ecd27e3c9933d56275f144fe7d3837287780ceb481551f04153c","src/sync/rw_lock.rs":"be5f0b1816fb56fb1e28eceda08e4fa585f400a962896394e06ad61f746bbdce","src/vec.rs":"89e54411b6857e30d04ac278535477070641f53769210e66a5bc946051480259"},"package":"6f3b6b32ae82412fb897ef134867d53a294f57ba5b758f06d71e865352c3e207"} \ No newline at end of file diff --git a/bash-5.1/vendor/stdext/CHANGELOG.md b/bash-5.1/vendor/stdext/CHANGELOG.md deleted file mode 100644 index 74ccc087c2acc9ce91e5b2d0ad978b6eba4f5fe6..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/CHANGELOG.md +++ /dev/null @@ -1,27 +0,0 @@ -# `stdext` changelog - -## [[Unreleased]] - -## 0.3.0 (18.06.2021) - -- BREAKING: MSRV got bumped to 1.53. - -- `try_match` and `unwrap_match` macros to get a certain variant from an enum [#11]. -- `return_ok` and `return_some` macros for early return of successful calculation [#11]. -- `Integer` trait that unifies all the built-in integer types under a single interface [#12]. -- `FloatConvert` trait that adds an interface for converting floating point numbers into integers [#12]. - -[#11]: https://github.com/popzxc/stdext-rs/pull/11 -[#12]: https://github.com/popzxc/stdext-rs/pull/12 - -## 0.2.1 (09.07.2020) - -- `VecExt::remove_item` method was added [#9]. - -[#9]: https://github.com/popzxc/stdext-rs/pull/9 - -## 0.2.0 (02.07.2020) - -- `compile_warning` and `function_name` macros were added [#4]. - -[#4]: https://github.com/popzxc/stdext-rs/pull/4 diff --git a/bash-5.1/vendor/stdext/CONTRIBUTING.md b/bash-5.1/vendor/stdext/CONTRIBUTING.md deleted file mode 100644 index 5d571e2c790c35392c454f29e03ca1e3764d7919..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/CONTRIBUTING.md +++ /dev/null @@ -1,29 +0,0 @@ -# Contributing guide - -Thanks for considering contributing to the `stdext`! Here's a banana for you: 🍌 - -If you are missing some functionality in the Rust standard library, but don't want -to bother yourself with all the associated routines (writing RFC, defending it, implementing, -waiting for it to be stabilized...), feel free to create a pull request to this repo. - -## Adding new functionality - -The ideal pull request will satisfy the following criteria: - -- Does not contain any hate (any form of discrimination, politics, offence, etc). -- Has an explanation why this functionality is useful for a generic audience. -- Covers the introduced code with tests and documentation. -- Does not rely on external dependencies (for any kind of complex functionality consider creating your - own library, this crate is for minor improvements only). - -All the rules (except for the first one) are discussible if you can provide a heavy reasoning for it. - -## Requesting the functionality - -If you don't want to implement the feature, but still feel that is missing in `std`, feel free to open -a feature request issue. I'll try to implement it myself once I have the time. - -## Other contributions - -Refactoring, improving documentation, adding tests and other kinds of improvements are really appreciated -as well. diff --git a/bash-5.1/vendor/stdext/Cargo.toml b/bash-5.1/vendor/stdext/Cargo.toml deleted file mode 100644 index 939fcae9b16f5e3043cacb799dbe07e14ec2c779..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -# -# When uploading crates to the registry Cargo will automatically -# "normalize" Cargo.toml files for maximal compatibility -# with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies -# -# If you believe there's an error in this file please file an -# issue against the rust-lang/cargo repository. If you're -# editing this file be aware that the upstream Cargo.toml -# will likely look very different (and much more reasonable) - -[package] -edition = "2018" -name = "stdext" -version = "0.3.1" -authors = ["Igor Aleksanov "] -description = "Extensions for the Rust standard library structures." -documentation = "https://docs.rs/stdext" -readme = "README.md" -keywords = ["std", "extensions", "helpers", "utils"] -categories = ["rust-patterns"] -license = "MIT" -repository = "https://github.com/popzxc/stdext-rs" - -[dependencies] diff --git a/bash-5.1/vendor/stdext/LICENSE b/bash-5.1/vendor/stdext/LICENSE deleted file mode 100644 index 15fab14bbbb85d5ff81c1a9414efbbaa43feb08f..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) 2020 Igor Aleksanov - -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/bash-5.1/vendor/stdext/README.md b/bash-5.1/vendor/stdext/README.md deleted file mode 100644 index 8616b85d08eece7ba7b00be21fa56252f6867dbf..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/README.md +++ /dev/null @@ -1,129 +0,0 @@ -# `std` extensions - -**Status:** -[![CI](https://github.com/popzxc/stdext-rs/workflows/CI/badge.svg)](https://github.com/popzxc/stdext-rs/actions) - -**Project info:** -[![Docs.rs](https://docs.rs/stdext/badge.svg)](https://docs.rs/stdext) -[![Latest Version](https://img.shields.io/crates/v/stdext.svg)](https://crates.io/crates/stdext) -[![License](https://img.shields.io/github/license/popzxc/stdext-rs.svg)](https://github.com/popzxc/stdext-rs) -![Rust 1.53+ required](https://img.shields.io/badge/rust-1.53+-blue.svg?label=Rust) - -Additional features for the Rust standard library. - -## Description - -This crate contains enhancements to the Rust standard library structures, useful for -broad audience, but not yet implemented (or stabilized) in `std`. - -Crate is designed to be lightweight (no external dependencies!) and provide essential -functionality which possible can get to the `std` some day. - -The minimal supported Rust version for release 0.3 is 1.53. However, if you need to use -this crate with an older version of the compiler, check out release 0.2; there is a good -chance that it will suit your needs. - -## Highlights - -- `Integer` super-trait that is implemented for all the built-in integers - and reflects the common part of their interfaces. - - ```rust - use stdext::prelude::*; - - fn accepts_any_integer(a: I, b: I) { - println!("{}", (a + b).count_ones()); - } - ``` - -- Safe conversions from floating numbers to integers. - - ```rust - use stdext::prelude::FloatConvert; - - let valid: Option = 10.5f32.checked_floor(); - let too_big: Option = 256f32.checked_floor(); - let nan: Option = f32::NAN.checked_floor(); - - assert_eq!(valid, Some(10u8)); - assert_eq!(too_big, None); - assert_eq!(nan, None); - ``` - -- Convenient builder methods for **`Duration`**: - - ```rust - use std::time::Duration; - use stdext::prelude::*; - - let duration = Duration::from_minutes(1).add_secs(5).add_micros(100); - assert_eq!(duration, Duration::new(65, 100_000)); - ``` - -- Panicking version for **`RwLock::read`**, **`RwLock::write`** and **`Mutex::lock`** (for - fellows who don't really handle the lock poisoning): - - ```rust - use std::sync::{Arc, RwLock}; - use stdext::prelude::*; - - let lock = Arc::new(RwLock::new(1)); - { - let mut n = lock.force_write(); // Instead of `.write().unwrap()`. - *n = 2; - } - let n = lock.force_read(); - assert_eq!(*n, 2); - ``` - -- **`Result::combine`** and **`Option::combine`** to zip pairs of objects: - - ```rust - use stdext::prelude::*; - - let x = Some(1); - let y = Some("hi"); - let z = None::; - - assert_eq!(x.combine(y), Some((1, "hi"))); - assert_eq!(x.combine(z), None); - - let x = Ok(1); - let y = Ok("hi"); - let z: Result = Err("error"); - let z2: Result = Err("other_error"); - - assert_eq!(x.combine(y), Ok((1, "hi"))); - assert_eq!(x.combine(z), Err("error")); - assert_eq!(z.combine(z2), Err("error")); - ``` - -- New handy macros (mostly for development purposes): - - ```rust - use stdext::{compile_warning, function_name}; - - fn sample_function() { - println!("This function is called {}", function_name!()); - - compile_warning!("This function must do something else..."); - } - ``` - -...and other features. For a full list, check out the [crate documentation](https://docs.rs/stdext/). - -## Motivation - -Standard library is great, and it becomes even better through time. However, a time gap between proposing -a new feature and getting it stabilized is way too big. - -This crate, however, can be updated quickly and the feature will be usable on the stable Rust soon after -implementation. - -## Contributing - -If you want to contribute to this project, please read the [contributing guide](CONTRIBUTING.md). - -## LICENSE - -`stdext` library is licensed under the MIT License. See [LICENSE](LICENSE) for details. diff --git a/bash-5.1/vendor/stdext/src/duration.rs b/bash-5.1/vendor/stdext/src/duration.rs deleted file mode 100644 index 5d3782de4db40232de88491a31b4a73345dc0185..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/duration.rs +++ /dev/null @@ -1,326 +0,0 @@ -//! Extension traits for `std::time::Duration`. - -use std::time::Duration; - -const SECS_IN_MIN: u64 = 60; -const SECS_IN_HOUR: u64 = 3600; -const SECS_IN_DAY: u64 = 3600 * 24; - -/// Extension trait with useful methods for [`std::time::Duration`]. -/// -/// [`std::time::Duration`]: https://doc.rust-lang.org/std/time/struct.Duration.html -pub trait DurationExt { - /// Creates a new `Duration` from the specified number of minutes. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::from_minutes(1); - /// - /// assert_eq!(duration, Duration::from_secs(60)); - /// ``` - /// - /// # Panics - /// - /// Panics if the total amount of seconds exceeds the `u64` type range. - fn from_minutes(minutes: u64) -> Duration; - - /// Creates a new `Duration` from the specified number of hours. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::from_hours(1); - /// - /// assert_eq!(duration, Duration::from_secs(3600)); - /// ``` - /// - /// # Panics - /// - /// Panics if the total amount of seconds exceeds the `u64` type range. - fn from_hours(hours: u64) -> Duration; - - /// Creates a new `Duration` from the specified number of hours. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::from_days(1); - /// - /// assert_eq!(duration, Duration::from_secs(3600 * 24)); - /// ``` - /// - /// # Panics - /// - /// Panics if the total amount of seconds exceeds the `u64` type range. - fn from_days(days: u64) -> Duration; - - /// Adds the specified amount of nanoseconds to the `Duration` object. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::default().add_nanos(1); - /// - /// assert_eq!(duration, Duration::default() + Duration::from_nanos(1)); - /// ``` - fn add_nanos(self, nanos: u64) -> Duration; - - /// Adds the specified amount of microseconds to the `Duration` object. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::default().add_micros(1); - /// - /// assert_eq!(duration, Duration::default() + Duration::from_micros(1)); - /// ``` - fn add_micros(self, micros: u64) -> Duration; - - /// Adds the specified amount of milliseconds to the `Duration` object. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::default().add_millis(1); - /// - /// assert_eq!(duration, Duration::default() + Duration::from_millis(1)); - /// ``` - fn add_millis(self, millis: u64) -> Duration; - - /// Adds the specified amount of seconds to the `Duration` object. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::default().add_secs(1); - /// - /// assert_eq!(duration, Duration::default() + Duration::from_secs(1)); - /// ``` - fn add_secs(self, seconds: u64) -> Duration; - - /// Adds the specified amount of minutes to the `Duration` object. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::default().add_minutes(1); - /// - /// assert_eq!(duration, Duration::default() + Duration::from_minutes(1)); - /// ``` - fn add_minutes(self, minutes: u64) -> Duration; - - /// Adds the specified amount of hours to the `Duration` object. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::default().add_hours(1); - /// - /// assert_eq!(duration, Duration::default() + Duration::from_hours(1)); - /// ``` - fn add_hours(self, hours: u64) -> Duration; - - /// Adds the specified amount of days to the `Duration` object. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::default().add_days(1); - /// - /// assert_eq!(duration, Duration::default() + Duration::from_days(1)); - /// ``` - fn add_days(self, days: u64) -> Duration; - - /// Returns the number of _whole_ minutes contained by this `Duration`. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::new(61, 730023852); - /// assert_eq!(duration.as_minutes(), 1); - /// ``` - fn as_minutes(&self) -> u64; - - /// Returns the number of _whole_ hours contained by this `Duration`. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::new(3601, 730023852); - /// assert_eq!(duration.as_hours(), 1); - /// ``` - fn as_hours(&self) -> u64; - - /// Returns the number of _whole_ hours contained by this `Duration`. - /// - /// # Examples - /// - /// ``` - /// use std::time::Duration; - /// use stdext::prelude::*; - /// - /// let duration = Duration::new(61, 730023852).add_days(1); - /// assert_eq!(duration.as_days(), 1); - /// ``` - fn as_days(&self) -> u64; -} - -impl DurationExt for Duration { - fn from_minutes(minutes: u64) -> Self { - let seconds = minutes * SECS_IN_MIN; - Self::from_secs(seconds) - } - - fn from_hours(hours: u64) -> Self { - let seconds: u64 = hours * SECS_IN_HOUR; - Self::from_secs(seconds) - } - - fn from_days(days: u64) -> Self { - let seconds = days * SECS_IN_DAY; - Self::from_secs(seconds) - } - - fn add_nanos(self, nanos: u64) -> Self { - self + Self::from_nanos(nanos) - } - - fn add_micros(self, micros: u64) -> Self { - self + Self::from_micros(micros) - } - - fn add_millis(self, millis: u64) -> Self { - self + Self::from_millis(millis) - } - - fn add_secs(self, seconds: u64) -> Self { - self + Self::from_secs(seconds) - } - - fn add_minutes(self, minutes: u64) -> Self { - self + Self::from_minutes(minutes) - } - - fn add_hours(self, hours: u64) -> Self { - self + Self::from_hours(hours) - } - - fn add_days(self, days: u64) -> Self { - self + Self::from_days(days) - } - - fn as_minutes(&self) -> u64 { - self.as_secs() / SECS_IN_MIN - } - - fn as_hours(&self) -> u64 { - self.as_secs() / SECS_IN_HOUR - } - - fn as_days(&self) -> u64 { - self.as_secs() / SECS_IN_DAY - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn from_methods() { - // Check `from_minutes` - let test_vector = vec![0, 1, u64::max_value() / SECS_IN_MIN]; - for minutes in test_vector { - let seconds = minutes * SECS_IN_MIN; - assert_eq!( - Duration::from_minutes(minutes), - Duration::from_secs(seconds) - ); - } - - // Check `from_hours` - let test_vector = vec![0, 1, u64::max_value() / SECS_IN_HOUR]; - for hours in test_vector { - let seconds = hours * SECS_IN_HOUR; - assert_eq!(Duration::from_hours(hours), Duration::from_secs(seconds)); - } - - // Check `from_days` - let test_vector = vec![0, 1, u64::max_value() / SECS_IN_DAY]; - for days in test_vector { - let seconds = days * SECS_IN_DAY; - assert_eq!(Duration::from_days(days), Duration::from_secs(seconds)); - } - } - - #[test] - fn add_methods() { - let duration = Duration::default() - .add_nanos(1) - .add_micros(1) - .add_millis(1) - .add_secs(1) - .add_minutes(1) - .add_hours(1) - .add_days(1); - - let expected_duration = Duration::new( - SECS_IN_DAY + SECS_IN_HOUR + SECS_IN_MIN + 1, - 1_000_000 + 1_000 + 1, - ); - - assert_eq!(duration, expected_duration); - } - - #[test] - fn as_methods() { - let test_vector = vec![0, SECS_IN_MIN, SECS_IN_HOUR, SECS_IN_DAY]; - - for seconds in test_vector { - for seconds in &[seconds, seconds + 1, seconds * 2, seconds * 2 + 1] { - let duration = Duration::from_secs(*seconds); - - assert_eq!(duration.as_minutes(), duration.as_secs() / SECS_IN_MIN); - assert_eq!(duration.as_hours(), duration.as_secs() / SECS_IN_HOUR); - assert_eq!(duration.as_days(), duration.as_secs() / SECS_IN_DAY); - } - } - } -} diff --git a/bash-5.1/vendor/stdext/src/lib.rs b/bash-5.1/vendor/stdext/src/lib.rs deleted file mode 100644 index 12f8619b85a8598a086952cfaf661d1bb69c044b..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/lib.rs +++ /dev/null @@ -1,150 +0,0 @@ -//! Additional features for the Rust standard library. -//! -//! ## Description -//! -//! This crate contains enhancements to the Rust standard library types, useful for -//! broad audience, but not yet implemented (or stabilized) in `std`. -//! -//! Crate is designed to be lightweight (no external dependencies!) and provide essential -//! functionality which possible can get to the `std` some day. -//! -//! ## Extension traits -//! -//! All the new functionality the stanard library is added using extension traits. -//! -//! Below you can find the table of all the extension traits introduced by this crate: -//! -//! | `std` structure | extension traits -//! | --- | --- -//! | [`Vec`] | [`VecExt`] and [`VecExtClone`] -//! | [`&str`] | [`StrExt`] -//! | [`Option`] | [`OptionExt`] -//! | [`Result`] | [`ResultExt`] -//! | [`Duration`] | [`DurationExt`] -//! | [`RwLock`] | [`RwLockExt`] -//! | [`Mutex`] | [`MutexExt`] -//! | [`f32`] and [`f64`] | [`FloatConvert`] -//! -//! [`Vec`]: https://doc.rust-lang.org/std/vec/struct.Vec.html -//! [`&str`]: https://doc.rust-lang.org/std/primitive.str.html -//! [`Option`]: https://doc.rust-lang.org/std/option/enum.Option.html -//! [`Result`]: https://doc.rust-lang.org/std/result/enum.Result.html -//! [`Duration`]: https://doc.rust-lang.org/std/time/struct.Duration.html -//! [`RwLock`]: https://doc.rust-lang.org/std/sync/struct.RwLock.html -//! [`Mutex`]: https://doc.rust-lang.org/std/sync/struct.Mutex.html -//! -//! [`VecExt`]: vec/trait.VecExt.html -//! [`VecExtClone`]: vec/trait.VecExtClone.html -//! [`StrExt`]: str/trait.StrExt.html -//! [`OptionExt`]: option/trait.OptionExt.html -//! [`ResultExt`]: result/trait.ResultExt.html -//! [`DurationExt`]: duration/trait.DurationExt.html -//! [`RwLockExt`]: sync/rw_lock/trait.RwLockExt.html -//! [`MutexExt`]: sync/mutex/trait.MutexExt.html -//! [`FloatConvert`]: num/float_convert/trait.FloatConvert.html -//! -//! ## Integer super-trait -//! -//! While all built-in integer types have mostly the same interface, it's not backed by any trait, -//! which makes it impossible to write a function that will accept any built-in integer. -//! -//! [`Integer`] trait solves that problem by reflecting the common interface of all the built-in integers. -//! -//! [`Integer`]: num/integer/trait.Integer.html -//! -//! ## Macros -//! -//! Another group of extensions in `stdext` is new macros: -//! -//! - [`compile_warning`] for spawning a user-defined compilation warnings. -//! - [`function_name`] for getting an enclosing function name. -//! -//! [`compile_warning`]: ./macro.compile_warning.html -//! [`function_name`]: ./macro.function_name.html -//! -//! ## Highlights -//! -//! - Convenient builder methods for **`Duration`**: -//! -//! ```rust -//! use std::time::Duration; -//! use stdext::prelude::*; -//! -//! let duration = Duration::from_minutes(1).add_secs(5).add_micros(100); -//! assert_eq!(duration, Duration::new(65, 100_000)); -//! ``` -//! -//! - Panicking version for **`RwLock::read`**, **`RwLock::write`** and **`Mutex::lock`** (for -//! fellows who don't really handle the lock poisoning): -//! -//! ```rust -//! use std::sync::{Arc, RwLock}; -//! use stdext::prelude::*; -//! -//! let lock = Arc::new(RwLock::new(1)); -//! { -//! let mut n = lock.force_write(); // Instead of `.write().unwrap()`. -//! *n = 2; -//! } -//! let n = lock.force_read(); -//! assert_eq!(*n, 2); -//! ``` -//! -//! - **`Result::combine`** and **`Option::combine`** to zip pairs of objects: -//! -//! ```rust -//! use stdext::prelude::*; -//! -//! let x = Some(1); -//! let y = Some("hi"); -//! let z = None::; -//! -//! assert_eq!(x.combine(y), Some((1, "hi"))); -//! assert_eq!(x.combine(z), None); -//! -//! let x = Ok(1); -//! let y = Ok("hi"); -//! let z: Result = Err("error"); -//! let z2: Result = Err("other_error"); -//! -//! assert_eq!(x.combine(y), Ok((1, "hi"))); -//! assert_eq!(x.combine(z), Err("error")); -//! assert_eq!(z.combine(z2), Err("error")); -//! ``` -//! -//! - New handy macros (mostly for development purposes): -//! -//! ```rust -//! use stdext::{compile_warning, function_name}; -//! -//! fn sample_function() { -//! println!("This function is called {}", function_name!()); -//! -//! compile_warning!("This function must do something else..."); -//! } -//! ``` - -#![warn(missing_docs, unreachable_pub)] - -pub mod duration; -#[macro_use] -pub mod macros; -pub mod num; -pub mod option; -pub mod result; -pub mod str; -pub mod sync; -pub mod vec; - -/// A "prelude" module which re-exports all the extension traits for the simple library usage. -pub mod prelude { - pub use crate::{ - duration::*, - num::{float_convert::*, integer::*}, - option::*, - result::*, - str::*, - sync::{mutex::*, rw_lock::*}, - vec::*, - }; -} diff --git a/bash-5.1/vendor/stdext/src/macros.rs b/bash-5.1/vendor/stdext/src/macros.rs deleted file mode 100644 index 1202a0aa0c1c7e9b85e836c578c2812a5b4dbabe..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/macros.rs +++ /dev/null @@ -1,233 +0,0 @@ -//! Various helper macros. - -/// `compile_warning` macro is a brother of [`std::compile_error`], -/// which emits a compile-time warning with a provided message. -/// -/// This implemented through an existing `dead_code` warning, thus the -/// output for the following example: -/// -/// ```rust -/// # use stdext::compile_warning; -/// compile_warning!("Sample user-defined warning!"); -/// ``` -/// -/// may look as follows: -/// -/// ```text -/// warning: constant item is never used: `WARNING` -/// --> src/lib.rs:7:9 -/// | -/// 7 | const WARNING: &str = $expr; -/// | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -/// ... -/// 11 | compile_warning!("Sample user-defined warning!"); -/// | ------------------------------------------------- in this macro invocation -/// ``` -/// -/// Once [`proc_macro_diagnostics`] feature is stabilized, this macro will be replaced -/// with a proper proc-macro-based implementation. -/// -/// This macro is intended to be used in the development process, as an alternative to the -/// [`unimplemented`] macro which doesn't cause code to panic. -/// -/// [`std::compile_error`]: https://doc.rust-lang.org/std/macro.compile_error.html -/// [`proc_macro_diagnostics`]: https://github.com/rust-lang/rust/issues/54140 -/// [`unimplemented`]: https://doc.rust-lang.org/std/macro.unimplemented.html -#[macro_export] -macro_rules! compile_warning { - ($expr:expr) => { - #[warn(dead_code)] - const WARNING: &str = $expr; - }; -} - -/// This macro returns the name of the enclosing function. -/// As the internal implementation is based on the [`std::any::type_name`], this macro derives -/// all the limitations of this function. -/// -/// ## Examples -/// -/// ```rust -/// mod bar { -/// pub fn sample_function() { -/// use stdext::function_name; -/// assert!(function_name!().ends_with("bar::sample_function")); -/// } -/// } -/// -/// bar::sample_function(); -/// ``` -/// -/// [`std::any::type_name`]: https://doc.rust-lang.org/std/any/fn.type_name.html -#[macro_export] -macro_rules! function_name { - () => {{ - // Okay, this is ugly, I get it. However, this is the best we can get on a stable rust. - fn f() {} - fn type_name_of(_: T) -> &'static str { - std::any::type_name::() - } - let name = type_name_of(f); - // `3` is the length of the `::f`. - &name[..name.len() - 3] - }}; -} - -/// Attempts to get variant from the enum variable. -/// -/// ## Examples -/// -/// ```rust -/// # use stdext::try_match; -/// -/// #[derive(Debug, PartialEq)] -/// enum Foo { -/// Left(u16), -/// Right(&'static str), -/// } -/// -/// assert_eq!(try_match!(Foo::Left(18), Foo::Left), Ok(18)); -/// assert_eq!( -/// try_match!(Foo::Right("nope"), Foo::Left), -/// Err(Foo::Right("nope")) -/// ); -/// ``` -#[macro_export] -macro_rules! try_match { - ($var:expr, $variant:path) => { - if let $variant(x) = $var { - Ok(x) - } else { - Err($var) - } - }; -} - -/// Similar to [`try_match`] but additionally unwraps the result. -/// -/// ## Panics -/// -/// Panics if expression didn't match the provided path. -/// -/// ## Examples -/// -/// ```rust -/// # use stdext::unwrap_match; -/// -/// #[derive(Debug, PartialEq)] -/// enum Foo { -/// Left(u16), -/// Right(&'static str), -/// } -/// -/// assert_eq!(unwrap_match!(Foo::Left(18), Foo::Left), 18); -/// ``` -/// -/// The following example will panic: -/// -/// ```should_panic -/// # use stdext::unwrap_match; -/// # #[derive(Debug, PartialEq)] -/// # enum Foo { -/// # Left(u16), -/// # Right(&'static str), -/// # } -/// assert_eq!(unwrap_match!(Foo::Right("nope"), Foo::Left), 18); -/// ``` -#[macro_export] -macro_rules! unwrap_match { - ($var:expr, $variant:path) => { - $crate::try_match!($var, $variant).unwrap() - }; -} - -/// Checks whether supplied [`Result`] variable is `Ok` -/// and if so, returns it. -/// -/// If variant is an `Err`, macro evaluates to the contents of the `Err` -/// variant. -/// -/// This macro supports two forms: -/// - `return_ok!(Ok(42));` - will return `Ok(42)`. -/// - `return_ok!(inner Ok(42));` - will return just `42`. -/// -/// ## Examples -/// -/// ```rust -/// # use stdext::return_ok; -/// -/// fn choose_one(left: Result, right: Result) -> Result { -/// return_ok!(left); -/// return_ok!(right); -/// Err(()) -/// } -/// -/// fn choose_one_inner(left: Result, right: Result) -> u8 { -/// return_ok!(inner left); -/// return_ok!(inner right); -/// panic!("Both variables are bad") -/// } -/// -/// assert_eq!(choose_one(Err(()), Ok(10)), Ok(10)); -/// assert_eq!(choose_one_inner(Ok(1), Err(())), 1); -/// ``` -#[macro_export] -macro_rules! return_ok { - ($var:expr) => { - match $var { - Ok(val) => return Ok(val), - Err(err) => err, - } - }; - (inner $var:expr) => { - match $var { - Ok(val) => return val, - Err(err) => err, - } - }; -} - -/// Checks whether supplied [`Option`] variable is `Some` -/// and if so, returns it. -/// -/// If variant is an `None`, nothing happens. -/// -/// This macro supports two forms: -/// - `return_some!(Some(42));` - will return `Some(42)`. -/// - `return_some!(inner Some(42));` - will return just `42`. -/// -/// ## Examples -/// -/// ```rust -/// # use stdext::return_some; -/// -/// fn choose_one(left: Option, right: Option) -> Option { -/// return_some!(left); -/// return_some!(right); -/// None -/// } -/// -/// fn choose_one_inner(left: Option, right: Option) -> u8 { -/// return_some!(inner left); -/// return_some!(inner right); -/// panic!("Both variables are bad") -/// } -/// -/// assert_eq!(choose_one(None, Some(10)), Some(10)); -/// assert_eq!(choose_one_inner(Some(1), None), 1); -/// ``` -#[macro_export] -macro_rules! return_some { - ($var:expr) => { - match $var { - Some(val) => return Some(val), - None => {} - } - }; - (inner $var:expr) => { - match $var { - Some(val) => return val, - None => {} - } - }; -} diff --git a/bash-5.1/vendor/stdext/src/num/float_convert.rs b/bash-5.1/vendor/stdext/src/num/float_convert.rs deleted file mode 100644 index ed96431632e37f7fd893c0b38aa32ceb0d4ca972..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/num/float_convert.rs +++ /dev/null @@ -1,158 +0,0 @@ -//! Extensions for the built-in floating point types. - -/// Set of methods to safely convert floating number into an integer. -/// -/// Currently, the main way to do so is to use [`as`][as_convert] conversion. -/// However, such an approach may not be suitable if saturating conversion is -/// not desired. -/// -/// However, saturating conversion is also provided as an expicit alternative -/// to `as` conversion (e.g. to avoid warnings when [`clippy::as_conversions`][clippy_as] -/// lint is enabled). -/// -/// [as_convert]: https://doc.rust-lang.org/nomicon/casts.html -/// [clippy_as]: https://rust-lang.github.io/rust-clippy/master/index.html#as_conversions -/// -/// ## Implementors -/// -/// This trait is implemented for both [`f32`] and [`f64`]. -pub trait FloatConvert: Sized { - /// Floors the floating number and attempts to convert it into an integer. - /// See [`f32::floor`] for description of flooring logic. - /// - /// Returns `None` if the value will not fit into the integer range or value - /// is not a number. - /// - /// ## Examples - /// - /// ```rust - /// # use stdext::prelude::FloatConvert; - /// - /// let valid: Option = 10.5f32.checked_floor(); - /// let too_big: Option = 256f32.checked_floor(); - /// let nan: Option = f32::NAN.checked_floor(); - /// - /// assert_eq!(valid, Some(10u8)); - /// assert_eq!(too_big, None); - /// assert_eq!(nan, None); - /// ``` - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_floor(self) -> Option; - - /// Ceils the floating number and attempts to convert it into an integer. - /// See [`f32::ceil`] for description of ceiling logic. - /// - /// Returns `None` if the value will not fit into the integer range or value - /// is not a number. - /// - /// ## Examples - /// - /// ```rust - /// # use stdext::prelude::FloatConvert; - /// - /// let valid: Option = 10.5f32.checked_ceil(); - /// let too_big: Option = 256f32.checked_ceil(); - /// let nan: Option = f32::NAN.checked_ceil(); - /// - /// assert_eq!(valid, Some(11u8)); - /// assert_eq!(too_big, None); - /// assert_eq!(nan, None); - /// ``` - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_ceil(self) -> Option; - - /// Rounds the floating number and attempts to convert it into an integer. - /// See [`f32::round`] for description of rounding logic. - /// - /// Returns `None` if the value will not fit into the integer range or value - /// is not a number. - /// - /// ## Examples - /// - /// ```rust - /// # use stdext::prelude::FloatConvert; - /// - /// let valid: Option = 10.51f32.checked_round(); // Will be rounded up. - /// let too_big: Option = 256f32.checked_round(); - /// let nan: Option = f32::NAN.checked_round(); - /// - /// assert_eq!(valid, Some(11u8)); - /// assert_eq!(too_big, None); - /// assert_eq!(nan, None); - /// ``` - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_round(self) -> Option; - - /// Behaves the same as `number.floor() as `. - /// See [`f32::floor`] for description of flooring logic. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn saturated_floor(self) -> Int; - - /// Behaves the same as `number.ceil() as `. - /// See [`f32::ceil`] for description of flooring logic. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn saturated_ceil(self) -> Int; - - /// Behaves the same as `number.round() as `. - /// See [`f32::round`] for description of flooring logic. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn saturated_round(self) -> Int; -} - -macro_rules! checked_impl { - ($val:ident.$fn:ident(), $int:ty) => {{ - if $val.is_nan() || $val.is_infinite() { - return None; - } - let converted = $val.$fn(); - if <$int>::MIN as Self <= converted && converted <= <$int>::MAX as Self { - Some(converted as $int) - } else { - None - } - }}; -} - -macro_rules! saturated_impl { - ($val:ident.$fn:ident(), $int:ty) => {{ - $val.$fn() as $int - }}; -} - -macro_rules! impl_float_convert { - ($float:ty, $($int:ty),+) => { - $(impl FloatConvert<$int> for $float { - fn checked_floor(self) -> Option<$int> { - checked_impl!(self.floor(), $int) - } - - fn checked_ceil(self) -> Option<$int> { - checked_impl!(self.ceil(), $int) - } - - fn checked_round(self) -> Option<$int> { - checked_impl!(self.round(), $int) - } - - fn saturated_floor(self) -> $int { - saturated_impl!(self.floor(), $int) - } - - fn saturated_ceil(self) -> $int { - saturated_impl!(self.ceil(), $int) - } - - fn saturated_round(self) -> $int { - saturated_impl!(self.round(), $int) - } - })+ - }; -} - -impl_float_convert!(f32, u8, u16, u32, u64, u128); -impl_float_convert!(f32, i8, i16, i32, i64, i128); -impl_float_convert!(f32, usize, isize); - -impl_float_convert!(f64, u8, u16, u32, u64, u128); -impl_float_convert!(f64, i8, i16, i32, i64, i128); -impl_float_convert!(f64, usize, isize); diff --git a/bash-5.1/vendor/stdext/src/num/integer.rs b/bash-5.1/vendor/stdext/src/num/integer.rs deleted file mode 100644 index 8798c65ac7bb6a2352f939623f613bc7b91c9d77..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/num/integer.rs +++ /dev/null @@ -1,469 +0,0 @@ -// This interface copies `std` one, thus we must discard clippy complains. -#![allow(clippy::wrong_self_convention)] - -//! Extensions for built-in integer traits. - -use std::num::ParseIntError; -use std::ops::{ - Add, AddAssign, BitAnd, BitAndAssign, BitOr, BitOrAssign, BitXor, BitXorAssign, Div, DivAssign, - Mul, MulAssign, Shl, ShlAssign, Shr, ShrAssign, Sub, SubAssign, -}; - -/// Built-in integers interface exposed as a trait. -/// -/// This trait is implemented for all the built-in integer types and copies their interface completely, -/// so it's possible to write generic code that accepts any integer number. -/// -/// Interface includes all the trait implementations as well, such as [`Copy`], [`Add`] or [`BitXorAssign`]. -/// -/// ## Caveats -/// -/// - `__bytes` are not implemented, as the return type (array of generic const length that -/// depends on the trait itself) cannot in be expressed in stable rust. -/// -/// - `is_power_of_two` / `next_power_of_two` / `checked_next_power_of_two` methods are not implemented, -/// as they exist for the unsigned numbers only. -pub trait Integer: - Sized - + Add - + AddAssign - + Sub - + SubAssign - + Shr - + ShrAssign - + Shl - + ShlAssign - + BitAnd - + BitAndAssign - + BitOr - + BitOrAssign - + BitXor - + BitXorAssign - + Div - + DivAssign - + Mul - + MulAssign - + Copy -{ - /// The smallest value that can be represented by this integer type. - const MIN: Self; - /// The largest value that can be represented by this integer type. - const MAX: Self; - /// The size of this integer type in bits. - const BITS: u32; - - /// See [`u128::from_str_radix`]. - fn from_str_radix(src: &str, radix: u32) -> Result; - - /// See [`u128::count_ones`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn count_ones(self) -> u32; - - /// See [`u128::count_zeros`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn count_zeros(self) -> u32; - - /// See [`u128::leading_zeros`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn leading_zeros(self) -> u32; - - /// See [`u128::trailing_zeros`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn trailing_zeros(self) -> u32; - - /// See [`u128::leading_ones`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn leading_ones(self) -> u32; - - /// See [`u128::trailing_ones`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn trailing_ones(self) -> u32; - - /// See [`u128::rotate_left`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn rotate_left(self, n: u32) -> Self; - - /// See [`u128::rotate_right`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn rotate_right(self, n: u32) -> Self; - - /// See [`u128::swap_bytes`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn swap_bytes(self) -> Self; - - /// See [`u128::reverse_bits`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn reverse_bits(self) -> Self; - - /// See [`u128::from_be`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn from_be(x: Self) -> Self; - - /// See [`u128::from_le`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn from_le(x: Self) -> Self; - - /// See [`u128::to_be`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn to_be(self) -> Self; - - /// See [`u128::to_le`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn to_le(self) -> Self; - - /// See [`u128::checked_add`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_add(self, rhs: Self) -> Option; - - /// See [`u128::checked_sub`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_sub(self, rhs: Self) -> Option; - - /// See [`u128::checked_mul`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_mul(self, rhs: Self) -> Option; - - /// See [`u128::checked_div`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_div(self, rhs: Self) -> Option; - - /// See [`u128::checked_div_euclid`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_div_euclid(self, rhs: Self) -> Option; - - /// See [`u128::checked_rem`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_rem(self, rhs: Self) -> Option; - - /// See [`u128::checked_rem_euclid`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_rem_euclid(self, rhs: Self) -> Option; - - /// See [`u128::checked_neg`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_neg(self) -> Option; - - /// See [`u128::checked_shl`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_shl(self, rhs: u32) -> Option; - - /// See [`u128::checked_shr`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_shr(self, rhs: u32) -> Option; - - /// See [`u128::checked_pow`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn checked_pow(self, exp: u32) -> Option; - - /// See [`u128::saturating_add`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn saturating_add(self, rhs: Self) -> Self; - - /// See [`u128::saturating_sub`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn saturating_sub(self, rhs: Self) -> Self; - - /// See [`u128::saturating_mul`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn saturating_mul(self, rhs: Self) -> Self; - - /// See [`u128::saturating_pow`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn saturating_pow(self, exp: u32) -> Self; - - /// See [`u128::wrapping_add`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_add(self, rhs: Self) -> Self; - - /// See [`u128::wrapping_sub`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_sub(self, rhs: Self) -> Self; - - /// See [`u128::wrapping_mul`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_mul(self, rhs: Self) -> Self; - - /// See [`u128::wrapping_div`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_div(self, rhs: Self) -> Self; - - /// See [`u128::wrapping_div_euclid`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_div_euclid(self, rhs: Self) -> Self; - - /// See [`u128::wrapping_rem`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_rem(self, rhs: Self) -> Self; - - /// See [`u128::wrapping_rem_euclid`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_rem_euclid(self, rhs: Self) -> Self; - - /// See [`u128::wrapping_neg`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_neg(self) -> Self; - - /// See [`u128::wrapping_shl`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_shl(self, rhs: u32) -> Self; - - /// See [`u128::wrapping_shr`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_shr(self, rhs: u32) -> Self; - - /// See [`u128::wrapping_pow`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn wrapping_pow(self, exp: u32) -> Self; - - /// See [`u128::overflowing_add`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn overflowing_add(self, rhs: Self) -> (Self, bool); - - /// See [`u128::overflowing_sub`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn overflowing_sub(self, rhs: Self) -> (Self, bool); - - /// See [`u128::overflowing_mul`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn overflowing_mul(self, rhs: Self) -> (Self, bool); - - /// See [`u128::overflowing_div`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn overflowing_div(self, rhs: Self) -> (Self, bool); - - /// See [`u128::overflowing_div_euclid`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool); - - /// See [`u128::overflowing_rem`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn overflowing_rem(self, rhs: Self) -> (Self, bool); - - /// See [`u128::overflowing_rem_euclid`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool); - - /// See [`u128::overflowing_neg`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn overflowing_neg(self) -> (Self, bool); - - /// See [`u128::overflowing_shr`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn overflowing_shr(self, rhs: u32) -> (Self, bool); - - /// See [`u128::overflowing_pow`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn overflowing_pow(self, exp: u32) -> (Self, bool); - - /// See [`u128::pow`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn pow(self, exp: u32) -> Self; - - /// See [`u128::div_euclid`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn div_euclid(self, rhs: Self) -> Self; - - /// See [`u128::rem_euclid`]. - #[must_use = "this returns the result of the operation, without modifying the original"] - fn rem_euclid(self, rhs: Self) -> Self; -} - -macro_rules! impl_integer { - ($($int:ty),+) => { - $( - impl Integer for $int { - const MIN: Self = Self::MIN; - const MAX: Self = Self::MAX; - const BITS: u32 = Self::BITS; - fn from_str_radix(src: &str, radix: u32) -> Result { - <$int>::from_str_radix(src, radix) - } - fn count_ones(self) -> u32 { - <$int>::count_ones(self) - } - fn count_zeros(self) -> u32 { - <$int>::count_zeros(self) - } - fn leading_zeros(self) -> u32 { - <$int>::leading_zeros(self) - } - fn trailing_zeros(self) -> u32 { - <$int>::trailing_zeros(self) - } - fn leading_ones(self) -> u32 { - <$int>::leading_ones(self) - } - fn trailing_ones(self) -> u32 { - <$int>::trailing_ones(self) - } - fn rotate_left(self, n: u32) -> Self { - <$int>::rotate_left(self, n) - } - fn rotate_right(self, n: u32) -> Self { - <$int>::rotate_right(self, n) - } - fn swap_bytes(self) -> Self { - <$int>::swap_bytes(self) - } - fn reverse_bits(self) -> Self { - <$int>::reverse_bits(self) - } - fn from_be(x: Self) -> Self { - <$int>::from_be(x) - } - fn from_le(x: Self) -> Self { - <$int>::from_le(x) - } - fn to_be(self) -> Self { - <$int>::to_be(self) - } - fn to_le(self) -> Self { - <$int>::to_le(self) - } - fn checked_add(self, rhs: Self) -> Option { - <$int>::checked_add(self, rhs) - } - fn checked_sub(self, rhs: Self) -> Option { - <$int>::checked_sub(self, rhs) - } - fn checked_mul(self, rhs: Self) -> Option { - <$int>::checked_mul(self, rhs) - } - fn checked_div(self, rhs: Self) -> Option { - <$int>::checked_div(self, rhs) - } - fn checked_div_euclid(self, rhs: Self) -> Option { - <$int>::checked_div_euclid(self, rhs) - } - fn checked_rem(self, rhs: Self) -> Option { - <$int>::checked_rem(self, rhs) - } - fn checked_rem_euclid(self, rhs: Self) -> Option { - <$int>::checked_rem_euclid(self, rhs) - } - fn checked_neg(self) -> Option { - <$int>::checked_neg(self) - } - fn checked_shl(self, rhs: u32) -> Option { - <$int>::checked_shl(self, rhs) - } - fn checked_shr(self, rhs: u32) -> Option { - <$int>::checked_shr(self, rhs) - } - fn checked_pow(self, exp: u32) -> Option { - <$int>::checked_pow(self, exp) - } - fn saturating_add(self, rhs: Self) -> Self { - <$int>::saturating_add(self, rhs) - } - fn saturating_sub(self, rhs: Self) -> Self { - <$int>::saturating_sub(self, rhs) - } - fn saturating_mul(self, rhs: Self) -> Self { - <$int>::saturating_mul(self, rhs) - } - fn saturating_pow(self, exp: u32) -> Self { - <$int>::saturating_pow(self, exp) - } - fn wrapping_add(self, rhs: Self) -> Self { - <$int>::wrapping_add(self, rhs) - } - fn wrapping_sub(self, rhs: Self) -> Self { - <$int>::wrapping_sub(self, rhs) - } - fn wrapping_mul(self, rhs: Self) -> Self { - <$int>::wrapping_mul(self, rhs) - } - fn wrapping_div(self, rhs: Self) -> Self { - <$int>::wrapping_div(self, rhs) - } - fn wrapping_div_euclid(self, rhs: Self) -> Self { - <$int>::wrapping_div_euclid(self, rhs) - } - fn wrapping_rem(self, rhs: Self) -> Self { - <$int>::wrapping_rem(self, rhs) - } - fn wrapping_rem_euclid(self, rhs: Self) -> Self { - <$int>::wrapping_rem_euclid(self, rhs) - } - fn wrapping_neg(self) -> Self { - <$int>::wrapping_neg(self) - } - fn wrapping_shl(self, rhs: u32) -> Self { - <$int>::wrapping_shl(self, rhs) - } - fn wrapping_shr(self, rhs: u32) -> Self { - <$int>::wrapping_shr(self, rhs) - } - fn wrapping_pow(self, exp: u32) -> Self { - <$int>::wrapping_pow(self, exp) - } - fn overflowing_add(self, rhs: Self) -> (Self, bool) { - <$int>::overflowing_add(self, rhs) - } - fn overflowing_sub(self, rhs: Self) -> (Self, bool) { - <$int>::overflowing_sub(self, rhs) - } - fn overflowing_mul(self, rhs: Self) -> (Self, bool) { - <$int>::overflowing_mul(self, rhs) - } - fn overflowing_div(self, rhs: Self) -> (Self, bool) { - <$int>::overflowing_div(self, rhs) - } - fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool) { - <$int>::overflowing_div_euclid(self, rhs) - } - fn overflowing_rem(self, rhs: Self) -> (Self, bool) { - <$int>::overflowing_rem(self, rhs) - } - fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool) { - <$int>::overflowing_rem_euclid(self, rhs) - } - fn overflowing_neg(self) -> (Self, bool) { - <$int>::overflowing_neg(self) - } - fn overflowing_shr(self, rhs: u32) -> (Self, bool) { - <$int>::overflowing_shr(self, rhs) - } - fn overflowing_pow(self, exp: u32) -> (Self, bool) { - <$int>::overflowing_pow(self, exp) - } - fn pow(self, exp: u32) -> Self { - <$int>::pow(self, exp) - } - fn div_euclid(self, rhs: Self) -> Self { - <$int>::div_euclid(self, rhs) - } - fn rem_euclid(self, rhs: Self) -> Self { - <$int>::rem_euclid(self, rhs) - } - } - )+ - }; -} - -impl_integer!(u8, u16, u32, u64, u128); -impl_integer!(i8, i16, i32, i64, i128); -impl_integer!(usize, isize); - -#[cfg(test)] -mod tests { - #[test] - fn basic() { - assert_eq!(::BITS, u8::BITS); - assert_eq!( - ::trailing_ones(10u32), - 10u32.trailing_ones() - ); - } - - fn accepts_any_integer(a: I, b: I) -> u32 { - (a + b).count_ones() - } - - #[test] - fn composite() { - assert_eq!(accepts_any_integer(0u8, 0u8), 0); - assert_eq!(accepts_any_integer(1i128, 0i128), 1); - } -} diff --git a/bash-5.1/vendor/stdext/src/num/mod.rs b/bash-5.1/vendor/stdext/src/num/mod.rs deleted file mode 100644 index bcf46f8c7a2faf57fb143bc51574b0ceac749737..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/num/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -//! Extensions for the built-in numeric types. - -pub mod float_convert; -pub mod integer; diff --git a/bash-5.1/vendor/stdext/src/option.rs b/bash-5.1/vendor/stdext/src/option.rs deleted file mode 100644 index 88b8c4aa1afb7c481f7a680c58f0803a5bae8d17..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/option.rs +++ /dev/null @@ -1,124 +0,0 @@ -//! Extension traits for `std::Option`. - -/// Extension trait with useful methods for [`std::option::Option`]. -/// -/// [`std::time::Option`]: https://doc.rust-lang.org/std/option/enum.Option.html -pub trait OptionExt { - /// Combines `self` and another `Option`. - /// - /// If `self` is `Some(s)` and `other` is `Some(o)`, this method returns `Some((s, o))`. - /// Otherwise, `None` is returned. - /// - /// **Note:** `std::Option` already provides a [`zip`] method which serves exact same purpose, - /// but currently it's unstable. Once it's stabilized, this method will be marked as deprecated - /// with a prompt to use the stanard method instead. - /// - /// # Examples - /// - /// ``` - /// use stdext::prelude::*; - /// - /// let x = Some(1); - /// let y = Some("hi"); - /// let z = None::; - /// - /// assert_eq!(x.combine(y), Some((1, "hi"))); - /// assert_eq!(x.combine(z), None); - /// ``` - /// - /// [`zip`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.zip - fn combine(self, other: Option) -> Option<(T, U)>; - - /// Combines `self` and another `Option` with function `f`. - /// - /// If `self` is `Some(s)` and `other` is `Some(o)`, this method returns `Some(f(s, o))`. - /// Otherwise, `None` is returned. - /// - /// **Note:** `std::Option` already provides a [`zip_with`] method which serves exact same purpose, - /// but currently it's unstable. Once it's stabilized, this method will be marked as deprecated - /// with a prompt to use the stanard method instead. - /// - /// # Examples - /// - /// ``` - /// use stdext::prelude::*; - /// - /// #[derive(Debug, PartialEq)] - /// struct Point { - /// x: f64, - /// y: f64, - /// } - /// - /// impl Point { - /// fn new(x: f64, y: f64) -> Self { - /// Self { x, y } - /// } - /// } - /// - /// let x = Some(17.5); - /// let y = Some(42.7); - /// - /// assert_eq!(x.combine_with(y, Point::new), Some(Point { x: 17.5, y: 42.7 })); - /// assert_eq!(x.combine_with(None, Point::new), None); - /// ``` - /// - /// [`zip_with`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.zip_with - fn combine_with(self, other: Option, f: F) -> Option - where - F: FnOnce(T, U) -> R; -} - -impl OptionExt for Option { - fn combine(self, other: Option) -> Option<(T, U)> { - match (self, other) { - (Some(left), Some(right)) => Some((left, right)), - _ => None, - } - } - - fn combine_with(self, other: Option, f: F) -> Option - where - F: FnOnce(T, U) -> R, - { - self.combine(other).map(|(l, r)| f(l, r)) - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn combine() { - // Test vector of (left, right, expected) values. - let test_vector = vec![ - (Some(1), Some(2), Some((1, 2))), - (Some(1), None, None), - (None, Some(2), None), - (None, None, None), - ]; - - for (left, right, expected) in test_vector { - assert_eq!(left.combine(right), expected); - } - } - - #[test] - fn combine_with() { - fn f(l: i32, r: i32) -> i32 { - l + r - } - - // Test vector of (left, right, expected) values. - let test_vector = vec![ - (Some(1), Some(2), Some(3)), - (Some(1), None, None), - (None, Some(2), None), - (None, None, None), - ]; - - for (left, right, expected) in test_vector { - assert_eq!(left.combine_with(right, f), expected); - } - } -} diff --git a/bash-5.1/vendor/stdext/src/result.rs b/bash-5.1/vendor/stdext/src/result.rs deleted file mode 100644 index bf56acb6d6d3d8a62fb448aeb71f88efd7ad24b7..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/result.rs +++ /dev/null @@ -1,112 +0,0 @@ -//! Extension traits for `std::Result`. - -/// Extension trait with useful methods for [`std::result::Result`]. -/// -/// [`std::result::Result`]: https://doc.rust-lang.org/std/result/enum.Result.html -pub trait ResultExt { - /// Combines `self` and another `Result`. - /// - /// If `self` is `Ok(s)` and `other` is `Ok(o)`, this method returns `Ok((s, o))`. - /// Otherwise, if the `self` is `Ok(s)` and `other` is `Err(e)`, this method returns `Err(e)`. - /// Otherwise, `self` is `Err(e)` and this method returns `Err(e)` (`other` is not taken into - /// account, as in short circuit calculations). - /// - /// # Examples - /// - /// ``` - /// use stdext::prelude::*; - /// - /// let x = Ok(1); - /// let y = Ok("hi"); - /// let z: Result = Err("error"); - /// let z2: Result = Err("other_error"); - /// - /// assert_eq!(x.combine(y), Ok((1, "hi"))); - /// assert_eq!(x.combine(z), Err("error")); - /// assert_eq!(z.combine(z2), Err("error")); - /// ``` - fn combine(self, other: Result) -> Result<(T, U), E>; - - /// Combines `self` and another `Result` with function `f`. - /// - /// If `self` is `Ok(s)` and `other` is `Ok(o)`, this method returns `Ok(f(s, o))`. - /// Otherwise, if the `self` is `Ok(s)` and `other` is `Err(e)`, this method returns `Err(e)`. - /// Otherwise, `self` is `Err(e)` and this method returns `Err(e)` (`other` is not taken into - /// account, as in short circuit calculations). - /// - /// # Examples - /// - /// ``` - /// use stdext::prelude::*; - /// - /// let x = Ok(1); - /// let y = Ok(2); - /// let z: Result = Err("error"); - /// let z2: Result = Err("other_error"); - /// - /// assert_eq!(x.combine_with(y, |l, r| l + r), Ok(3)); - /// assert_eq!(x.combine_with(z, |l, r| l + r), Err("error")); - /// assert_eq!(z.combine_with(z2, |l, r| l + r), Err("error")); - /// ``` - /// - /// [`zip_with`]: https://doc.rust-lang.org/std/Result/enum.Result.html#method.zip_with - fn combine_with(self, other: Result, f: F) -> Result - where - F: FnOnce(T, U) -> R; -} - -impl ResultExt for Result { - fn combine(self, other: Result) -> Result<(T, U), E> { - match (self, other) { - (Ok(left), Ok(right)) => Ok((left, right)), - (Ok(_), Err(err)) => Err(err), - (Err(err), _) => Err(err), - } - } - - fn combine_with(self, other: Result, f: F) -> Result - where - F: FnOnce(T, U) -> R, - { - self.combine(other).map(|(l, r)| f(l, r)) - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn combine() { - // Test vector of (left, right, expected) values. - let test_vector = vec![ - (Ok(1), Ok(2), Ok((1, 2))), - (Ok(1), Err("right"), Err("right")), - (Err("left"), Ok(2), Err("left")), - (Err("left"), Err("right"), Err("left")), - ]; - - for (left, right, expected) in test_vector { - assert_eq!(left.combine(right), expected); - } - } - - #[test] - fn combine_with() { - fn f(l: i32, r: i32) -> i32 { - l + r - } - - // Test vector of (left, right, expected) values. - let test_vector = vec![ - (Ok(1), Ok(2), Ok(3)), - (Ok(1), Err("right"), Err("right")), - (Err("left"), Ok(2), Err("left")), - (Err("left"), Err("right"), Err("left")), - ]; - - for (left, right, expected) in test_vector { - assert_eq!(left.combine_with(right, f), expected); - } - } -} diff --git a/bash-5.1/vendor/stdext/src/str.rs b/bash-5.1/vendor/stdext/src/str.rs deleted file mode 100644 index b7b62f2175cea63c6a3933af136757915be3096a..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/str.rs +++ /dev/null @@ -1,76 +0,0 @@ -//! Extension traits for `str` primitive type. - -/// Alternative for `std::str::pattern::Pattern` that does not require -/// nightly Rust (as `Pattern` is unstable yet). -#[doc(hidden)] -pub enum AltPattern<'a> { - Str(&'a str), - Char(char), -} - -impl<'a> From<&'a str> for AltPattern<'a> { - fn from(data: &'a str) -> Self { - Self::Str(data) - } -} - -impl<'a> From for AltPattern<'a> { - fn from(data: char) -> Self { - Self::Char(data) - } -} - -/// Extension trait with useful methods for primitive type [`str`]. -/// -/// [`str`]: https://doc.rust-lang.org/std/primitive.str.html -pub trait StrExt { - /// Version of [`str::splitn`] which expects the **exact** - /// amount of entries obtained after splitting. This method - /// returns `Vec`, as [`SplitN`] iterator depends on the unstable - /// type [`Pattern`] and cannot be returned on the stable Rust. - /// - /// # Examples - /// - /// ``` - /// use stdext::prelude::*; - /// - /// let data = "Hello world"; - /// let splitted = data.splitn_exact(2, " ").unwrap(); - /// assert_eq!(&splitted, &["Hello", "world"]); - /// - /// let splitted = data.splitn_exact(5, '-'); - /// assert!(splitted.is_none()); - /// ``` - /// - /// [`str::splitn`]: https://doc.rust-lang.org/std/primitive.str.html#method.splitn - /// [`SplitN`]: https://doc.rust-lang.org/std/str/struct.SplitN.html - /// [`Pattern`]: https://doc.rust-lang.org/std/str/pattern/trait.Pattern.html - fn splitn_exact<'a, P: Into>>( - &'a self, - n: usize, - pat: P, - ) -> Option>; -} - -impl StrExt for &str { - fn splitn_exact<'a, P: Into>>( - &'a self, - n: usize, - pat: P, - ) -> Option> { - let pat = pat.into(); - // Overcome for `&str` splitting API: it accepts generic arguments as separators, - // but the `Pattern` trait is unstable, thus it's impossible to just forward arguments - // inside on stable Rust. - let splitted: Vec<_> = match pat { - AltPattern::Str(sep) => self.splitn(n, sep).collect(), - AltPattern::Char(sep) => self.splitn(n, sep).collect(), - }; - - if splitted.len() == n { - Some(splitted) - } else { - None - } - } -} diff --git a/bash-5.1/vendor/stdext/src/sync/mod.rs b/bash-5.1/vendor/stdext/src/sync/mod.rs deleted file mode 100644 index 1050b60e772eff8294c36eaddb0a443756ccb2ca..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/sync/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -//! Extension traits for the standard synchronization primitives. - -pub mod mutex; -pub mod rw_lock; diff --git a/bash-5.1/vendor/stdext/src/sync/mutex.rs b/bash-5.1/vendor/stdext/src/sync/mutex.rs deleted file mode 100644 index 091d152071efdae139445eb32d217a2a2098f404..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/sync/mutex.rs +++ /dev/null @@ -1,33 +0,0 @@ -//! Extension traits for `std::sync::Mutex`. - -use std::sync::{Mutex, MutexGuard}; - -/// Extension trait with useful methods for [`std::sync::Mutex`]. -/// -/// [`std::sync::Mutex`]: https://doc.rust-lang.org/std/sync/struct.Mutex.html -pub trait MutexExt { - /// Shorthand for `mutex.lock().unwrap()` with a better panic message. - /// - /// This method is intended to be used in situations where poisoned locks are - /// considered an exceptional situation and should always result in panic. - /// - /// # Examples - /// - /// ``` - /// use std::sync::Mutex; - /// use stdext::prelude::*; - /// - /// let lock = Mutex::new(1); - /// - /// let n = lock.force_lock(); - /// assert_eq!(*n, 1); - /// ``` - fn force_lock(&self) -> MutexGuard; -} - -impl MutexExt for Mutex { - fn force_lock(&self) -> MutexGuard { - self.lock() - .expect("Unable to obtain lock: Mutex is poisoned") - } -} diff --git a/bash-5.1/vendor/stdext/src/sync/rw_lock.rs b/bash-5.1/vendor/stdext/src/sync/rw_lock.rs deleted file mode 100644 index c05419d65c6d8cdcad9009cc0d86447e54900994..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/sync/rw_lock.rs +++ /dev/null @@ -1,60 +0,0 @@ -//! Extension traits for `std::sync::RwLock`. - -use std::sync::{RwLock, RwLockReadGuard, RwLockWriteGuard}; - -/// Extension trait with useful methods for [`std::sync::RwLock`]. -/// -/// [`std::sync::RwLock`]: https://doc.rust-lang.org/std/sync/struct.RwLock.html -pub trait RwLockExt { - /// Shorthand for `lock.read().unwrap()` with a better panic message. - /// - /// This method is intended to be used in situations where poisoned locks are - /// considered an exceptional situation and should always result in panic. - /// - /// # Examples - /// - /// ``` - /// use std::sync::{Arc, RwLock}; - /// use stdext::prelude::*; - /// - /// let lock = Arc::new(RwLock::new(1)); - /// - /// let n = lock.force_read(); - /// assert_eq!(*n, 1); - /// ``` - fn force_read(&self) -> RwLockReadGuard; - - /// Shorthand for `lock.write().unwrap()` with a better panic message. - /// - /// This method is intended to be used in situations where poisoned locks are - /// considered an exceptional situation and should always result in panic. - /// - /// # Examples - /// - /// ``` - /// use std::sync::{Arc, RwLock}; - /// use stdext::prelude::*; - /// - /// let lock = Arc::new(RwLock::new(1)); - /// - /// { - /// let mut n = lock.force_write(); - /// *n = 2; - /// } - /// - /// let n = lock.force_read(); - /// assert_eq!(*n, 2); - /// ``` - fn force_write(&self) -> RwLockWriteGuard; -} - -impl RwLockExt for RwLock { - fn force_read(&self) -> RwLockReadGuard { - self.read() - .expect("Unable to obtain read lock: RwLock is poisoned") - } - fn force_write(&self) -> RwLockWriteGuard { - self.write() - .expect("Unable to obtain write lock: RwLock is poisoned") - } -} diff --git a/bash-5.1/vendor/stdext/src/vec.rs b/bash-5.1/vendor/stdext/src/vec.rs deleted file mode 100644 index d06afd0db63acf3cc37fb7297f0445546fdd693c..0000000000000000000000000000000000000000 --- a/bash-5.1/vendor/stdext/src/vec.rs +++ /dev/null @@ -1,128 +0,0 @@ -//! Extension traits for `std::Vec`. - -/// Extension trait with useful methods for [`std::vec::Vec`]. -/// -/// [`std::vec::Vec`]: https://doc.rust-lang.org/std/vec/struct.Vec.html -pub trait VecExt { - /// Resizes the `Vec` in-place if the provided `new_len` is **greater** than - /// the current `Vec` length. - /// - /// In simple words, this method only make vector bigger, but not smaller. - /// Calling this method with a length smaller or equal to the current length will - /// do nothing. - /// - /// This method uses a closure to create new values on every push. If - /// you'd rather [`Clone`] a given value, use [`resize_up`]. If you want - /// to use the [`Default`] trait to generate values, you can pass - /// [`Default::default()`] as the second argument. - /// - /// # Examples - /// - /// ``` - /// use stdext::prelude::*; - /// - /// let mut vec = vec![1, 2, 3]; - /// vec.resize_up_with(5, Default::default); - /// assert_eq!(vec, [1, 2, 3, 0, 0]); - /// - /// let mut vec = vec![]; - /// let mut p = 1; - /// vec.resize_up_with(4, || { p *= 2; p }); - /// assert_eq!(vec, [2, 4, 8, 16]); - /// - /// let mut vec = vec![1, 2, 3]; - /// vec.resize_up_with(1, Default::default); - /// assert_eq!(vec, [1, 2, 3]); // Resizing to smaller size does nothing. - /// ``` - /// - /// [`Clone`]: https://doc.rust-lang.org/std/clone/trait.Clone.html - /// [`Default`]: https://doc.rust-lang.org/std/default/trait.Default.html - /// [`Default::default()`]: https://doc.rust-lang.org/std/default/trait.Default.html#tymethod.default - /// [`resize_up`]: ./trait.VecExtClone.html#tymethod.resize_up - fn resize_up_with(&mut self, new_len: usize, f: F) - where - F: FnMut() -> T; - - /// Removes the first instance of `item` from the vector if the item exists. - /// - /// Based on the unstable vec_remove_item feature, which has been deprecated and will be removed. - /// - /// # Examples - /// - /// ``` - /// use stdext::prelude::*; - /// let mut vec = vec![1, 2, 3, 1]; - /// - /// vec.remove_item(&1); - /// - /// assert_eq!(vec, vec![2, 3, 1]); - /// ``` - fn remove_item(&mut self, item: &V) -> Option - where - T: PartialEq; -} - -/// Extension trait with useful methods for [`std::vec::Vec`]. -/// -/// This trait contains functions that require `T` to implement `Clone` trait. -/// -/// [`std::vec::Vec`]: https://doc.rust-lang.org/std/vec/struct.Vec.html -pub trait VecExtClone { - /// Resizes the `Vec` in-place if the provided `new_len` is **greater** than - /// the current `Vec` length. - /// - /// In simple words, this method only make vector bigger, but not smaller. - /// Calling this method with a length smaller or equal to the current length will - /// do nothing. - /// - /// This method requires `T` to implement [`Clone`], - /// in order to be able to clone the passed value. - /// If you need more flexibility (or want to rely on [`Default`] instead of - /// [`Clone`]), use [`resize_up_with`]. - /// - /// # Examples - /// - /// ``` - /// use stdext::prelude::*; - /// - /// let mut vec = vec!["hello"]; - /// vec.resize_up(3, "world"); - /// assert_eq!(vec, ["hello", "world", "world"]); - /// - /// let mut vec = vec![1, 2, 3, 4]; - /// vec.resize_up(2, 0); - /// assert_eq!(vec, [1, 2, 3, 4]); // Resizing to smaller size does nothing. - /// ``` - /// - /// [`Clone`]: https://doc.rust-lang.org/std/clone/trait.Clone.html - /// [`Default`]: https://doc.rust-lang.org/std/default/trait.Default.html - /// [`resize_up_with`]: ./trait.VecExt.html#tymethod.resize_up_with - fn resize_up(&mut self, new_len: usize, value: T); -} - -impl VecExt for Vec { - fn resize_up_with(&mut self, new_len: usize, f: F) - where - F: FnMut() -> T, - { - if self.len() < new_len { - self.resize_with(new_len, f); - } - } - - fn remove_item(&mut self, item: &V) -> Option - where - T: PartialEq, - { - let pos = self.iter().position(|x| *x == *item)?; - Some(self.remove(pos)) - } -} - -impl VecExtClone for Vec { - fn resize_up(&mut self, new_len: usize, value: T) { - if self.len() < new_len { - self.resize(new_len, value); - } - } -} diff --git a/bash-5.1/x.sh b/bash-5.1/x.sh new file mode 100644 index 0000000000000000000000000000000000000000..d005c705cd113527fd818e46c13057d0426d7911 --- /dev/null +++ b/bash-5.1/x.sh @@ -0,0 +1,3082 @@ +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv1; +git checkout -b bv1; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 4e5ff3911664c3535659c83e05c05d6d809e57d5 ; +echo git reset --hard 4e5ff3911664c3535659c83e05c05d6d809e57d5 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 1 >> record.txt +echo echo 4e5ff3911664c3535659c83e05c05d6d809e57d5 to record.txt ; +git add .; +echo git add .; +git commit -m " add README821d31e4f75848ca30bf5b5bede06256907b09f0 " +echo git commit -m add README821d31e4f75848ca30bf5b5bede06256907b09f0 ; +git push origin bv1 +echo git push origin bv1; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv2; +git checkout -b bv2; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard d8b5fe4e7673b03007c243172537bc84b7d7c558 ; +echo git reset --hard d8b5fe4e7673b03007c243172537bc84b7d7c558 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 2 >> record.txt +echo echo d8b5fe4e7673b03007c243172537bc84b7d7c558 to record.txt ; +git add .; +echo git add .; +git commit -m " refactor: add rust framework for builtins." +echo git commit -m refactor: add rust framework for builtins. ; +git push origin bv2 +echo git push origin bv2; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv3; +git checkout -b bv3; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 9edf0cde85de2eb55837061e75b2cf882cc11e55 ; +echo git reset --hard 9edf0cde85de2eb55837061e75b2cf882cc11e55 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 3 >> record.txt +echo echo 9edf0cde85de2eb55837061e75b2cf882cc11e55 to record.txt ; +git add .; +echo git add .; +git commit -m " refactor: move builtins_org to builtins" +echo git commit -m refactor: move builtins_org to builtins ; +git push origin bv3 +echo git push origin bv3; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv4; +git checkout -b bv4; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard d337102476240db1552c114113fb8316a0b9770f ; +echo git reset --hard d337102476240db1552c114113fb8316a0b9770f ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 4 >> record.txt +echo echo d337102476240db1552c114113fb8316a0b9770f to record.txt ; +git add .; +echo git add .; +git commit -m " 添加jobs rust code" +echo git commit -m 添加jobs rust code ; +git push origin bv4 +echo git push origin bv4; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv5; +git checkout -b bv5; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 59f05227deab020a56c870c2b7792104413ad4c7 ; +echo git reset --hard 59f05227deab020a56c870c2b7792104413ad4c7 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 5 >> record.txt +echo echo 59f05227deab020a56c870c2b7792104413ad4c7 to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: add read plugin" +echo git commit -m builtins_rust: add read plugin ; +git push origin bv5 +echo git push origin bv5; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv6; +git checkout -b bv6; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard b33fe3ce7039944a5a18aefcc51c214a174bb25e ; +echo git reset --hard b33fe3ce7039944a5a18aefcc51c214a174bb25e ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 6 >> record.txt +echo echo b33fe3ce7039944a5a18aefcc51c214a174bb25e to record.txt ; +git add .; +echo git add .; +git commit -m " 优化指针传参问题" +echo git commit -m 优化指针传参问题 ; +git push origin bv6 +echo git push origin bv6; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv7; +git checkout -b bv7; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 7e248b9bceea2cb5a53fa8267db60951966f0d8d ; +echo git reset --hard 7e248b9bceea2cb5a53fa8267db60951966f0d8d ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 7 >> record.txt +echo echo 7e248b9bceea2cb5a53fa8267db60951966f0d8d to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "优化指针传参问题" into rustdev" +echo git commit -m Merge "优化指针传参问题" into rustdev ; +git push origin bv7 +echo git push origin bv7; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv8; +git checkout -b bv8; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard ec052778560599039fdbc50419d367acaa63b00a ; +echo git reset --hard ec052778560599039fdbc50419d367acaa63b00a ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 8 >> record.txt +echo echo ec052778560599039fdbc50419d367acaa63b00a to record.txt ; +git add .; +echo git add .; +git commit -m " refactor: add r_execute_cmd function" +echo git commit -m refactor: add r_execute_cmd function ; +git push origin bv8 +echo git push origin bv8; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv9; +git checkout -b bv9; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 9b18ec1b6383bea95912c78856c0442e5185304c ; +echo git reset --hard 9b18ec1b6383bea95912c78856c0442e5185304c ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 9 >> record.txt +echo echo 9b18ec1b6383bea95912c78856c0442e5185304c to record.txt ; +git add .; +echo git add .; +git commit -m " refactor: modify execute_cmd function,part 1" +echo git commit -m refactor: modify execute_cmd function,part 1 ; +git push origin bv9 +echo git push origin bv9; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv10; +git checkout -b bv10; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 1efade178d50e6e98946958ab076d1e1cc3d4676 ; +echo git reset --hard 1efade178d50e6e98946958ab076d1e1cc3d4676 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 10 >> record.txt +echo echo 1efade178d50e6e98946958ab076d1e1cc3d4676 to record.txt ; +git add .; +echo git add .; +git commit -m " 添加fg_bg 命令 rust 代码" +echo git commit -m 添加fg_bg 命令 rust 代码 ; +git push origin bv10 +echo git push origin bv10; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv11; +git checkout -b bv11; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 5a92722cbfd79d4f44b53d29c644de9449d9a9b5 ; +echo git reset --hard 5a92722cbfd79d4f44b53d29c644de9449d9a9b5 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 11 >> record.txt +echo echo 5a92722cbfd79d4f44b53d29c644de9449d9a9b5 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "refactor: modify execute_cmd function,part 1" into rustdev" +echo git commit -m Merge "refactor: modify execute_cmd function,part 1" into rustdev ; +git push origin bv11 +echo git push origin bv11; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv12; +git checkout -b bv12; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 31346f4ffaae817b3242928f473619b7d06d94bd ; +echo git reset --hard 31346f4ffaae817b3242928f473619b7d06d94bd ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 12 >> record.txt +echo echo 31346f4ffaae817b3242928f473619b7d06d94bd to record.txt ; +git add .; +echo git add .; +git commit -m " 添加cd rust 源码,并优化指针判空写法" +echo git commit -m 添加cd rust 源码,并优化指针判空写法 ; +git push origin bv12 +echo git push origin bv12; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv13; +git checkout -b bv13; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 8370b614793b54261b1ef08bdeb0aa36eb8f01a2 ; +echo git reset --hard 8370b614793b54261b1ef08bdeb0aa36eb8f01a2 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 13 >> record.txt +echo echo 8370b614793b54261b1ef08bdeb0aa36eb8f01a2 to record.txt ; +git add .; +echo git add .; +git commit -m " 1 添加fc命令源码 2 优化代码规范,去掉多余的空格 3 添加注册函数" +echo git commit -m 1 添加fc命令源码 2 优化代码规范,去掉多余的空格 3 添加注册函数 ; +git push origin bv13 +echo git push origin bv13; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv14; +git checkout -b bv14; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard f86f4f2bf1290c6874e817b94ab3a5cdb767b12a ; +echo git reset --hard f86f4f2bf1290c6874e817b94ab3a5cdb767b12a ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 14 >> record.txt +echo echo f86f4f2bf1290c6874e817b94ab3a5cdb767b12a to record.txt ; +git add .; +echo git add .; +git commit -m " 1 添加getsopts 命令 rust 源码 2 优化二级指针偏移" +echo git commit -m 1 添加getsopts 命令 rust 源码 2 优化二级指针偏移 ; +git push origin bv14 +echo git push origin bv14; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv15; +git checkout -b bv15; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard ca56a5df9aec33adeb75143077d781d5a807593e ; +echo git reset --hard ca56a5df9aec33adeb75143077d781d5a807593e ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 15 >> record.txt +echo echo ca56a5df9aec33adeb75143077d781d5a807593e to record.txt ; +git add .; +echo git add .; +git commit -m " 1 添加source rust源码 2 纠正STREQN 的实现" +echo git commit -m 1 添加source rust源码 2 纠正STREQN 的实现 ; +git push origin bv15 +echo git push origin bv15; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv16; +git checkout -b bv16; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard ea1d13cf401ea9f93ebe5f4a232c828ed39ffb3b ; +echo git reset --hard ea1d13cf401ea9f93ebe5f4a232c828ed39ffb3b ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 16 >> record.txt +echo echo ea1d13cf401ea9f93ebe5f4a232c828ed39ffb3b to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: update read plugin" +echo git commit -m builtins_rust: update read plugin ; +git push origin bv16 +echo git push origin bv16; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv17; +git checkout -b bv17; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard ddff45d647b3214c0bbb0c2a26dfffbe1ab4d6e1 ; +echo git reset --hard ddff45d647b3214c0bbb0c2a26dfffbe1ab4d6e1 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 17 >> record.txt +echo echo ddff45d647b3214c0bbb0c2a26dfffbe1ab4d6e1 to record.txt ; +git add .; +echo git add .; +git commit -m " 1 declare 命令 rust 源码" +echo git commit -m 1 declare 命令 rust 源码 ; +git push origin bv17 +echo git push origin bv17; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv18; +git checkout -b bv18; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 7edb13a39895925afb2a0b1d3864470aeed94485 ; +echo git reset --hard 7edb13a39895925afb2a0b1d3864470aeed94485 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 18 >> record.txt +echo echo 7edb13a39895925afb2a0b1d3864470aeed94485 to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: add history plugin" +echo git commit -m builtins_rust: add history plugin ; +git push origin bv18 +echo git push origin bv18; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv19; +git checkout -b bv19; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard cb7247d1cf0deff99be280bc5675b1e3376fda6a ; +echo git reset --hard cb7247d1cf0deff99be280bc5675b1e3376fda6a ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 19 >> record.txt +echo echo cb7247d1cf0deff99be280bc5675b1e3376fda6a to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: add kill plugin" +echo git commit -m builtins_rust: add kill plugin ; +git push origin bv19 +echo git push origin bv19; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv20; +git checkout -b bv20; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard d89ed9d3662658da4ff61a5e98d4623f9c791598 ; +echo git reset --hard d89ed9d3662658da4ff61a5e98d4623f9c791598 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 20 >> record.txt +echo echo d89ed9d3662658da4ff61a5e98d4623f9c791598 to record.txt ; +git add .; +echo git add .; +git commit -m " 1 添加bash rust重构pushd 命令源码" +echo git commit -m 1 添加bash rust重构pushd 命令源码 ; +git push origin bv20 +echo git push origin bv20; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv21; +git checkout -b bv21; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard ecff8a6bde802a83b39715d2081706049bc403c8 ; +echo git reset --hard ecff8a6bde802a83b39715d2081706049bc403c8 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 21 >> record.txt +echo echo ecff8a6bde802a83b39715d2081706049bc403c8 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "builtins_rust: add kill plugin" into rustdev" +echo git commit -m Merge "builtins_rust: add kill plugin" into rustdev ; +git push origin bv21 +echo git push origin bv21; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv22; +git checkout -b bv22; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 99fc02b24c9c7eb3afef7387233e5fddf9c6cf11 ; +echo git reset --hard 99fc02b24c9c7eb3afef7387233e5fddf9c6cf11 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 22 >> record.txt +echo echo 99fc02b24c9c7eb3afef7387233e5fddf9c6cf11 to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: add let plugin" +echo git commit -m builtins_rust: add let plugin ; +git push origin bv22 +echo git push origin bv22; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv23; +git checkout -b bv23; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard af476a9df7f9d589fcca6aa83ca9a57b39a2a8f6 ; +echo git reset --hard af476a9df7f9d589fcca6aa83ca9a57b39a2a8f6 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 23 >> record.txt +echo echo af476a9df7f9d589fcca6aa83ca9a57b39a2a8f6 to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: add mapfile plugin" +echo git commit -m builtins_rust: add mapfile plugin ; +git push origin bv23 +echo git push origin bv23; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv24; +git checkout -b bv24; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 39e06294409d398e050d328f3fd09eaf395087e9 ; +echo git reset --hard 39e06294409d398e050d328f3fd09eaf395087e9 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 24 >> record.txt +echo echo 39e06294409d398e050d328f3fd09eaf395087e9 to record.txt ; +git add .; +echo git add .; +git commit -m " 1 添加bash rust重构complete命令" +echo git commit -m 1 添加bash rust重构complete命令 ; +git push origin bv24 +echo git push origin bv24; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv25; +git checkout -b bv25; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 13af07fe9741f6b2db3c85ca4ead4b684fe1ba76 ; +echo git reset --hard 13af07fe9741f6b2db3c85ca4ead4b684fe1ba76 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 25 >> record.txt +echo echo 13af07fe9741f6b2db3c85ca4ead4b684fe1ba76 to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: add printf plugin" +echo git commit -m builtins_rust: add printf plugin ; +git push origin bv25 +echo git push origin bv25; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv26; +git checkout -b bv26; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 040c3852e88aced0f9bedf6ad35cf4ca24ba20b4 ; +echo git reset --hard 040c3852e88aced0f9bedf6ad35cf4ca24ba20b4 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 26 >> record.txt +echo echo 040c3852e88aced0f9bedf6ad35cf4ca24ba20b4 to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: add return plugin" +echo git commit -m builtins_rust: add return plugin ; +git push origin bv26 +echo git push origin bv26; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv27; +git checkout -b bv27; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard e7d0c3856c9b028da878a4f0fac38b3e828da2e5 ; +echo git reset --hard e7d0c3856c9b028da878a4f0fac38b3e828da2e5 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 27 >> record.txt +echo echo e7d0c3856c9b028da878a4f0fac38b3e828da2e5 to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: add shift plugin builtins_rust: add times plugin builtins_rust: add suspend plugin builtins_rust: add test plugin" +echo git commit -m builtins_rust: add shift plugin builtins_rust: add times plugin builtins_rust: add suspend plugin builtins_rust: add test plugin ; +git push origin bv27 +echo git push origin bv27; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv28; +git checkout -b bv28; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard caecab0a8c31785080b688f615abe40042ef3d81 ; +echo git reset --hard caecab0a8c31785080b688f615abe40042ef3d81 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 28 >> record.txt +echo echo caecab0a8c31785080b688f615abe40042ef3d81 to record.txt ; +git add .; +echo git add .; +git commit -m " rush: build with rust so" +echo git commit -m rush: build with rust so ; +git push origin bv28 +echo git push origin bv28; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv29; +git checkout -b bv29; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 5987ab26e969a62593146afaef3f6180fa566c42 ; +echo git reset --hard 5987ab26e969a62593146afaef3f6180fa566c42 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 29 >> record.txt +echo echo 5987ab26e969a62593146afaef3f6180fa566c42 to record.txt ; +git add .; +echo git add .; +git commit -m " rust: modify dylib to staticlib" +echo git commit -m rust: modify dylib to staticlib ; +git push origin bv29 +echo git push origin bv29; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv30; +git checkout -b bv30; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 0dc6bb5a20af927e7c0048dcb97b89ee878de9e2 ; +echo git reset --hard 0dc6bb5a20af927e7c0048dcb97b89ee878de9e2 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 30 >> record.txt +echo echo 0dc6bb5a20af927e7c0048dcb97b89ee878de9e2 to record.txt ; +git add .; +echo git add .; +git commit -m " rust: add colon and builtin" +echo git commit -m rust: add colon and builtin ; +git push origin bv30 +echo git push origin bv30; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv31; +git checkout -b bv31; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard f702f18ebda6077ab396597a807b742ff42f9718 ; +echo git reset --hard f702f18ebda6077ab396597a807b742ff42f9718 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 31 >> record.txt +echo echo f702f18ebda6077ab396597a807b742ff42f9718 to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: add trap plugin" +echo git commit -m builtins_rust: add trap plugin ; +git push origin bv31 +echo git push origin bv31; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv32; +git checkout -b bv32; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard c7d273a9a8614cd0b4cf9fe6ddddd1690df7f3a0 ; +echo git reset --hard c7d273a9a8614cd0b4cf9fe6ddddd1690df7f3a0 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 32 >> record.txt +echo echo c7d273a9a8614cd0b4cf9fe6ddddd1690df7f3a0 to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust:add alias exit help" +echo git commit -m builtins_rust:add alias exit help ; +git push origin bv32 +echo git push origin bv32; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv33; +git checkout -b bv33; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard c9e34358dc4d3932d4f9a02f97493d622431fc11 ; +echo git reset --hard c9e34358dc4d3932d4f9a02f97493d622431fc11 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 33 >> record.txt +echo echo c9e34358dc4d3932d4f9a02f97493d622431fc11 to record.txt ; +git add .; +echo git add .; +git commit -m " rm doc" +echo git commit -m rm doc ; +git push origin bv33 +echo git push origin bv33; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv34; +git checkout -b bv34; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 925106ec5a9c695052d0ed4e96e7684f09d325e0 ; +echo git reset --hard 925106ec5a9c695052d0ed4e96e7684f09d325e0 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 34 >> record.txt +echo echo 925106ec5a9c695052d0ed4e96e7684f09d325e0 to record.txt ; +git add .; +echo git add .; +git commit -m " builtins_rust: add setattr plugin" +echo git commit -m builtins_rust: add setattr plugin ; +git push origin bv34 +echo git push origin bv34; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv35; +git checkout -b bv35; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 460e1f5130d8bb2a75d770296996fb35fa911592 ; +echo git reset --hard 460e1f5130d8bb2a75d770296996fb35fa911592 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 35 >> record.txt +echo echo 460e1f5130d8bb2a75d770296996fb35fa911592 to record.txt ; +git add .; +echo git add .; +git commit -m " add wait umask printf history eval caller bind alias" +echo git commit -m add wait umask printf history eval caller bind alias ; +git push origin bv35 +echo git push origin bv35; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv36; +git checkout -b bv36; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard fee860b67d05e315e66d3507480e4eb22cb4e2ca ; +echo git reset --hard fee860b67d05e315e66d3507480e4eb22cb4e2ca ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 36 >> record.txt +echo echo fee860b67d05e315e66d3507480e4eb22cb4e2ca to record.txt ; +git add .; +echo git add .; +git commit -m " add break ulimit type" +echo git commit -m add break ulimit type ; +git push origin bv36 +echo git push origin bv36; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv37; +git checkout -b bv37; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 38143b58456407750e4f0563dfcfebf27f641bd4 ; +echo git reset --hard 38143b58456407750e4f0563dfcfebf27f641bd4 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 37 >> record.txt +echo echo 38143b58456407750e4f0563dfcfebf27f641bd4 to record.txt ; +git add .; +echo git add .; +git commit -m " add exec and common, modify cd" +echo git commit -m add exec and common, modify cd ; +git push origin bv37 +echo git push origin bv37; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv38; +git checkout -b bv38; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard fd5373f3df3ce757400685b243c3d38e413312be ; +echo git reset --hard fd5373f3df3ce757400685b243c3d38e413312be ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 38 >> record.txt +echo echo fd5373f3df3ce757400685b243c3d38e413312be to record.txt ; +git add .; +echo git add .; +git commit -m " Refactoring code" +echo git commit -m Refactoring code ; +git push origin bv38 +echo git push origin bv38; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv39; +git checkout -b bv39; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 341c12df35c6343148d264c59f61661684f1555a ; +echo git reset --hard 341c12df35c6343148d264c59f61661684f1555a ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 39 >> record.txt +echo echo 341c12df35c6343148d264c59f61661684f1555a to record.txt ; +git add .; +echo git add .; +git commit -m " Refactoring code" +echo git commit -m Refactoring code ; +git push origin bv39 +echo git push origin bv39; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv40; +git checkout -b bv40; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 36dcb3a95e6d2ad7ba1b53796d6f1051002c42f0 ; +echo git reset --hard 36dcb3a95e6d2ad7ba1b53796d6f1051002c42f0 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 40 >> record.txt +echo echo 36dcb3a95e6d2ad7ba1b53796d6f1051002c42f0 to record.txt ; +git add .; +echo git add .; +git commit -m " double commit, cause error Revert "Refactoring code"" +echo git commit -m double commit, cause error Revert "Refactoring code" ; +git push origin bv40 +echo git push origin bv40; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv41; +git checkout -b bv41; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard f04d51713bffbeee31aee689b08fd0220c8ca75d ; +echo git reset --hard f04d51713bffbeee31aee689b08fd0220c8ca75d ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 41 >> record.txt +echo echo f04d51713bffbeee31aee689b08fd0220c8ca75d to record.txt ; +git add .; +echo git add .; +git commit -m " modify common" +echo git commit -m modify common ; +git push origin bv41 +echo git push origin bv41; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv42; +git checkout -b bv42; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 6466675c76bcbc771c5939410065d97ddda05ca4 ; +echo git reset --hard 6466675c76bcbc771c5939410065d97ddda05ca4 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 42 >> record.txt +echo echo 6466675c76bcbc771c5939410065d97ddda05ca4 to record.txt ; +git add .; +echo git add .; +git commit -m " add set command" +echo git commit -m add set command ; +git push origin bv42 +echo git push origin bv42; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv43; +git checkout -b bv43; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 554f7a914ed1a53c820a1e94d00726b3253d7903 ; +echo git reset --hard 554f7a914ed1a53c820a1e94d00726b3253d7903 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 43 >> record.txt +echo echo 554f7a914ed1a53c820a1e94d00726b3253d7903 to record.txt ; +git add .; +echo git add .; +git commit -m " fix compile error" +echo git commit -m fix compile error ; +git push origin bv43 +echo git push origin bv43; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv44; +git checkout -b bv44; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 411367dd7a0a2b40c7b921dd6c47dcf5e9059158 ; +echo git reset --hard 411367dd7a0a2b40c7b921dd6c47dcf5e9059158 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 44 >> record.txt +echo echo 411367dd7a0a2b40c7b921dd6c47dcf5e9059158 to record.txt ; +git add .; +echo git add .; +git commit -m " modify command.rs file" +echo git commit -m modify command.rs file ; +git push origin bv44 +echo git push origin bv44; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv45; +git checkout -b bv45; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 1fb55c5ecf5576943ba3643c2b76f8a04a5fe152 ; +echo git reset --hard 1fb55c5ecf5576943ba3643c2b76f8a04a5fe152 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 45 >> record.txt +echo echo 1fb55c5ecf5576943ba3643c2b76f8a04a5fe152 to record.txt ; +git add .; +echo git add .; +git commit -m " fix coredump" +echo git commit -m fix coredump ; +git push origin bv45 +echo git push origin bv45; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv46; +git checkout -b bv46; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 070aa64329ebfbdec61bd04e36f69cbbfcdbcd48 ; +echo git reset --hard 070aa64329ebfbdec61bd04e36f69cbbfcdbcd48 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 46 >> record.txt +echo echo 070aa64329ebfbdec61bd04e36f69cbbfcdbcd48 to record.txt ; +git add .; +echo git add .; +git commit -m " fix shopt setflag error" +echo git commit -m fix shopt setflag error ; +git push origin bv46 +echo git push origin bv46; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv47; +git checkout -b bv47; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard df7984f479c17805e976634718c63b5034cdd517 ; +echo git reset --hard df7984f479c17805e976634718c63b5034cdd517 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 47 >> record.txt +echo echo df7984f479c17805e976634718c63b5034cdd517 to record.txt ; +git add .; +echo git add .; +git commit -m " fix shopt error" +echo git commit -m fix shopt error ; +git push origin bv47 +echo git push origin bv47; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv48; +git checkout -b bv48; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 70b4faaf74e318d95e30c697592f84b571a0fe24 ; +echo git reset --hard 70b4faaf74e318d95e30c697592f84b571a0fe24 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 48 >> record.txt +echo echo 70b4faaf74e318d95e30c697592f84b571a0fe24 to record.txt ; +git add .; +echo git add .; +git commit -m " fix build error" +echo git commit -m fix build error ; +git push origin bv48 +echo git push origin bv48; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv49; +git checkout -b bv49; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 0e0395002a236f4e1c8397579b79954e0dc2a3f5 ; +echo git reset --hard 0e0395002a236f4e1c8397579b79954e0dc2a3f5 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 49 >> record.txt +echo echo 0e0395002a236f4e1c8397579b79954e0dc2a3f5 to record.txt ; +git add .; +echo git add .; +git commit -m " modify jobs" +echo git commit -m modify jobs ; +git push origin bv49 +echo git push origin bv49; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv50; +git checkout -b bv50; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 95a4108faf4b7093700e2d9abf43798fc8f1aa35 ; +echo git reset --hard 95a4108faf4b7093700e2d9abf43798fc8f1aa35 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 50 >> record.txt +echo echo 95a4108faf4b7093700e2d9abf43798fc8f1aa35 to record.txt ; +git add .; +echo git add .; +git commit -m " refact bind" +echo git commit -m refact bind ; +git push origin bv50 +echo git push origin bv50; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv51; +git checkout -b bv51; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 717301e3070467f19d156bc01c1b46c8aa6b9905 ; +echo git reset --hard 717301e3070467f19d156bc01c1b46c8aa6b9905 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 51 >> record.txt +echo echo 717301e3070467f19d156bc01c1b46c8aa6b9905 to record.txt ; +git add .; +echo git add .; +git commit -m " merge common from alias to eval" +echo git commit -m merge common from alias to eval ; +git push origin bv51 +echo git push origin bv51; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv52; +git checkout -b bv52; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard f045dbbd795ae6c0e35c694ce5bbc670e45e3cc0 ; +echo git reset --hard f045dbbd795ae6c0e35c694ce5bbc670e45e3cc0 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 52 >> record.txt +echo echo f045dbbd795ae6c0e35c694ce5bbc670e45e3cc0 to record.txt ; +git add .; +echo git add .; +git commit -m " refact exec exit" +echo git commit -m refact exec exit ; +git push origin bv52 +echo git push origin bv52; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv53; +git checkout -b bv53; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 82d6bb32c9bf058106dafec13d81fd61faeb01b3 ; +echo git reset --hard 82d6bb32c9bf058106dafec13d81fd61faeb01b3 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 53 >> record.txt +echo echo 82d6bb32c9bf058106dafec13d81fd61faeb01b3 to record.txt ; +git add .; +echo git add .; +git commit -m " check mapfile printf read suspend test time trap and merge refact common" +echo git commit -m check mapfile printf read suspend test time trap and merge refact common ; +git push origin bv53 +echo git push origin bv53; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv54; +git checkout -b bv54; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 10cd55321a7387a9ff00915920b884d5717372ae ; +echo git reset --hard 10cd55321a7387a9ff00915920b884d5717372ae ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 54 >> record.txt +echo echo 10cd55321a7387a9ff00915920b884d5717372ae to record.txt ; +git add .; +echo git add .; +git commit -m " Unified Interface parameter type and Implement factory patterns" +echo git commit -m Unified Interface parameter type and Implement factory patterns ; +git push origin bv54 +echo git push origin bv54; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv55; +git checkout -b bv55; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 9222a0d2cec8bfa43152b8a1da12b51046128068 ; +echo git reset --hard 9222a0d2cec8bfa43152b8a1da12b51046128068 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 55 >> record.txt +echo echo 9222a0d2cec8bfa43152b8a1da12b51046128068 to record.txt ; +git add .; +echo git add .; +git commit -m " fix history can not -d error" +echo git commit -m fix history can not -d error ; +git push origin bv55 +echo git push origin bv55; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv56; +git checkout -b bv56; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard e51b65d434a34e8cc56cb94b65acdc339020207c ; +echo git reset --hard e51b65d434a34e8cc56cb94b65acdc339020207c ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 56 >> record.txt +echo echo e51b65d434a34e8cc56cb94b65acdc339020207c to record.txt ; +git add .; +echo git add .; +git commit -m " modify read -t -d -e -n" +echo git commit -m modify read -t -d -e -n ; +git push origin bv56 +echo git push origin bv56; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv57; +git checkout -b bv57; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 724977750ec2acaf542bbec602e06c49d73a217c ; +echo git reset --hard 724977750ec2acaf542bbec602e06c49d73a217c ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 57 >> record.txt +echo echo 724977750ec2acaf542bbec602e06c49d73a217c to record.txt ; +git add .; +echo git add .; +git commit -m " use static mut var" +echo git commit -m use static mut var ; +git push origin bv57 +echo git push origin bv57; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv58; +git checkout -b bv58; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 79c007027d5a17e7c6a3183f6e7c0f38381bbb6b ; +echo git reset --hard 79c007027d5a17e7c6a3183f6e7c0f38381bbb6b ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 58 >> record.txt +echo echo 79c007027d5a17e7c6a3183f6e7c0f38381bbb6b to record.txt ; +git add .; +echo git add .; +git commit -m " succeed called factory" +echo git commit -m succeed called factory ; +git push origin bv58 +echo git push origin bv58; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv59; +git checkout -b bv59; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 0f7a654ee1022599fcb37478283b6734f83016ac ; +echo git reset --hard 0f7a654ee1022599fcb37478283b6734f83016ac ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 59 >> record.txt +echo echo 0f7a654ee1022599fcb37478283b6734f83016ac to record.txt ; +git add .; +echo git add .; +git commit -m " modify exec" +echo git commit -m modify exec ; +git push origin bv59 +echo git push origin bv59; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv60; +git checkout -b bv60; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard e7be711a2d3501268fe1db0171885580480894c7 ; +echo git reset --hard e7be711a2d3501268fe1db0171885580480894c7 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 60 >> record.txt +echo echo e7be711a2d3501268fe1db0171885580480894c7 to record.txt ; +git add .; +echo git add .; +git commit -m " fixed some command segmentation fault" +echo git commit -m fixed some command segmentation fault ; +git push origin bv60 +echo git push origin bv60; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv61; +git checkout -b bv61; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 5b352d9f227a436170d90cd861b576a27de649c4 ; +echo git reset --hard 5b352d9f227a436170d90cd861b576a27de649c4 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 61 >> record.txt +echo echo 5b352d9f227a436170d90cd861b576a27de649c4 to record.txt ; +git add .; +echo git add .; +git commit -m " fixed readonly and export cannot jump loop" +echo git commit -m fixed readonly and export cannot jump loop ; +git push origin bv61 +echo git push origin bv61; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv62; +git checkout -b bv62; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 552bc4a75c9b905a950c2ca699435452b65f9d45 ; +echo git reset --hard 552bc4a75c9b905a950c2ca699435452b65f9d45 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 62 >> record.txt +echo echo 552bc4a75c9b905a950c2ca699435452b65f9d45 to record.txt ; +git add .; +echo git add .; +git commit -m " fixed test suspend shift error" +echo git commit -m fixed test suspend shift error ; +git push origin bv62 +echo git push origin bv62; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv63; +git checkout -b bv63; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 5055706c68c1b5a574e8c345acde65b9c490306f ; +echo git reset --hard 5055706c68c1b5a574e8c345acde65b9c490306f ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 63 >> record.txt +echo echo 5055706c68c1b5a574e8c345acde65b9c490306f to record.txt ; +git add .; +echo git add .; +git commit -m " fixed source error" +echo git commit -m fixed source error ; +git push origin bv63 +echo git push origin bv63; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv64; +git checkout -b bv64; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard e361ba0cbb7a4f819b96ef05329cb9b63e3c7642 ; +echo git reset --hard e361ba0cbb7a4f819b96ef05329cb9b63e3c7642 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 64 >> record.txt +echo echo e361ba0cbb7a4f819b96ef05329cb9b63e3c7642 to record.txt ; +git add .; +echo git add .; +git commit -m " fixed cmd --help error" +echo git commit -m fixed cmd --help error ; +git push origin bv64 +echo git push origin bv64; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv65; +git checkout -b bv65; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard b10fbeaa6b641b3e83d3144fb6e0de0253be7ec1 ; +echo git reset --hard b10fbeaa6b641b3e83d3144fb6e0de0253be7ec1 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 65 >> record.txt +echo echo b10fbeaa6b641b3e83d3144fb6e0de0253be7ec1 to record.txt ; +git add .; +echo git add .; +git commit -m " add usage for ulimit" +echo git commit -m add usage for ulimit ; +git push origin bv65 +echo git push origin bv65; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv66; +git checkout -b bv66; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 97b2b53031602fe0a6ab639a2078a399d12f96d4 ; +echo git reset --hard 97b2b53031602fe0a6ab639a2078a399d12f96d4 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 66 >> record.txt +echo echo 97b2b53031602fe0a6ab639a2078a399d12f96d4 to record.txt ; +git add .; +echo git add .; +git commit -m " convert i8 to c_char" +echo git commit -m convert i8 to c_char ; +git push origin bv66 +echo git push origin bv66; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv67; +git checkout -b bv67; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard b92d42bd77ba782f7c5546c41278e1665f7783f5 ; +echo git reset --hard b92d42bd77ba782f7c5546c41278e1665f7783f5 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 67 >> record.txt +echo echo b92d42bd77ba782f7c5546c41278e1665f7783f5 to record.txt ; +git add .; +echo git add .; +git commit -m " git add cargo vendor files" +echo git commit -m git add cargo vendor files ; +git push origin bv67 +echo git push origin bv67; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv68; +git checkout -b bv68; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 1194dc2c7d5ca8f0ec096a25faccd066ae1c57bc ; +echo git reset --hard 1194dc2c7d5ca8f0ec096a25faccd066ae1c57bc ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 68 >> record.txt +echo echo 1194dc2c7d5ca8f0ec096a25faccd066ae1c57bc to record.txt ; +git add .; +echo git add .; +git commit -m " add translations file" +echo git commit -m add translations file ; +git push origin bv68 +echo git push origin bv68; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv69; +git checkout -b bv69; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard cb394fcaa843187d6d24ad5fe33998e78c6c9527 ; +echo git reset --hard cb394fcaa843187d6d24ad5fe33998e78c6c9527 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 69 >> record.txt +echo echo cb394fcaa843187d6d24ad5fe33998e78c6c9527 to record.txt ; +git add .; +echo git add .; +git commit -m " add translatins file 2" +echo git commit -m add translatins file 2 ; +git push origin bv69 +echo git push origin bv69; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv70; +git checkout -b bv70; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 038c321f2f28a1b8688c68c86974d912b38a5803 ; +echo git reset --hard 038c321f2f28a1b8688c68c86974d912b38a5803 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 70 >> record.txt +echo echo 038c321f2f28a1b8688c68c86974d912b38a5803 to record.txt ; +git add .; +echo git add .; +git commit -m " add translation file 3" +echo git commit -m add translation file 3 ; +git push origin bv70 +echo git push origin bv70; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv71; +git checkout -b bv71; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard f688c1d7c41fe6ae6d27f5b82251402bde322339 ; +echo git reset --hard f688c1d7c41fe6ae6d27f5b82251402bde322339 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 71 >> record.txt +echo echo f688c1d7c41fe6ae6d27f5b82251402bde322339 to record.txt ; +git add .; +echo git add .; +git commit -m " modify execute retrun error call read: factory:read->return" +echo git commit -m modify execute retrun error call read: factory:read->return ; +git push origin bv71 +echo git push origin bv71; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv72; +git checkout -b bv72; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 89b6ba202761304458c7faffc9ad1a7c5de0172f ; +echo git reset --hard 89b6ba202761304458c7faffc9ad1a7c5de0172f ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 72 >> record.txt +echo echo 89b6ba202761304458c7faffc9ad1a7c5de0172f to record.txt ; +git add .; +echo git add .; +git commit -m " remove print msg" +echo git commit -m remove print msg ; +git push origin bv72 +echo git push origin bv72; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv73; +git checkout -b bv73; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 8417230f57e8eaea155ab6809bf88c4ee91c0aff ; +echo git reset --hard 8417230f57e8eaea155ab6809bf88c4ee91c0aff ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 73 >> record.txt +echo echo 8417230f57e8eaea155ab6809bf88c4ee91c0aff to record.txt ; +git add .; +echo git add .; +git commit -m " sync from rpmbuild,remove doc and other file" +echo git commit -m sync from rpmbuild,remove doc and other file ; +git push origin bv73 +echo git push origin bv73; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv74; +git checkout -b bv74; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 3d84851489913216c57bad0a471725f167308cee ; +echo git reset --hard 3d84851489913216c57bad0a471725f167308cee ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 74 >> record.txt +echo echo 3d84851489913216c57bad0a471725f167308cee to record.txt ; +git add .; +echo git add .; +git commit -m " fix kill -l and trap -l" +echo git commit -m fix kill -l and trap -l ; +git push origin bv74 +echo git push origin bv74; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv75; +git checkout -b bv75; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 72069ebbbfd134eec710ab17660e4d67b9f307ac ; +echo git reset --hard 72069ebbbfd134eec710ab17660e4d67b9f307ac ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 75 >> record.txt +echo echo 72069ebbbfd134eec710ab17660e4d67b9f307ac to record.txt ; +git add .; +echo git add .; +git commit -m " modify transfile path" +echo git commit -m modify transfile path ; +git push origin bv75 +echo git push origin bv75; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv76; +git checkout -b bv76; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 1887d5377ba409fb3692805654de96165cc85161 ; +echo git reset --hard 1887d5377ba409fb3692805654de96165cc85161 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 76 >> record.txt +echo echo 1887d5377ba409fb3692805654de96165cc85161 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "modify transfile path" into rustdev" +echo git commit -m Merge "modify transfile path" into rustdev ; +git push origin bv76 +echo git push origin bv76; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv77; +git checkout -b bv77; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 20b615f01c67efa857592872ce48134d2e9af5f2 ; +echo git reset --hard 20b615f01c67efa857592872ce48134d2e9af5f2 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 77 >> record.txt +echo echo 20b615f01c67efa857592872ce48134d2e9af5f2 to record.txt ; +git add .; +echo git add .; +git commit -m " fix: 160365 rash disown execute error without parameter" +echo git commit -m fix: 160365 rash disown execute error without parameter ; +git push origin bv77 +echo git push origin bv77; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv78; +git checkout -b bv78; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard e64650fdabf3b511d482b687399f5b0f50464a1d ; +echo git reset --hard e64650fdabf3b511d482b687399f5b0f50464a1d ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 78 >> record.txt +echo echo e64650fdabf3b511d482b687399f5b0f50464a1d to record.txt ; +git add .; +echo git add .; +git commit -m " realize some command translation" +echo git commit -m realize some command translation ; +git push origin bv78 +echo git push origin bv78; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv79; +git checkout -b bv79; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 0b339314d05ca826831e071b3405abe09c463765 ; +echo git reset --hard 0b339314d05ca826831e071b3405abe09c463765 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 79 >> record.txt +echo echo 0b339314d05ca826831e071b3405abe09c463765 to record.txt ; +git add .; +echo git add .; +git commit -m " change LANGUAGE to LANG" +echo git commit -m change LANGUAGE to LANG ; +git push origin bv79 +echo git push origin bv79; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv80; +git checkout -b bv80; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 42cc1a5b57a384c6f9028251078e72ed7a7beafd ; +echo git reset --hard 42cc1a5b57a384c6f9028251078e72ed7a7beafd ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 80 >> record.txt +echo echo 42cc1a5b57a384c6f9028251078e72ed7a7beafd to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "realize some command translation" into rustdev" +echo git commit -m Merge "realize some command translation" into rustdev ; +git push origin bv80 +echo git push origin bv80; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv81; +git checkout -b bv81; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard e890c4eb63ebcc754f1669b1445b448db96a4da9 ; +echo git reset --hard e890c4eb63ebcc754f1669b1445b448db96a4da9 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 81 >> record.txt +echo echo e890c4eb63ebcc754f1669b1445b448db96a4da9 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "change LANGUAGE to LANG" into rustdev" +echo git commit -m Merge "change LANGUAGE to LANG" into rustdev ; +git push origin bv81 +echo git push origin bv81; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv82; +git checkout -b bv82; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard fe184ac9ef5882c2c4fffc0912bb7ab62ffaeb93 ; +echo git reset --hard fe184ac9ef5882c2c4fffc0912bb7ab62ffaeb93 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 82 >> record.txt +echo echo fe184ac9ef5882c2c4fffc0912bb7ab62ffaeb93 to record.txt ; +git add .; +echo git add .; +git commit -m " fix 160413 umask fmt error" +echo git commit -m fix 160413 umask fmt error ; +git push origin bv82 +echo git push origin bv82; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv83; +git checkout -b bv83; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard f1567e0f82b3ca20388da8d412e5957acf64d5b0 ; +echo git reset --hard f1567e0f82b3ca20388da8d412e5957acf64d5b0 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 83 >> record.txt +echo echo f1567e0f82b3ca20388da8d412e5957acf64d5b0 to record.txt ; +git add .; +echo git add .; +git commit -m " fixed help -m err" +echo git commit -m fixed help -m err ; +git push origin bv83 +echo git push origin bv83; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv84; +git checkout -b bv84; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard a545f8fd3b81d3e6b19b4a868f1d8ee0d2e5ed73 ; +echo git reset --hard a545f8fd3b81d3e6b19b4a868f1d8ee0d2e5ed73 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 84 >> record.txt +echo echo a545f8fd3b81d3e6b19b4a868f1d8ee0d2e5ed73 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "fix 160413 umask fmt error" into rustdev" +echo git commit -m Merge "fix 160413 umask fmt error" into rustdev ; +git push origin bv84 +echo git push origin bv84; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv85; +git checkout -b bv85; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 2d8cdcf350720956b0fda3c64f93d013d2ee17e2 ; +echo git reset --hard 2d8cdcf350720956b0fda3c64f93d013d2ee17e2 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 85 >> record.txt +echo echo 2d8cdcf350720956b0fda3c64f93d013d2ee17e2 to record.txt ; +git add .; +echo git add .; +git commit -m " fix :160145 alias fmt error" +echo git commit -m fix :160145 alias fmt error ; +git push origin bv85 +echo git push origin bv85; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv86; +git checkout -b bv86; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 06ca889c4860d1e4e25d2dce77d991d11919a307 ; +echo git reset --hard 06ca889c4860d1e4e25d2dce77d991d11919a307 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 86 >> record.txt +echo echo 06ca889c4860d1e4e25d2dce77d991d11919a307 to record.txt ; +git add .; +echo git add .; +git commit -m " fix: disown -r option error" +echo git commit -m fix: disown -r option error ; +git push origin bv86 +echo git push origin bv86; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv87; +git checkout -b bv87; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard c750605cf5c673b50183671f79858ae154c407a0 ; +echo git reset --hard c750605cf5c673b50183671f79858ae154c407a0 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 87 >> record.txt +echo echo c750605cf5c673b50183671f79858ae154c407a0 to record.txt ; +git add .; +echo git add .; +git commit -m " change opt variant to mut" +echo git commit -m change opt variant to mut ; +git push origin bv87 +echo git push origin bv87; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv88; +git checkout -b bv88; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 808801d81756188f841510017dbaeace519da23c ; +echo git reset --hard 808801d81756188f841510017dbaeace519da23c ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 88 >> record.txt +echo echo 808801d81756188f841510017dbaeace519da23c to record.txt ; +git add .; +echo git add .; +git commit -m " fix fc command" +echo git commit -m fix fc command ; +git push origin bv88 +echo git push origin bv88; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv89; +git checkout -b bv89; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 68e37bbcc3d58e84df4b4854f69d0673f7cc7d58 ; +echo git reset --hard 68e37bbcc3d58e84df4b4854f69d0673f7cc7d58 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 89 >> record.txt +echo echo 68e37bbcc3d58e84df4b4854f69d0673f7cc7d58 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "fix fc command" into rustdev" +echo git commit -m Merge "fix fc command" into rustdev ; +git push origin bv89 +echo git push origin bv89; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv90; +git checkout -b bv90; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 8e0d9c53896edd0eb62c6e0ba4e424c1fc925230 ; +echo git reset --hard 8e0d9c53896edd0eb62c6e0ba4e424c1fc925230 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 90 >> record.txt +echo echo 8e0d9c53896edd0eb62c6e0ba4e424c1fc925230 to record.txt ; +git add .; +echo git add .; +git commit -m " realize translation command --help" +echo git commit -m realize translation command --help ; +git push origin bv90 +echo git push origin bv90; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv91; +git checkout -b bv91; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 7c1d6e6eaaa602936c960663bacaf80e3dcf3965 ; +echo git reset --hard 7c1d6e6eaaa602936c960663bacaf80e3dcf3965 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 91 >> record.txt +echo echo 7c1d6e6eaaa602936c960663bacaf80e3dcf3965 to record.txt ; +git add .; +echo git add .; +git commit -m " fix pushd -l, popd -l, dirs command" +echo git commit -m fix pushd -l, popd -l, dirs command ; +git push origin bv91 +echo git push origin bv91; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv92; +git checkout -b bv92; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 5dc4c4767ea225b5270f998a9cb06bd2b368118c ; +echo git reset --hard 5dc4c4767ea225b5270f998a9cb06bd2b368118c ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 92 >> record.txt +echo echo 5dc4c4767ea225b5270f998a9cb06bd2b368118c to record.txt ; +git add .; +echo git add .; +git commit -m " fixed declare -i err" +echo git commit -m fixed declare -i err ; +git push origin bv92 +echo git push origin bv92; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv93; +git checkout -b bv93; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 972471884b58c115f9c611a84107aa938c058a32 ; +echo git reset --hard 972471884b58c115f9c611a84107aa938c058a32 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 93 >> record.txt +echo echo 972471884b58c115f9c611a84107aa938c058a32 to record.txt ; +git add .; +echo git add .; +git commit -m " fixed declare error" +echo git commit -m fixed declare error ; +git push origin bv93 +echo git push origin bv93; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv94; +git checkout -b bv94; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 102dae472a96e7c811f5e99b3c756887da4253a4 ; +echo git reset --hard 102dae472a96e7c811f5e99b3c756887da4253a4 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 94 >> record.txt +echo echo 102dae472a96e7c811f5e99b3c756887da4253a4 to record.txt ; +git add .; +echo git add .; +git commit -m " fix typeseterror:exec_cmd: typeset to declare" +echo git commit -m fix typeseterror:exec_cmd: typeset to declare ; +git push origin bv94 +echo git push origin bv94; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv95; +git checkout -b bv95; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 06d456ee7b52becc2e77875c9a0a5d4308bd1828 ; +echo git reset --hard 06d456ee7b52becc2e77875c9a0a5d4308bd1828 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 95 >> record.txt +echo echo 06d456ee7b52becc2e77875c9a0a5d4308bd1828 to record.txt ; +git add .; +echo git add .; +git commit -m " change help longdoc format" +echo git commit -m change help longdoc format ; +git push origin bv95 +echo git push origin bv95; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv96; +git checkout -b bv96; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 1d30a26ae0817569e83d69e84a08e7999dbecc68 ; +echo git reset --hard 1d30a26ae0817569e83d69e84a08e7999dbecc68 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 96 >> record.txt +echo echo 1d30a26ae0817569e83d69e84a08e7999dbecc68 to record.txt ; +git add .; +echo git add .; +git commit -m " modify project name rash->utshell" +echo git commit -m modify project name rash->utshell ; +git push origin bv96 +echo git push origin bv96; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv97; +git checkout -b bv97; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard d0537a70467845b4caf25863006bbd142c2241dd ; +echo git reset --hard d0537a70467845b4caf25863006bbd142c2241dd ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 97 >> record.txt +echo echo d0537a70467845b4caf25863006bbd142c2241dd to record.txt ; +git add .; +echo git add .; +git commit -m " fixed declare -p error" +echo git commit -m fixed declare -p error ; +git push origin bv97 +echo git push origin bv97; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv98; +git checkout -b bv98; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard fb327d67a0e9cad54228b940a895d4d1c9ab5ad0 ; +echo git reset --hard fb327d67a0e9cad54228b940a895d4d1c9ab5ad0 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 98 >> record.txt +echo echo fb327d67a0e9cad54228b940a895d4d1c9ab5ad0 to record.txt ; +git add .; +echo git add .; +git commit -m " chage ptr move as offset" +echo git commit -m chage ptr move as offset ; +git push origin bv98 +echo git push origin bv98; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv99; +git checkout -b bv99; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard a06caded61b6a43bb89159be04a0eb9af738e711 ; +echo git reset --hard a06caded61b6a43bb89159be04a0eb9af738e711 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 99 >> record.txt +echo echo a06caded61b6a43bb89159be04a0eb9af738e711 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "fix pushd -l, popd -l, dirs command" into rustdev" +echo git commit -m Merge "fix pushd -l, popd -l, dirs command" into rustdev ; +git push origin bv99 +echo git push origin bv99; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv100; +git checkout -b bv100; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 13556a85f76698547e08c7fa46b8a88301dc73a5 ; +echo git reset --hard 13556a85f76698547e08c7fa46b8a88301dc73a5 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 100 >> record.txt +echo echo 13556a85f76698547e08c7fa46b8a88301dc73a5 to record.txt ; +git add .; +echo git add .; +git commit -m " fixed ulimit cmd print format err" +echo git commit -m fixed ulimit cmd print format err ; +git push origin bv100 +echo git push origin bv100; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv101; +git checkout -b bv101; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard e76865581185412bd15fb89ef5e7e36258212150 ; +echo git reset --hard e76865581185412bd15fb89ef5e7e36258212150 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 101 >> record.txt +echo echo e76865581185412bd15fb89ef5e7e36258212150 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "fixed ulimit cmd print format err" into rustdev" +echo git commit -m Merge "fixed ulimit cmd print format err" into rustdev ; +git push origin bv101 +echo git push origin bv101; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv102; +git checkout -b bv102; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard d9ed5098a46ac6bcd9addc2c1e97a3195ac022bd ; +echo git reset --hard d9ed5098a46ac6bcd9addc2c1e97a3195ac022bd ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 102 >> record.txt +echo echo d9ed5098a46ac6bcd9addc2c1e97a3195ac022bd to record.txt ; +git add .; +echo git add .; +git commit -m " fix printf %f" +echo git commit -m fix printf %f ; +git push origin bv102 +echo git push origin bv102; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv103; +git checkout -b bv103; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard ad9027e057c5a227be8159b9a6eb31d5e8641309 ; +echo git reset --hard ad9027e057c5a227be8159b9a6eb31d5e8641309 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 103 >> record.txt +echo echo ad9027e057c5a227be8159b9a6eb31d5e8641309 to record.txt ; +git add .; +echo git add .; +git commit -m " change en-US translztion format" +echo git commit -m change en-US translztion format ; +git push origin bv103 +echo git push origin bv103; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv104; +git checkout -b bv104; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 204c0925c7d148257a8d6102e82e4e8dccf53cb3 ; +echo git reset --hard 204c0925c7d148257a8d6102e82e4e8dccf53cb3 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 104 >> record.txt +echo echo 204c0925c7d148257a8d6102e82e4e8dccf53cb3 to record.txt ; +git add .; +echo git add .; +git commit -m " fixed declare -a err" +echo git commit -m fixed declare -a err ; +git push origin bv104 +echo git push origin bv104; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv105; +git checkout -b bv105; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard fea9649b3799f2e6de35ebca49b4c771f73d1c92 ; +echo git reset --hard fea9649b3799f2e6de35ebca49b4c771f73d1c92 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 105 >> record.txt +echo echo fea9649b3799f2e6de35ebca49b4c771f73d1c92 to record.txt ; +git add .; +echo git add .; +git commit -m " fix type -a" +echo git commit -m fix type -a ; +git push origin bv105 +echo git push origin bv105; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv106; +git checkout -b bv106; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 690d56a0f3209fdd4559d855674e78d8107920b8 ; +echo git reset --hard 690d56a0f3209fdd4559d855674e78d8107920b8 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 106 >> record.txt +echo echo 690d56a0f3209fdd4559d855674e78d8107920b8 to record.txt ; +git add .; +echo git add .; +git commit -m " fix enable -a" +echo git commit -m fix enable -a ; +git push origin bv106 +echo git push origin bv106; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv107; +git checkout -b bv107; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 3788e0451fcd072fabf44cf96de23d723676c13b ; +echo git reset --hard 3788e0451fcd072fabf44cf96de23d723676c13b ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 107 >> record.txt +echo echo 3788e0451fcd072fabf44cf96de23d723676c13b to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "change en-US translztion format" into rustdev" +echo git commit -m Merge "change en-US translztion format" into rustdev ; +git push origin bv107 +echo git push origin bv107; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv108; +git checkout -b bv108; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard e5b99f66029850a11f429c19fce3f614368a2748 ; +echo git reset --hard e5b99f66029850a11f429c19fce3f614368a2748 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 108 >> record.txt +echo echo e5b99f66029850a11f429c19fce3f614368a2748 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "fix enable -a" into rustdev" +echo git commit -m Merge "fix enable -a" into rustdev ; +git push origin bv108 +echo git push origin bv108; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv109; +git checkout -b bv109; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard da17d91645784496a5edcdde6f882389397127e1 ; +echo git reset --hard da17d91645784496a5edcdde6f882389397127e1 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 109 >> record.txt +echo echo da17d91645784496a5edcdde6f882389397127e1 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "fixed declare -a err" into rustdev" +echo git commit -m Merge "fixed declare -a err" into rustdev ; +git push origin bv109 +echo git push origin bv109; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv110; +git checkout -b bv110; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard af506d1a9f0e9542545f613db3c06887929d6d12 ; +echo git reset --hard af506d1a9f0e9542545f613db3c06887929d6d12 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 110 >> record.txt +echo echo af506d1a9f0e9542545f613db3c06887929d6d12 to record.txt ; +git add .; +echo git add .; +git commit -m " fix typeset -f function" +echo git commit -m fix typeset -f function ; +git push origin bv110 +echo git push origin bv110; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv111; +git checkout -b bv111; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 90a00b5509b085d1439800dff068bd96a26d277a ; +echo git reset --hard 90a00b5509b085d1439800dff068bd96a26d277a ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 111 >> record.txt +echo echo 90a00b5509b085d1439800dff068bd96a26d277a to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "fix typeset -f function" into rustdev" +echo git commit -m Merge "fix typeset -f function" into rustdev ; +git push origin bv111 +echo git push origin bv111; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv112; +git checkout -b bv112; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 3b850c3821bdc84882ef7ed8b779555e179afd25 ; +echo git reset --hard 3b850c3821bdc84882ef7ed8b779555e179afd25 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 112 >> record.txt +echo echo 3b850c3821bdc84882ef7ed8b779555e179afd25 to record.txt ; +git add .; +echo git add .; +git commit -m " add traslations for type" +echo git commit -m add traslations for type ; +git push origin bv112 +echo git push origin bv112; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv113; +git checkout -b bv113; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard ada589369c646185763a8c5253df5955a77e5d61 ; +echo git reset --hard ada589369c646185763a8c5253df5955a77e5d61 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 113 >> record.txt +echo echo ada589369c646185763a8c5253df5955a77e5d61 to record.txt ; +git add .; +echo git add .; +git commit -m " fix complete and compgen bug" +echo git commit -m fix complete and compgen bug ; +git push origin bv113 +echo git push origin bv113; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv114; +git checkout -b bv114; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard eab505fb31093598e39e6e7d3e39448e279923f2 ; +echo git reset --hard eab505fb31093598e39e6e7d3e39448e279923f2 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 114 >> record.txt +echo echo eab505fb31093598e39e6e7d3e39448e279923f2 to record.txt ; +git add .; +echo git add .; +git commit -m " fix memery err" +echo git commit -m fix memery err ; +git push origin bv114 +echo git push origin bv114; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv115; +git checkout -b bv115; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard f49cd3a3cbdb079d4f9aa09b178f6024dabca168 ; +echo git reset --hard f49cd3a3cbdb079d4f9aa09b178f6024dabca168 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 115 >> record.txt +echo echo f49cd3a3cbdb079d4f9aa09b178f6024dabca168 to record.txt ; +git add .; +echo git add .; +git commit -m " fix enable -n" +echo git commit -m fix enable -n ; +git push origin bv115 +echo git push origin bv115; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv116; +git checkout -b bv116; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard aedfa436429724000dfdbc042e5ec6cf149b5fc3 ; +echo git reset --hard aedfa436429724000dfdbc042e5ec6cf149b5fc3 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 116 >> record.txt +echo echo aedfa436429724000dfdbc042e5ec6cf149b5fc3 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "fix enable -n" into rustdev" +echo git commit -m Merge "fix enable -n" into rustdev ; +git push origin bv116 +echo git push origin bv116; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv117; +git checkout -b bv117; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 3ba426b53b2c4bf27c12eb98c4de176df471c46d ; +echo git reset --hard 3ba426b53b2c4bf27c12eb98c4de176df471c46d ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 117 >> record.txt +echo echo 3ba426b53b2c4bf27c12eb98c4de176df471c46d to record.txt ; +git add .; +echo git add .; +git commit -m " add translation for let kill bind" +echo git commit -m add translation for let kill bind ; +git push origin bv117 +echo git push origin bv117; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv118; +git checkout -b bv118; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 77228f3e3692f3aae400c6ad37d795fe3fe24bf2 ; +echo git reset --hard 77228f3e3692f3aae400c6ad37d795fe3fe24bf2 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 118 >> record.txt +echo echo 77228f3e3692f3aae400c6ad37d795fe3fe24bf2 to record.txt ; +git add .; +echo git add .; +git commit -m " changed function location" +echo git commit -m changed function location ; +git push origin bv118 +echo git push origin bv118; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv119; +git checkout -b bv119; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 87f5bc0f673ea1d7ceb8de404a3fd3621b4c17ff ; +echo git reset --hard 87f5bc0f673ea1d7ceb8de404a3fd3621b4c17ff ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 119 >> record.txt +echo echo 87f5bc0f673ea1d7ceb8de404a3fd3621b4c17ff to record.txt ; +git add .; +echo git add .; +git commit -m " modify enable -n commind" +echo git commit -m modify enable -n commind ; +git push origin bv119 +echo git push origin bv119; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv120; +git checkout -b bv120; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 9b92233e6e928cb06a7c13d57aa15e0185bd3791 ; +echo git reset --hard 9b92233e6e928cb06a7c13d57aa15e0185bd3791 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 120 >> record.txt +echo echo 9b92233e6e928cb06a7c13d57aa15e0185bd3791 to record.txt ; +git add .; +echo git add .; +git commit -m " fix mapfile -d" +echo git commit -m fix mapfile -d ; +git push origin bv120 +echo git push origin bv120; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv121; +git checkout -b bv121; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 2e2ae9165d48c3b7dd2e1a6cb86fd035591060cf ; +echo git reset --hard 2e2ae9165d48c3b7dd2e1a6cb86fd035591060cf ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 121 >> record.txt +echo echo 2e2ae9165d48c3b7dd2e1a6cb86fd035591060cf to record.txt ; +git add .; +echo git add .; +git commit -m " add safe protocol for alias and hash" +echo git commit -m add safe protocol for alias and hash ; +git push origin bv121 +echo git push origin bv121; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv122; +git checkout -b bv122; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard eb8b0dd7ddd7e11f78b6528ea50925b04eb3ab7d ; +echo git reset --hard eb8b0dd7ddd7e11f78b6528ea50925b04eb3ab7d ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 122 >> record.txt +echo echo eb8b0dd7ddd7e11f78b6528ea50925b04eb3ab7d to record.txt ; +git add .; +echo git add .; +git commit -m " add u_src dir" +echo git commit -m add u_src dir ; +git push origin bv122 +echo git push origin bv122; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv123; +git checkout -b bv123; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 6d72fd0a3ccc1063c57467015616ee923d2ff7e2 ; +echo git reset --hard 6d72fd0a3ccc1063c57467015616ee923d2ff7e2 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 123 >> record.txt +echo echo 6d72fd0a3ccc1063c57467015616ee923d2ff7e2 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "add safe protocol for alias and hash" into rustdev" +echo git commit -m Merge "add safe protocol for alias and hash" into rustdev ; +git push origin bv123 +echo git push origin bv123; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv124; +git checkout -b bv124; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard ac5c53099a6515a85e977ccf9afbf4e35c46a5ad ; +echo git reset --hard ac5c53099a6515a85e977ccf9afbf4e35c46a5ad ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 124 >> record.txt +echo echo ac5c53099a6515a85e977ccf9afbf4e35c46a5ad to record.txt ; +git add .; +echo git add .; +git commit -m " change translate file" +echo git commit -m change translate file ; +git push origin bv124 +echo git push origin bv124; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv125; +git checkout -b bv125; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard bc1080dd99fbc11c1f3c80131c776878523c30c2 ; +echo git reset --hard bc1080dd99fbc11c1f3c80131c776878523c30c2 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 125 >> record.txt +echo echo bc1080dd99fbc11c1f3c80131c776878523c30c2 to record.txt ; +git add .; +echo git add .; +git commit -m " fix:193533 utshell环境,Ctrl+D退出会话时,提示exit_builtin" +echo git commit -m fix:193533 utshell环境,Ctrl+D退出会话时,提示exit_builtin ; +git push origin bv125 +echo git push origin bv125; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv126; +git checkout -b bv126; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 1a86263c1c045c8c0bf59faa61de8897ba71082e ; +echo git reset --hard 1a86263c1c045c8c0bf59faa61de8897ba71082e ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 126 >> record.txt +echo echo 1a86263c1c045c8c0bf59faa61de8897ba71082e to record.txt ; +git add .; +echo git add .; +git commit -m " fix:193535.history -p mount和用例中预期不符" +echo git commit -m fix:193535.history -p mount和用例中预期不符 ; +git push origin bv126 +echo git push origin bv126; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv127; +git checkout -b bv127; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 5e7f126369b7c5be332ea82cae8534f4499b3a90 ; +echo git reset --hard 5e7f126369b7c5be332ea82cae8534f4499b3a90 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 127 >> record.txt +echo echo 5e7f126369b7c5be332ea82cae8534f4499b3a90 to record.txt ; +git add .; +echo git add .; +git commit -m " fix:193581 utshell环境,未执行kill -CONT 恢复进程时,执行ctrl+C无法结束wait -f 进程" +echo git commit -m fix:193581 utshell环境,未执行kill -CONT 恢复进程时,执行ctrl+C无法结束wait -f 进程 ; +git push origin bv127 +echo git push origin bv127; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv128; +git checkout -b bv128; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 97c737d22ff3adf518655aa848b6531a548b7779 ; +echo git reset --hard 97c737d22ff3adf518655aa848b6531a548b7779 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 128 >> record.txt +echo echo 97c737d22ff3adf518655aa848b6531a548b7779 to record.txt ; +git add .; +echo git add .; +git commit -m " fixed 193557 declare 命令变量输出异常,和用例中预期不一致" +echo git commit -m fixed 193557 declare 命令变量输出异常,和用例中预期不一致 ; +git push origin bv128 +echo git push origin bv128; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv129; +git checkout -b bv129; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 7e07d17473de10c94e37a2fddb63c39c00702be2 ; +echo git reset --hard 7e07d17473de10c94e37a2fddb63c39c00702be2 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 129 >> record.txt +echo echo 7e07d17473de10c94e37a2fddb63c39c00702be2 to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "fixed 193557 declare 命令变量输出异常,和用例中预期不一致" into rustdev" +echo git commit -m Merge "fixed 193557 declare 命令变量输出异常,和用例中预期不一致" into rustdev ; +git push origin bv129 +echo git push origin bv129; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv130; +git checkout -b bv130; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard f9f38431efe992eb9e7a0928968303643a6f0807 ; +echo git reset --hard f9f38431efe992eb9e7a0928968303643a6f0807 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 130 >> record.txt +echo echo f9f38431efe992eb9e7a0928968303643a6f0807 to record.txt ; +git add .; +echo git add .; +git commit -m " fixed declare command brackets's format" +echo git commit -m fixed declare command brackets's format ; +git push origin bv130 +echo git push origin bv130; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv131; +git checkout -b bv131; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 6cad4846183d77119319c2236c5c337e8f632c9a ; +echo git reset --hard 6cad4846183d77119319c2236c5c337e8f632c9a ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 131 >> record.txt +echo echo 6cad4846183d77119319c2236c5c337e8f632c9a to record.txt ; +git add .; +echo git add .; +git commit -m " Merge "fixed declare command brackets's format" into rustdev" +echo git commit -m Merge "fixed declare command brackets's format" into rustdev ; +git push origin bv131 +echo git push origin bv131; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv132; +git checkout -b bv132; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard 7cf4c921dd95788697bd1f0ec49b6d918359b410 ; +echo git reset --hard 7cf4c921dd95788697bd1f0ec49b6d918359b410 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 132 >> record.txt +echo echo 7cf4c921dd95788697bd1f0ec49b6d918359b410 to record.txt ; +git add .; +echo git add .; +git commit -m " add print_cmd reconstruction" +echo git commit -m add print_cmd reconstruction ; +git push origin bv132 +echo git push origin bv132; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv133; +git checkout -b bv133; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard c74756216fafb31404717cacfef813637b43d1f3 ; +echo git reset --hard c74756216fafb31404717cacfef813637b43d1f3 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 133 >> record.txt +echo echo c74756216fafb31404717cacfef813637b43d1f3 to record.txt ; +git add .; +echo git add .; +git commit -m " delete command_h.re test" +echo git commit -m delete command_h.re test ; +git push origin bv133 +echo git push origin bv133; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read +echo cd /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell; +echo git checkout -b bv134; +git checkout -b bv134; +cd /home/huan/gerrit/bash; +echo cd /home/huan/gerrit/bash; +git reset --hard a9f5a77741d8d425cadab98626379c37045958e3 ; +echo git reset --hard a9f5a77741d8d425cadab98626379c37045958e3 ; +cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +echo cp -r /home/huan/gerrit/bash//* /home/huan/gerrit/utshell; +cd /home/huan/gerrit/utshell +echo cd /home/huan/gerrit/utshell; +echo 134 >> record.txt +echo echo a9f5a77741d8d425cadab98626379c37045958e3 to record.txt ; +git add .; +echo git add .; +git commit -m " generate header.rs from .h header files" +echo git commit -m generate header.rs from .h header files ; +git push origin bv134 +echo git push origin bv134; +cd /home/huan/gerrit/bash +echo cd /home/huan/gerrit/bash; +read