diff --git a/bash-5.1/.cargo/config.toml b/bash-5.1/.cargo/config.toml index 11bdee268c6482560d4bb54326142673fb3ff073..cdf1653ef8a2ab4b0689af0a5765f2402049634e 100644 --- a/bash-5.1/.cargo/config.toml +++ b/bash-5.1/.cargo/config.toml @@ -1,6 +1,11 @@ [source.crates-io] replace-with = "vendored-sources" +[source."https://github.com/shadowsocks/crypto"] +git = "https://github.com/shadowsocks/crypto" +branch = "master" +replace-with = "vendored-sources" + [source.vendored-sources] directory = "vendor" diff --git a/bash-5.1/Makefile.in b/bash-5.1/Makefile.in index 3ea296c012dfd886dc9eb74e134086374264f86c..f17ec7bc7ccdd782a69ed1e1576323af65410484 100644 --- a/bash-5.1/Makefile.in +++ b/bash-5.1/Makefile.in @@ -243,7 +243,7 @@ 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_LIBDOC = $(RL_LIBSRC)/doc RL_LIBDIR = @RL_LIBDIR@ RL_ABSSRC = ${topdir}/$(RL_LIBDIR) @@ -535,10 +535,6 @@ 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/ @@ -557,21 +553,19 @@ CREATED_SUPPORT = signames.h recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) \ 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 \ +CREATED_MAKEFILES = Makefile builtins/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/termcap/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 + $(srcdir)/RBASH 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 @@ -798,8 +792,6 @@ $(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4 $(srcdir)/confi reconfig: force sh $(srcdir)/configure -C -loadables: - cd $(LOADABLES_DIR) && $(MAKE) $(MFLAGS) all #newversion: mkversion # $(RM) .build @@ -807,11 +799,6 @@ loadables: # 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: @@ -826,19 +813,12 @@ tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) 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) $@ ) @@ -881,13 +861,7 @@ uninstall-headers: 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 @@ -900,36 +874,30 @@ basic-clean: 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 @@ -937,14 +905,12 @@ 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 @@ -980,7 +946,6 @@ dist: force @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 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 730c0524e53ca97b13a3101486d6d4522ac8e7cf..1240b9516eb75242f72f675b6f58d0185f33ea3a 100644 --- a/bash-5.1/builtins_rust/break_1/src/lib.rs +++ b/bash-5.1/builtins_rust/break_1/src/lib.rs @@ -10,23 +10,34 @@ use rcommon::{WordList, WordDesc, EX_USAGE, EXECUTION_SUCCESS, EXECUTION_FAILURE type intmax_t = c_long; - +/* #[macro_export] macro_rules! ISHELP { ($s:expr) => { - libc::strcmp($s as *const libc::c_char,CString::new("--help").unwrap().as_ptr()) + libc::strcmp($s as *const libc::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 { + if $l !=std::ptr::null_mut() && (*$l).word !=std::ptr::null_mut() && ISHELP!((*(*$l).word).word) ==0 { builtin_help (); return EX_USAGE; } } } +*/ +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 { + builtin_help(); + } + return EX_USAGE; + } +} extern "C" { fn get_numeric_arg(list :*mut WordList, i: i32 , intmax :*mut intmax_t) -> i32; @@ -48,15 +59,16 @@ pub extern "C" fn r_break_builtin(mut list :*mut WordList) -> i32 { //println!("enter r_break_builtin"); let mut newbreak : intmax_t = 1 as intmax_t; unsafe { - CHECK_HELPOPT! (list); + checkhelp(list); + //CHECK_HELPOPT! (list); if check_loop_level() == 0 { return EXECUTION_SUCCESS!(); } get_numeric_arg(list, 1, &mut newbreak as *mut intmax_t); if newbreak <= 0{ - #[warn(temporary_cstring_as_ptr)] - sh_erange ((*(*list).word).word, CString::new("loop count").unwrap().as_ptr() as * mut libc::c_char); + 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!(); @@ -72,21 +84,22 @@ pub extern "C" fn r_break_builtin(mut list :*mut WordList) -> i32 { } #[no_mangle] -pub extern "C" fn r_continue_builtin (list :*mut WordList) -> i32 { +pub extern "C" fn r_continue_builtin (mut list :*mut WordList) -> i32 { let mut newcont : intmax_t = 0 as intmax_t; unsafe { - CHECK_HELPOPT! (list); + //CHECK_HELPOPT! (list); + checkhelp(list); } if check_loop_level() == 0 { return (EXECUTION_SUCCESS!()); } unsafe { - get_numeric_arg(list, 1, newcont as *mut intmax_t); + get_numeric_arg(list, 1, &mut newcont as *mut intmax_t); } unsafe { if newcont <= 0{ - #[warn(temporary_cstring_as_ptr)] - sh_erange ((*(*list).word).word, CString::new("loop count ").unwrap().as_ptr() as * mut libc::c_char); + 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!()); diff --git a/bash-5.1/builtins_rust/common/Cargo.toml b/bash-5.1/builtins_rust/common/Cargo.toml index 374f067fa7a3dbe1753af1cb1e9385a325fa611b..12b06063abfa1429b169c05d258f9873ce890beb 100644 --- a/bash-5.1/builtins_rust/common/Cargo.toml +++ b/bash-5.1/builtins_rust/common/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "rcommon" version = "0.1.0" -edition = "2021" +edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libc = "0.2" -nix = "0.24" -unic-langid = "0.9.0" +libc = "*" +nix = "*" +unic-langid = "*" + [lib] crate-type = ["staticlib","rlib"] name = "rcommon" diff --git a/bash-5.1/builtins_rust/common/src/lib.rs b/bash-5.1/builtins_rust/common/src/lib.rs index 50f96f7656a9eea4fd34b63b72ac9611589b16eb..d3387d37241036f92eb39c25ce1c5cc5387279bb 100644 --- a/bash-5.1/builtins_rust/common/src/lib.rs +++ b/bash-5.1/builtins_rust/common/src/lib.rs @@ -350,7 +350,7 @@ macro_rules! DEBUG_TRAP { #[macro_export] macro_rules! NSIG { () => { - 64 + 65 }; } @@ -1732,7 +1732,7 @@ pub extern "C" fn r_builtin_bind_variable(name:*mut c_char,value:*mut c_char,fla /* Like check_unbind_variable, but for use by builtins (only matters for error messages). */ - pub extern "C" fn r_builtin_unbind_variable(vname:*const c_char)->i32{ +pub extern "C" fn r_builtin_unbind_variable(vname:*const c_char)->i32{ let v:*mut SHELL_VAR; unsafe{ @@ -1771,4 +1771,4 @@ pub extern "C" fn get_local_str()-> Vec{ let langid : LanguageIdentifier = lang.parse().expect("wrong language"); let locales = vec![langid.into()]; return locales; - } \ No newline at end of file + } diff --git a/bash-5.1/builtins_rust/declare/src/lib.rs b/bash-5.1/builtins_rust/declare/src/lib.rs index 6da37b1294d8f4cb9fb874e1cf31ed8a5db2012a..7c70152ff6c806e164399c61158482bddb96ddb7 100644 --- a/bash-5.1/builtins_rust/declare/src/lib.rs +++ b/bash-5.1/builtins_rust/declare/src/lib.rs @@ -568,9 +568,9 @@ pub extern "C" fn r_declare_find_variable (name:* const c_char, mkglobal:i32, ch } } -unsafe fn DECLARE_OPTS()->* const c_char +unsafe fn DECLARE_OPTS()-> CString { - return CString::new("+acfgilnprtuxAFGI").unwrap().as_ptr(); + return CString::new("+acfgilnprtuxAFGI").unwrap(); } unsafe fn savestring(x:* const c_char)->* mut c_char @@ -662,7 +662,8 @@ pub extern "C" fn r_declare_internal (list:* mut WordList, local_var:i32)->i32 unsafe { reset_internal_getopt (); - opt = internal_getopt (list, DECLARE_OPTS() as * mut c_char); + let tmp = DECLARE_OPTS().as_ptr(); + opt = internal_getopt (list, tmp as * mut c_char); while opt != -1 { if list_opttype == '+' as i32 { flags= &mut flags_off; @@ -677,7 +678,7 @@ pub extern "C" fn r_declare_internal (list:* mut WordList, local_var:i32)->i32 the loop in subst.c:shell_expand_word_list() */ match optChar { 'a'=>{ *flags |= att_array!();} - 'A'=>{ *flags |= att_assoc!();} + 'A'=>{ *flags |= att_assoc!();} 'p'=>{ pflag+=1;} 'F'=>{ nodefs+=1; *flags |= att_function!(); @@ -725,7 +726,7 @@ pub extern "C" fn r_declare_internal (list:* mut WordList, local_var:i32)->i32 return EX_USAGE; } } - internal_getopt (list, DECLARE_OPTS() as * mut c_char); + internal_getopt (list, tmp as * mut c_char); } let mut llist:* mut WordList = loptend.clone(); diff --git a/bash-5.1/builtins_rust/exec_cmd/Cargo.toml b/bash-5.1/builtins_rust/exec_cmd/Cargo.toml index b120c60bef89f7e2a2ad135af17b0870ea11ac3e..f44bc7e663a183e069bb1968dc1db43e78633f55 100644 --- a/bash-5.1/builtins_rust/exec_cmd/Cargo.toml +++ b/bash-5.1/builtins_rust/exec_cmd/Cargo.toml @@ -2,7 +2,7 @@ authors = ["zhanghuanhuan"] name = "rexec_cmd" version = "0.0.1" -edition = "2021" +edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] diff --git a/bash-5.1/builtins_rust/help/Cargo.toml b/bash-5.1/builtins_rust/help/Cargo.toml index 1228246909ca100596ed04a5dc39014978b8690a..9a0cd0fbc17052521de357102c8b91cfb0286328 100644 --- a/bash-5.1/builtins_rust/help/Cargo.toml +++ b/bash-5.1/builtins_rust/help/Cargo.toml @@ -6,12 +6,12 @@ edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libc = "0.2" -nix = "0.24.1" +libc = "*" +nix = "*" rcommon = {path ="../common"} -fluent = "0.16.0" -fluent-bundle = "0.15.2" -fluent-resmgr = "0.0.5" +fluent = "*" +fluent-bundle = "*" +fluent-resmgr = "*" [lib] crate-type = ["staticlib","rlib"] diff --git a/bash-5.1/builtins_rust/set/src/lib.rs b/bash-5.1/builtins_rust/set/src/lib.rs index 0083095abc18ca10e1f3d2dc25f2bd73e5df75e7..c7bf273a58dc5985348294693a2c4e38afc3fffd 100644 --- a/bash-5.1/builtins_rust/set/src/lib.rs +++ b/bash-5.1/builtins_rust/set/src/lib.rs @@ -868,7 +868,7 @@ extern "C" { static mut interactive_shell : i32; static mut history_lines_this_session : i32; static mut rl_editing_mode : i32; - static mut list_optopt :i32; + static mut list_optopt :i8; static mut loptend:*mut WordList; static assoc_expand_once:i32; static mut stdin : libc::FILE; @@ -1425,7 +1425,7 @@ unsafe fn reset_shell_options () { unsafe { builtin_usage (); } - if unsafe {list_optopt} == b'?' as libc::c_char as i32 { + if unsafe {list_optopt} == b'?' as libc::c_char as i8 { return EXECUTION_SUCCESS!(); } else { @@ -1439,10 +1439,10 @@ unsafe fn reset_shell_options () { } return EX_USAGE; } - unsafe { - builtin_usage (); - } - return EX_USAGE; + // unsafe { + // builtin_usage (); + // } + // return EX_USAGE; } } // opt = unsafe {internal_getopt(list, optflags.as_ptr() as *mut libc::c_char)}; diff --git a/bash-5.1/configure b/bash-5.1/configure index fd4e211334d8533c9670194bf9f4a637dc2a10e8..60033ad767675212e04926c7d22de1b97909c38b 100755 --- a/bash-5.1/configure +++ b/bash-5.1/configure @@ -637,7 +637,6 @@ DEBUG RELSTATUS BASHVERS headersdir -loadablesdir BUILD_DIR incdir PROFILE_FLAGS @@ -793,6 +792,7 @@ infodir docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -925,6 +925,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1177,6 +1178,15 @@ do | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) + ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) + runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1314,7 +1324,7 @@ fi for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir + libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1467,6 +1477,7 @@ Fine tuning of the installation directories: --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -4778,7 +4789,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4824,7 +4835,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4848,7 +4859,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4893,7 +4904,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4917,7 +4928,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -7828,6 +7839,8 @@ main () if (*(data + i) != *(data3 + i)) return 14; close (fd); + free (data); + free (data3); return 0; } _ACEOF @@ -15088,6 +15101,8 @@ main () if (*(data + i) != *(data3 + i)) return 14; close (fd); + free (data); + free (data3); return 0; } _ACEOF @@ -20474,8 +20489,8 @@ CFLAGS="$CFLAGS ${STYLE_CFLAGS}" # if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5 -$as_echo_n "checking shared object configuration for loadable builtins... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking shared object configuration for builtins" >&5 +$as_echo_n "checking shared object configuration for builtins... " >&6; } eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"` @@ -20501,8 +20516,6 @@ case "$srcdir" in for ld in readline glob tilde malloc sh termcap; do # libdirs test -d lib/$ld || mkdir lib/$ld done - test -d examples/loadables || mkdir examples/loadables # loadable builtins - test -d examples/loadables/perl || mkdir examples/loadables/perl ;; esac @@ -20528,11 +20541,6 @@ fi -# directory where we install dynamically loadable builtins -if test -z "$loadablesdir"; then - loadablesdir='${libdir}/bash' -fi - if test -z "$headersdir"; then headersdir='$(includedir)/$(PACKAGE_NAME)' fi @@ -20559,7 +20567,7 @@ fi #AC_SUBST(ALLOCA_SOURCE) #AC_SUBST(ALLOCA_OBJECT) -ac_config_files="$ac_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" +ac_config_files="$ac_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 support/Makefile po/Makefile.in support/rash.pc support/rashbug.sh" ac_config_commands="$ac_config_commands default" @@ -21280,12 +21288,8 @@ do "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" ;; diff --git a/bash-5.1/configure.ac b/bash-5.1/configure.ac index 2d2a05906fe9319503f889cdb6931b646c7fbc57..dc6dd53ef73f713eff13fc78bba06576ee4cd8c1 100644 --- a/bash-5.1/configure.ac +++ b/bash-5.1/configure.ac @@ -1216,7 +1216,7 @@ CFLAGS="$CFLAGS ${STYLE_CFLAGS}" # if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf then - AC_MSG_CHECKING(shared object configuration for loadable builtins) + AC_MSG_CHECKING(shared object configuration for builtins) eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"` AC_SUBST(SHOBJ_CC) AC_SUBST(SHOBJ_CFLAGS) @@ -1241,8 +1241,6 @@ case "$srcdir" in for ld in readline glob tilde malloc sh termcap; do # libdirs test -d lib/$ld || mkdir lib/$ld done - test -d examples/loadables || mkdir examples/loadables # loadable builtins - test -d examples/loadables/perl || mkdir examples/loadables/perl ;; esac @@ -1268,11 +1266,6 @@ AC_SUBST(BUILD_DIR) AC_SUBST(datarootdir) AC_SUBST(localedir) -# directory where we install dynamically loadable builtins -if test -z "$loadablesdir"; then - loadablesdir='${libdir}/bash' -fi -AC_SUBST(loadablesdir) if test -z "$headersdir"; then headersdir='$(includedir)/$(PACKAGE_NAME)' fi @@ -1302,10 +1295,8 @@ AC_SUBST(LOCAL_DEFS) AC_OUTPUT([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/bash.pc support/rashbug.sh], + lib/tilde/Makefile support/Makefile po/Makefile.in \ + support/rash.pc support/rashbug.sh], [ # Makefile uses this timestamp file to record whether config.h is up to date. echo timestamp > stamp-h diff --git a/bash-5.1/support/rash.pc b/bash-5.1/support/rash.pc index 43e72d157306d6d4526cdbb64054117dcdb06ada..480ecd95abd516cf1c857399c25454127b50638f 100644 --- a/bash-5.1/support/rash.pc +++ b/bash-5.1/support/rash.pc @@ -5,7 +5,7 @@ exec_prefix=${prefix} includedir=${prefix}/include libdir=${exec_prefix}/lib -loadablesdir=${libdir}/bash +loadablesdir=@loadablesdir@ headersdir=${includedir}/rash LOCAL_CFLAGS = diff --git a/record.txt b/record.txt index db758278e10c66eb7e056cdfd4b9f0d0e5f465b9..05996ab808f353f230a57dadd282ad568b4259b4 100644 --- a/record.txt +++ b/record.txt @@ -71,3 +71,4 @@ 70 71 72 +73