From fbc6cd42866db7c6dcc46247c99e79076c5172ec Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Fri, 17 Jul 2020 04:26:17 +0100 Subject: [PATCH] Remove vestigial 3DFS support code (re: f88f302c) Support for the long-dead 3DFS userland versioning file system was already removed from ksh93 (although I'd overlooked some minor things), but libast still supported it. This removes that too. src/lib/libast/include/fs3d.h, src/lib/libast/man/fs3d.3, src/lib/libast/misc/fs3d.c: - Removed. bin/package, src/cmd/INIT/package.sh: - Remove attempted use of removed vpath builtin. src/cmd/ksh93/*: - Remove minor 3dfs vestiges. src/lib/lib{ast,cmd,coshell}/*: - Remove code supporting 3dfs. --- bin/package | 73 ++++++++----------- src/cmd/INIT/package.sh | 73 ++++++++----------- src/cmd/ksh93/Mamfile | 4 -- src/cmd/ksh93/README | 2 - src/cmd/ksh93/bltins/misc.c | 2 - src/cmd/ksh93/data/builtins.c | 5 -- src/cmd/ksh93/features/poll | 2 - src/cmd/ksh93/include/defs.h | 1 - src/lib/libast/Makefile | 6 +- src/lib/libast/Mamfile | 32 +-------- src/lib/libast/comp/conf.sh | 2 +- src/lib/libast/dir/dirlib.h | 6 -- src/lib/libast/dir/dirstd.h | 4 -- src/lib/libast/include/fs3d.h | 117 ------------------------------- src/lib/libast/man/ast.3 | 11 --- src/lib/libast/man/fs3d.3 | 92 ------------------------ src/lib/libast/man/path.3 | 8 +-- src/lib/libast/man/preroot.3 | 4 -- src/lib/libast/misc/fs3d.c | 116 ------------------------------ src/lib/libast/misc/fts.c | 5 +- src/lib/libast/misc/getcwd.c | 21 ++---- src/lib/libast/misc/getenv.c | 4 -- src/lib/libast/misc/setenviron.c | 11 --- src/lib/libast/path/pathcanon.c | 35 +-------- src/lib/libast/path/pathcat.c | 13 ---- src/lib/libast/path/pathkey.c | 8 --- src/lib/libast/port/astconf.c | 35 +++------ src/lib/libcmd/Mamfile | 5 -- src/lib/libcmd/cp.c | 14 +--- src/lib/libcmd/rm.c | 16 ----- src/lib/libcoshell/Mamfile | 4 -- src/lib/libcoshell/coinit.c | 35 --------- 32 files changed, 83 insertions(+), 683 deletions(-) delete mode 100644 src/lib/libast/include/fs3d.h delete mode 100644 src/lib/libast/man/fs3d.3 delete mode 100644 src/lib/libast/misc/fs3d.c diff --git a/bin/package b/bin/package index 512369561..48ae8a141 100755 --- a/bin/package +++ b/bin/package @@ -1448,10 +1448,6 @@ use) case $1 in 32) case $HOSTTYPE in *-64) HOSTTYPE=${HOSTTYPE%-64} ;; esac - case $wow in - */32) ;; - *) vpath / /$bit ;; - esac ;; 64) case $HOSTTYPE in *-64) ;; @@ -1459,7 +1455,6 @@ use) case $1 in esac case $wow in */32) echo $command: cannot build $bit-bit on $wow $sys >&2; exit 2 ;; - *) vpath / /$bit ;; esac ;; esac @@ -3242,32 +3237,28 @@ esac # set up the view state VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT" -if (vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN) >/dev/null 2>&1 && - vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN -then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN -else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH - $show VPATH=$VPATH - $show export VPATH - export VPATH - IFS=':' - set '' $VPATH - shift - IFS=$ifs - for i - do case $i in - */arch/*/*) - VIEW_src="$VIEW_src $i" - ;; - */arch/*) - VIEW_bin="$VIEW_bin $i" - ;; - *) - VIEW_src="$VIEW_src $i" - ;; - esac - VIEW_all="$VIEW_all $i" - done -fi +VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH +$show VPATH=$VPATH +$show export VPATH +export VPATH +IFS=':' +set '' $VPATH +shift +IFS=$ifs +for i +do case $i in + */arch/*/*) + VIEW_src="$VIEW_src $i" + ;; + */arch/*) + VIEW_bin="$VIEW_bin $i" + ;; + *) + VIEW_src="$VIEW_src $i" + ;; + esac + VIEW_all="$VIEW_all $i" +done # return 0 if arg in src|bin|all view @@ -3523,13 +3514,9 @@ int main(int argc, char** argv) { return argc || argv; } esac $exec touch $PROTOROOT/UPDATE ) - if (vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT) >/dev/null 2>&1 && - vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT - then $show vpath $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT $USER_VPATH_CHAIN - else VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH - $show VPATH=$VPATH - export VPATH - fi + VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH + $show VPATH=$VPATH + export VPATH } } for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin @@ -5857,13 +5844,9 @@ cat $j $k ;; esac if test '' != "$PROTOROOT" - then if (vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT) >/dev/null 2>&1 && - vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT - then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN - else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH - $show VPATH=$VPATH - export VPATH - fi + then VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH + $show VPATH=$VPATH + export VPATH fi note believe generated files for $accept eval capture \$NMAKE \$makeflags \$nmakeflags \$noexec recurse believe \$nmakesep $accept $assign diff --git a/src/cmd/INIT/package.sh b/src/cmd/INIT/package.sh index ff71b55bb..8174f676c 100644 --- a/src/cmd/INIT/package.sh +++ b/src/cmd/INIT/package.sh @@ -1447,10 +1447,6 @@ use) case $1 in 32) case $HOSTTYPE in *-64) HOSTTYPE=${HOSTTYPE%-64} ;; esac - case $wow in - */32) ;; - *) vpath / /$bit ;; - esac ;; 64) case $HOSTTYPE in *-64) ;; @@ -1458,7 +1454,6 @@ use) case $1 in esac case $wow in */32) echo $command: cannot build $bit-bit on $wow $sys >&2; exit 2 ;; - *) vpath / /$bit ;; esac ;; esac @@ -3241,32 +3236,28 @@ esac # set up the view state VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT" -if (vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN) >/dev/null 2>&1 && - vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN -then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN -else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH - $show VPATH=$VPATH - $show export VPATH - export VPATH - IFS=':' - set '' $VPATH - shift - IFS=$ifs - for i - do case $i in - */arch/*/*) - VIEW_src="$VIEW_src $i" - ;; - */arch/*) - VIEW_bin="$VIEW_bin $i" - ;; - *) - VIEW_src="$VIEW_src $i" - ;; - esac - VIEW_all="$VIEW_all $i" - done -fi +VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH +$show VPATH=$VPATH +$show export VPATH +export VPATH +IFS=':' +set '' $VPATH +shift +IFS=$ifs +for i +do case $i in + */arch/*/*) + VIEW_src="$VIEW_src $i" + ;; + */arch/*) + VIEW_bin="$VIEW_bin $i" + ;; + *) + VIEW_src="$VIEW_src $i" + ;; + esac + VIEW_all="$VIEW_all $i" +done # return 0 if arg in src|bin|all view @@ -3522,13 +3513,9 @@ int main(int argc, char** argv) { return argc || argv; } esac $exec touch $PROTOROOT/UPDATE ) - if (vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT) >/dev/null 2>&1 && - vpath $INSTALLROOT - $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT - then $show vpath $INSTALLROOT $PROTOROOT $PROTOROOT $PACKAGEROOT $USER_VPATH_CHAIN - else VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH - $show VPATH=$VPATH - export VPATH - fi + VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH + $show VPATH=$VPATH + export VPATH } } for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin @@ -5856,13 +5843,9 @@ cat $j $k ;; esac if test '' != "$PROTOROOT" - then if (vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT) >/dev/null 2>&1 && - vpath $INSTALLROOT - $PROTOROOT - $INSTALLROOT $PACKAGEROOT - then $show vpath $INSTALLROOT $PACKAGEROOT $USER_VPATH_CHAIN - else VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH - $show VPATH=$VPATH - export VPATH - fi + then VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH + $show VPATH=$VPATH + export VPATH fi note believe generated files for $accept eval capture \$NMAKE \$makeflags \$nmakeflags \$noexec recurse believe \$nmakesep $accept $assign diff --git a/src/cmd/ksh93/Mamfile b/src/cmd/ksh93/Mamfile index fa5246a82..03db90a5c 100644 --- a/src/cmd/ksh93/Mamfile +++ b/src/cmd/ksh93/Mamfile @@ -232,10 +232,6 @@ meta FEATURE/dynamic features/%>FEATURE/% features/dynamic dynamic make features/dynamic done features/dynamic exec - iffe -v -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' ref ${mam_cc_L+-L.} ${mam_cc_L+-L${INSTALLROOT}/lib} -I${PACKAGE_ast_INCLUDE} -I${INSTALLROOT}/include ${mam_libdll} ${mam_libcoshell} ${mam_libcmd} ${mam_libast} ${mam_libm} ${mam_libnsl} : run features/dynamic -make ${PACKAGE_ast_INCLUDE}/fs3d.h implicit -prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit -prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit -done ${PACKAGE_ast_INCLUDE}/fs3d.h dontcare prev ${PACKAGE_ast_INCLUDE}/dlldefs.h implicit done FEATURE/dynamic dontcare generated make FEATURE/options implicit diff --git a/src/cmd/ksh93/README b/src/cmd/ksh93/README index 1acfbfa01..b94131bdc 100644 --- a/src/cmd/ksh93/README +++ b/src/cmd/ksh93/README @@ -52,8 +52,6 @@ The options have the following defaults and meanings: FILESCAN on Experimental option that allows fast reading of files using while < file;do ...; done and allowing fields in each line to be accessed as positional parameters. - FS_3D off For use with 3-D file system. Enabled automatically for - systems with dynamic linking. KIA off Allow generation of shell cross reference database with -I. MULTIBYTE on Multibyte character handling. Requires mblen() and mbctowc(). diff --git a/src/cmd/ksh93/bltins/misc.c b/src/cmd/ksh93/bltins/misc.c index 24359c542..250edd4ea 100644 --- a/src/cmd/ksh93/bltins/misc.c +++ b/src/cmd/ksh93/bltins/misc.c @@ -26,8 +26,6 @@ * let expr... * . file [arg...] * :, true, false - * vpath [top] [base] - * vmap [top] [base] * wait [job...] * shift [n] * diff --git a/src/cmd/ksh93/data/builtins.c b/src/cmd/ksh93/data/builtins.c index 9913847a5..789a4b013 100644 --- a/src/cmd/ksh93/data/builtins.c +++ b/src/cmd/ksh93/data/builtins.c @@ -2030,11 +2030,6 @@ _JOB_ "[+SEE ALSO?\bjobs\b(1), \bps\b(1)]" ; -#if SHOPT_FS_3D - const char sh_optvpath[] = " [top] [base]"; - const char sh_optvmap[] = " [dir] [list]"; -#endif /* SHOPT_FS_3D */ - const char sh_optwhence[] = "[-1c?\n@(#)$Id: whence (AT&T Research) 2007-04-24 $\n]" USAGE_LICENSE diff --git a/src/cmd/ksh93/features/poll b/src/cmd/ksh93/features/poll index da219908c..a3dd5b8e3 100644 --- a/src/cmd/ksh93/features/poll +++ b/src/cmd/ksh93/features/poll @@ -68,7 +68,6 @@ tst pipe_socketpair note{ use socketpair() for peekable pipe() }end execute{ }end tst socketpair_devfd note{ /dev/fd/N handles socketpair() }end execute{ #include - #include #include #include int main() @@ -76,7 +75,6 @@ tst socketpair_devfd note{ /dev/fd/N handles socketpair() }end execute{ int devfd; int n; int sfd[2]; - fs3d(FS3D_OFF); close(0); open("/dev/null", O_RDONLY); if ((n = open("/dev/fd/0", O_RDONLY)) < 0) diff --git a/src/cmd/ksh93/include/defs.h b/src/cmd/ksh93/include/defs.h index d883bdddf..526ca91ca 100644 --- a/src/cmd/ksh93/include/defs.h +++ b/src/cmd/ksh93/include/defs.h @@ -106,7 +106,6 @@ struct limits int ngroups_max; /* maximum number of process groups */ unsigned char posix_version; /* posix version number */ unsigned char posix_jobcontrol;/* non-zero for job control systems */ - unsigned char fs3d; /* non-zero for 3-d file system */ }; #ifndef SH_wait_f_defined diff --git a/src/lib/libast/Makefile b/src/lib/libast/Makefile index 529de117a..5fd9fb816 100644 --- a/src/lib/libast/Makefile +++ b/src/lib/libast/Makefile @@ -30,7 +30,7 @@ __OBSOLETE__ == $("6 months ago":@F=%(%Y0101)T) HEADERSRC = ast.h ast_dir.h ast_getopt.h ast_std.h \ ast_namval.h ast_windows.h \ ccode.h cdt.h cdtlib.h cmdarg.h debug.h dt.h error.h find.h ftw.h \ - ftwalk.h fts.h fs3d.h getopt.h glob.h hash.h hashkey.h hashpart.h \ + ftwalk.h fts.h getopt.h glob.h hash.h hashkey.h hashpart.h \ ip6.h lc.h ls.h magic.h mc.h mime.h mnt.h modecanon.h modex.h \ namval.h option.h proc.h re_comp.h recfmt.h regex.h regexp.h \ sfio.h sfio_s.h sfio_t.h sfdisc.h shcmd.h \ @@ -54,7 +54,7 @@ HEADERSTD = dirent.h iconv.h nl_types.h stdio.h wchar.h wctype.h $(ID) 5.4 :LIBRARY: README RELEASE \ LIBAST.3 aso.3 ast.3 astsa.3 cdt.3 chr.3 compat.3 error.3 \ - find.3 fmt.3 fmtls.3 fs3d.3 ftwalk.3 getcwd.3 hash.3 iblocks.3 \ + find.3 fmt.3 fmtls.3 ftwalk.3 getcwd.3 hash.3 iblocks.3 \ int.3 ip6.3 magic.3 mem.3 mime.3 modecanon.3 optget.3 path.3 \ preroot.3 proc.3 re.3 regex.3 setenviron.3 sfdisc.3 sfio.3 \ sig.3 spawnveg.3 stak.3 stk.3 strcopy.3 strdup.3 strelapsed.3 \ @@ -80,7 +80,7 @@ $(ID) 5.4 :LIBRARY: README RELEASE \ pathnative.c pathposix.c pathtemp.c pathtmp.c pathstat.c \ pathgetlink.c pathsetlink.c pathbin.c pathshell.c pathcd.c \ pathprog.c \ - fs3d.c ftwalk.c ftwflags.c fts.c \ + ftwalk.c ftwflags.c fts.c \ astintercept.c conformance.c getenv.c setenviron.c \ optget.c optjoin.c optesc.c optctx.c strsort.c struniq.c \ magic.c mime.c mimetype.c signal.c sigflag.c systrace.c \ diff --git a/src/lib/libast/Mamfile b/src/lib/libast/Mamfile index 081389014..73311c1f6 100644 --- a/src/lib/libast/Mamfile +++ b/src/lib/libast/Mamfile @@ -490,9 +490,6 @@ exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Idir -Iinclude -Istd -D_PACK done telldir.o generated make getcwd.o make misc/getcwd.c -make include/fs3d.h implicit -prev ast_fs.h implicit -done include/fs3d.h dontcare make include/ast_dir.h implicit prev std/dirent.h implicit prev dir/dirlib.h implicit @@ -954,7 +951,6 @@ make pathcanon.o make path/pathcanon.c prev ast_api.h implicit prev include/error.h implicit -prev include/fs3d.h implicit prev include/ls.h implicit prev include/ast.h implicit done path/pathcanon.c @@ -1058,7 +1054,6 @@ exec - iffe -v -X ast -X std -c '${CC} ${mam_cc_FLAGS} ${CCFLAGS} ${LDFLAGS} ' done FEATURE/preroot generated exec - cmp 2>/dev/null -s FEATURE/preroot preroot.h || { rm -f preroot.h; silent test -d . || mkdir .; ${STDCP} FEATURE/preroot preroot.h; } done preroot.h generated -prev include/fs3d.h implicit prev include/ast.h implicit done path/pathkey.c meta pathkey.o %.c>%.o path/pathkey.c pathkey @@ -1214,15 +1209,6 @@ meta pathprog.o %.c>%.o path/pathprog.c pathprog prev path/pathprog.c exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c path/pathprog.c done pathprog.o generated -make fs3d.o -make misc/fs3d.c -prev include/fs3d.h implicit -prev include/ast.h implicit -done misc/fs3d.c -meta fs3d.o %.c>%.o misc/fs3d.c fs3d -prev misc/fs3d.c -exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c misc/fs3d.c -done fs3d.o generated make ftwalk.o make misc/ftwalk.c make include/ftwalk.h implicit @@ -1251,7 +1237,6 @@ make fts.o make misc/fts.c prev include/fts.h implicit prev include/ls.h implicit -prev include/fs3d.h implicit prev include/error.h implicit prev include/ast_dir.h implicit prev include/ast.h implicit @@ -1291,7 +1276,6 @@ exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Imisc -Iinclude -Istd -D_PAC done getenv.o generated make setenviron.o make misc/setenviron.c -prev include/fs3d.h implicit prev misc/intercepts.h implicit done misc/setenviron.c meta setenviron.o %.c>%.o misc/setenviron.c setenviron @@ -5532,7 +5516,6 @@ done conftab.h prev include/ls.h implicit prev include/proc.h implicit prev include/regex.h implicit -prev include/fs3d.h implicit prev include/error.h implicit prev include/ast.h implicit prev misc/univlib.h implicit @@ -6098,7 +6081,7 @@ prev obsolete/spawn.c exec - ${CC} ${mam_cc_FLAGS} ${CCFLAGS} -I. -Icomp -Iinclude -Istd -D_PACKAGE_ast -c obsolete/spawn.c done spawn.o generated exec - ${AR} rc libast.a state.o transition.o opendir.o readdir.o rewinddir.o seekdir.o telldir.o getcwd.o fastfind.o hashalloc.o hashdump.o hashfree.o hashlast.o hashlook.o hashscan.o hashsize.o hashview.o hashwalk.o memhash.o memsum.o strhash.o strkey.o strsum.o stracmp.o strnacmp.o ccmap.o ccmapid.o ccnative.o chresc.o chrtoi.o -exec - ${AR} rc libast.a streval.o strexpr.o strmatch.o strcopy.o modei.o modex.o strmode.o strlcat.o strlcpy.o strlook.o strncopy.o strsearch.o strpsearch.o stresc.o stropt.o strtape.o strpcmp.o strnpcmp.o strvcmp.o strnvcmp.o tok.o tokline.o tokscan.o pathaccess.o pathcat.o pathcanon.o pathcheck.o pathpath.o pathexists.o pathfind.o pathkey.o pathprobe.o pathrepl.o pathnative.o pathposix.o pathtemp.o pathtmp.o pathstat.o pathgetlink.o pathsetlink.o pathbin.o pathshell.o pathcd.o pathprog.o fs3d.o ftwalk.o ftwflags.o fts.o astintercept.o conformance.o getenv.o setenviron.o optget.o optjoin.o optesc.o optctx.o strsort.o struniq.o magic.o mime.o mimetype.o signal.o sigflag.o systrace.o error.o errorf.o errormsg.o errorx.o localeconv.o setlocale.o translate.o catopen.o iconv.o lc.o lctab.o mc.o base64.o recfmt.o recstr.o reclen.o fmtrec.o fmtbase.o fmtbuf.o fmtclock.o fmtdev.o fmtelapsed.o fmterror.o fmtesc.o fmtfmt.o fmtfs.o fmtident.o fmtint.o fmtip4.o fmtip6.o fmtls.o fmtmatch.o fmtmode.o fmtnum.o fmtperm.o fmtre.o fmttime.o +exec - ${AR} rc libast.a streval.o strexpr.o strmatch.o strcopy.o modei.o modex.o strmode.o strlcat.o strlcpy.o strlook.o strncopy.o strsearch.o strpsearch.o stresc.o stropt.o strtape.o strpcmp.o strnpcmp.o strvcmp.o strnvcmp.o tok.o tokline.o tokscan.o pathaccess.o pathcat.o pathcanon.o pathcheck.o pathpath.o pathexists.o pathfind.o pathkey.o pathprobe.o pathrepl.o pathnative.o pathposix.o pathtemp.o pathtmp.o pathstat.o pathgetlink.o pathsetlink.o pathbin.o pathshell.o pathcd.o pathprog.o ftwalk.o ftwflags.o fts.o astintercept.o conformance.o getenv.o setenviron.o optget.o optjoin.o optesc.o optctx.o strsort.o struniq.o magic.o mime.o mimetype.o signal.o sigflag.o systrace.o error.o errorf.o errormsg.o errorx.o localeconv.o setlocale.o translate.o catopen.o iconv.o lc.o lctab.o mc.o base64.o recfmt.o recstr.o reclen.o fmtrec.o fmtbase.o fmtbuf.o fmtclock.o fmtdev.o fmtelapsed.o fmterror.o fmtesc.o fmtfmt.o fmtfs.o fmtident.o fmtint.o fmtip4.o fmtip6.o fmtls.o fmtmatch.o fmtmode.o fmtnum.o fmtperm.o fmtre.o fmttime.o exec - ${AR} rc libast.a fmtuid.o fmtgid.o fmtsignal.o fmtscale.o fmttmx.o fmttv.o fmtversion.o strelapsed.o strperm.o struid.o strgid.o strtoip4.o strtoip6.o stack.o stk.o swapget.o swapmem.o swapop.o swapput.o sigdata.o sigcrit.o sigunblock.o procopen.o procclose.o procrun.o procfree.o tmdate.o tmequiv.o tmfix.o tmfmt.o tmform.o tmgoff.o tminit.o tmleap.o tmlex.o tmlocale.o tmmake.o tmpoff.o tmscan.o tmsleep.o tmtime.o tmtype.o tmweek.o tmword.o tmzone.o tmxdate.o tmxduration.o tmxfmt.o tmxgettime.o tmxleap.o tmxmake.o tmxscan.o tmxsettime.o tmxsleep.o tmxtime.o tmxtouch.o tvcmp.o tvgettime.o tvsettime.o tvsleep.o tvtouch.o cmdarg.o vecargs.o vecfile.o vecfree.o vecload.o vecstring.o univdata.o touch.o mnt.o debug.o memccpy.o memchr.o memcmp.o memcpy.o memdup.o memmove.o memset.o mkdir.o mkfifo.o mknod.o rmdir.o remove.o rename.o link.o unlink.o strdup.o strchr.o strrchr.o strstr.o strtod.o strtold.o strtol.o strtoll.o strtoul.o strtoull.o strton.o strtonll.o strntod.o strntold.o strnton.o exec - ${AR} rc libast.a strntonll.o strntol.o strntoll.o strntoul.o strntoull.o strcasecmp.o strncasecmp.o strerror.o mktemp.o tmpnam.o fsync.o execlp.o execve.o execvp.o execvpe.o spawnveg.o vfork.o killpg.o hsearch.o tsearch.o getlogin.o putenv.o setenv.o unsetenv.o lstat.o statvfs.o eaccess.o gross.o omitted.o readlink.o symlink.o getpgrp.o setpgid.o setsid.o waitpid.o creat64.o fcntl.o open.o atexit.o getdents.o getwd.o dup2.o errno.o getpreroot.o ispreroot.o realopen.o setpreroot.o getgroups.o mount.o system.o iblocks.o modedata.o tmdata.o memfatal.o sfkeyprintf.o sfdcdio.o sfdcdos.o sfdcfilter.o sfdcseekable.o sfdcslow.o sfdcsubstr.o sfdctee.o sfdcunion.o sfdcmore.o sfdcprefix.o wc.o wc2utf8.o basename.o closelog.o dirname.o fmtmsglib.o fnmatch.o ftw.o getdate.o getsubopt.o glob.o nftw.o openlog.o re_comp.o resolvepath.o realpath.o regcmp.o regexp.o setlogmask.o strftime.o strptime.o swab.o syslog.o tempnam.o wordexp.o mktime.o regalloc.o regclass.o regcoll.o regcomp.o regcache.o regdecomp.o regerror.o regexec.o regfatal.o reginit.o exec - ${AR} rc libast.a regnexec.o regsubcomp.o regsubexec.o regsub.o regrecord.o regrexec.o regstat.o dtclose.o dtdisc.o dthash.o dtlist.o dtmethod.o dtopen.o dtstrhash.o dttree.o dtview.o dtwalk.o dtnew.o dtcomp.o sfclose.o sfclrlock.o sfdisc.o sfdlen.o sfexcept.o sfgetl.o sfgetu.o sfcvt.o sfecvt.o sffcvt.o sfextern.o sffilbuf.o sfflsbuf.o sfprints.o sfgetd.o sfgetr.o sfllen.o sfmode.o sfmove.o sfnew.o sfpkrd.o sfnotify.o sfnputc.o sfopen.o sfpeek.o sfpoll.o sfpool.o sfpopen.o sfprintf.o sfputd.o sfputl.o sfputr.o sfputu.o sfrd.o sfread.o sfreserve.o sfscanf.o sfseek.o sfset.o sfsetbuf.o sfsetfd.o sfsize.o sfsk.o sfstack.o sfstrtod.o sfsync.o sfswap.o sftable.o sftell.o sftmp.o sfungetc.o sfvprintf.o sfvscanf.o sfwr.o sfwrite.o sfpurge.o sfraise.o sfwalk.o sfgetm.o sfmutex.o sfputm.o sfresize.o _sfclrerr.o _sfeof.o _sferror.o _sffileno.o _sfopen.o _sfstacked.o _sfvalue.o _sfgetc.o _sfgetl.o _sfgetl2.o _sfgetu.o _sfgetu2.o _sfdlen.o _sfllen.o _sfslen.o _sfulen.o _sfputc.o _sfputd.o _sfputl.o _sfputm.o @@ -6180,11 +6163,6 @@ make man/fmtls.3 done man/fmtls.3 exec - test '' = 'man/fmtls.3' || ${STDCMP} 2>/dev/null -s man/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3 || { ${STDMV} ${INSTALLROOT}/man/man3/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3.old 2>/dev/null || true; ${STDCP} man/fmtls.3 ${INSTALLROOT}/man/man3/fmtls.3 ;} done ${INSTALLROOT}/man/man3/fmtls.3 generated -make ${INSTALLROOT}/man/man3/fs3d.3 -make man/fs3d.3 -done man/fs3d.3 -exec - test '' = 'man/fs3d.3' || ${STDCMP} 2>/dev/null -s man/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3 || { ${STDMV} ${INSTALLROOT}/man/man3/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3.old 2>/dev/null || true; ${STDCP} man/fs3d.3 ${INSTALLROOT}/man/man3/fs3d.3 ;} -done ${INSTALLROOT}/man/man3/fs3d.3 generated make ${INSTALLROOT}/man/man3/ftwalk.3 make man/ftwalk.3 done man/ftwalk.3 @@ -6580,14 +6558,6 @@ exec - then rm -f 1.${COTEMP}.x exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fts.h exec - fi done ${INSTALLROOT}/include/ast/fts.h generated -make ${INSTALLROOT}/include/ast/fs3d.h -prev include/fs3d.h -exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' include/fs3d.h > 1.${COTEMP}.x -exec - if cmp 2>/dev/null -s ${INSTALLROOT}/include/ast/fs3d.h 1.${COTEMP}.x -exec - then rm -f 1.${COTEMP}.x -exec - else mv 1.${COTEMP}.x ${INSTALLROOT}/include/ast/fs3d.h -exec - fi -done ${INSTALLROOT}/include/ast/fs3d.h generated make ${INSTALLROOT}/include/ast/getopt.h prev comp/getopt.h exec - proto -p -s -l ${PACKAGEROOT}/lib/package/ast.lic '-o since=1985,author=gsf+dgk+kpv' comp/getopt.h > 1.${COTEMP}.x diff --git a/src/lib/libast/comp/conf.sh b/src/lib/libast/comp/conf.sh index aaf3f3a80..6531c2f19 100644 --- a/src/lib/libast/comp/conf.sh +++ b/src/lib/libast/comp/conf.sh @@ -523,7 +523,7 @@ do flags=F done case $name in '') ;; - CONFORMANCE|FS_3D|HOSTTYPE|LIBPATH|LIBPREFIX|LIBSUFFIX|PATH_ATTRIBUTES|PATH_RESOLVE|UNIVERSE) + CONFORMANCE|HOSTTYPE|LIBPATH|LIBPREFIX|LIBSUFFIX|PATH_ATTRIBUTES|PATH_RESOLVE|UNIVERSE) ;; *) values= script= diff --git a/src/lib/libast/dir/dirlib.h b/src/lib/libast/dir/dirlib.h index 509ed0c56..7d94d35a0 100644 --- a/src/lib/libast/dir/dirlib.h +++ b/src/lib/libast/dir/dirlib.h @@ -132,17 +132,11 @@ __STDPP__directive pragma pp:nohide DIR closedir opendir readdir seekdir telldir int dd_size; /* valid data in block */ \ char* dd_buf; /* directory block */ -#ifdef _BLD_3d -#define DIR DIRDIR -#endif #undef _DIRENT_H #include "dirstd.h" #ifndef _DIRENT_H #define _DIRENT_H 1 #endif -#ifdef _BLD_3d -#undef DIR -#endif #ifndef DIRBLKSIZ #ifdef DIRBLK diff --git a/src/lib/libast/dir/dirstd.h b/src/lib/libast/dir/dirstd.h index 79dc6ead4..9d907b9c8 100644 --- a/src/lib/libast/dir/dirstd.h +++ b/src/lib/libast/dir/dirstd.h @@ -45,8 +45,6 @@ struct dirent char d_name[1]; /* entry name */ }; -#ifndef _BLD_3d - #ifdef rewinddir #undef rewinddir #define rewinddir(p) seekdir(p,0L) @@ -59,5 +57,3 @@ extern void seekdir(DIR*, long); extern long telldir(DIR*); #endif - -#endif diff --git a/src/lib/libast/include/fs3d.h b/src/lib/libast/include/fs3d.h deleted file mode 100644 index 9d3c992fc..000000000 --- a/src/lib/libast/include/fs3d.h +++ /dev/null @@ -1,117 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1985-2011 AT&T Intellectual Property * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* David Korn * -* Phong Vo * -* * -***********************************************************************/ -#pragma prototyped -/* - * Glenn Fowler - * AT&T Research - * - * 3d fs interface definitions - */ - -#ifndef _FS3D_H -#define _FS3D_H - -#include - -#if _int_st_spare1 -#define iview(p) ((p)->st_spare1) -#define IVIEW(p,v) ((p)->st_spare1=(v)) -#else -#if _ary_st_spare4 -#define iview(p) ((p)->st_spare4[0]) -#define IVIEW(p,v) ((p)->st_spare4[0]=(v)) -#else -#if _ary_st_extra -#define iview(p) ((p)->st_extra[0]) -#define IVIEW(p,v) ((p)->st_extra[0]=(v)) -#else -#if _ary_st_pad4 -#define iview(p) ((p)->st_pad4[0]) -#define IVIEW(p,v) ((p)->st_pad4[0]=(v)) -#else -#if _mem_st_rdev_stat -#define iview(p) ((S_ISBLK((p)->st_mode)||S_ISCHR((p)->st_mode))?0:(p)->st_rdev) -#define IVIEW(p,v) do{if(!S_ISBLK((p)->st_mode)&&!S_ISCHR((p)->st_mode))(p)->st_rdev=(v);}while(0) -#else -#define iview(p) 0 -#define IVIEW(p,v) -#endif -#endif -#endif -#endif -#endif - -/* - * special options - */ - -#define FS3D_init "/#option/init" -#define FS3D_on "/#option/3d" -#define FS3D_off "/#option/2d" - -/* - * fs3d(3) ops - */ - -#define FS3D_OP(o,a) (((a)<<3)|(o)) - -#define FS3D_INIT FS3D_OP_INIT /* re-initialize tables */ -#define FS3D_OFF FS3D_OP_OFF -#define FS3D_ON FS3D_OP_ON -#define FS3D_TEST FS3D_OP_TEST -#define FS3D_LIMIT(n) FS3D_OP(FS3D_OP_LIMIT,n) - -#define FS3D_op(x) ((x)&07) -#define FS3D_arg(x) (((x)>>3)&07777) - -#define FS3D_OP_OFF 0 -#define FS3D_OP_ON 1 -#define FS3D_OP_TEST 2 -#define FS3D_OP_LIMIT 3 -#define FS3D_OP_INIT 7 - -/* - * mount(2) ops - */ - -#define FS3D_ALL (FS3D_VIEW|FS3D_VERSION) -#define FS3D_VIEW 002 -#define FS3D_VERSION 004 -#define FS3D_GET 010 -#define FS3D_SIZE(n) ((n)<<4) -#define FS3D_SIZEOF(n) ((n)>>4) - -#if !_BLD_3d -#define mount(s,t,f,d) fs3d_mount(s,t,f,d) -#endif - -#if _BLD_ast && defined(__EXPORT__) -#define extern __EXPORT__ -#endif - -extern int fs3d(int); -extern int fs3d_mount(const char*, char*, int, void*); -extern char* pathnext(char*, char*, long*); - -#undef extern - -#endif diff --git a/src/lib/libast/man/ast.3 b/src/lib/libast/man/ast.3 index 8055be9db..d6427a53d 100644 --- a/src/lib/libast/man/ast.3 +++ b/src/lib/libast/man/ast.3 @@ -119,17 +119,6 @@ astconf("UNIVERSE", 0, universe); .EE The settable configuration names are: .TP -.L FS_3D -.L 1 -if -.IR 3d (1) -viewpathing is enabled, -.L 0 -otherwise. -This is an alternative to the -.IR fs3d (3) -interface. -.TP .L PATH_RESOLVE .L logical if symbolic links are followed during file tree traversal, diff --git a/src/lib/libast/man/fs3d.3 b/src/lib/libast/man/fs3d.3 deleted file mode 100644 index 7dfd448e5..000000000 --- a/src/lib/libast/man/fs3d.3 +++ /dev/null @@ -1,92 +0,0 @@ -.fp 5 CW -.de Af -.ds ;G \\*(;G\\f\\$1\\$3\\f\\$2 -.if !\\$4 .Af \\$2 \\$1 "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" -.. -.de aF -.ie \\$3 .ft \\$1 -.el \{\ -.ds ;G \& -.nr ;G \\n(.f -.Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" -\\*(;G -.ft \\n(;G \} -.. -.de L -.aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" -.. -.de LR -.aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" -.. -.de RL -.aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" -.. -.de EX \" start example -.ta 1i 2i 3i 4i 5i 6i -.PP -.RS -.PD 0 -.ft 5 -.nf -.. -.de EE \" end example -.fi -.ft -.PD -.RE -.PP -.. -.TH FS3D 3 -.SH NAME -fs3d \- 3D (nDFS) on/off switch -.SH SYNOPSIS -.EX -#include - -int fs3d(int \fIop\fP); -.EE -.SH DESCRIPTION -.L fs3d -controls and queries the -.B 3D -file system -.RB (aka nDFS ) -enable state. -.L 0 -is returned if the current process cannot mount -.B 3D -files. -.I op -may be one of: -.TP -.B FS3D_TEST -Returns -.L "FS3D_ON [1]" -if -.B 3D -is enabled, -.L "FS3D_OFF [0]" -otherwise. -.TP -.B FS3D_ON -Enables -.B 3D -and returns the previous -.L 3D -state (either -.B FS3D_ON -or -.BR FS3D_OFF ). -.TP -\fBFS3D_LIMIT(\fIlimit\fB)\fR -Sets the viewpath level limit to -.IR limit . -The previous limit is returned. -.TP -.B FS3D_INIT -Re-initialize the -.B 3D -tables. -Used for debugging. -.SH "SEE ALSO" -3D(1) diff --git a/src/lib/libast/man/path.3 b/src/lib/libast/man/path.3 index 4eba7027c..b88f2c830 100644 --- a/src/lib/libast/man/path.3 +++ b/src/lib/libast/man/path.3 @@ -138,11 +138,7 @@ removed; .L .. moved to the front; .L /.. -preserved for super root hacks; -.L ... -resolved if -.IR fs3d (3) -is enabled. +preserved for super root hacks. .I flags is the inclusive-or of: .TP .L PATH_DOTDOT @@ -388,4 +384,4 @@ may be is used to avoid file conflicts but the generated path name is not created, so you could lose in a race. .SH "SEE ALSO" -3d(1), access(2), confstr(3), fs3d(3), lstat(2), stat(2) +access(2), confstr(3), lstat(2), stat(2) diff --git a/src/lib/libast/man/preroot.3 b/src/lib/libast/man/preroot.3 index c0706d27a..566333387 100644 --- a/src/lib/libast/man/preroot.3 +++ b/src/lib/libast/man/preroot.3 @@ -145,7 +145,3 @@ The .I ast .IR directory (3) routines do this. -.IR 3d (1) -viewpathing does -.I preroot -the right way. diff --git a/src/lib/libast/misc/fs3d.c b/src/lib/libast/misc/fs3d.c deleted file mode 100644 index cc708f2d1..000000000 --- a/src/lib/libast/misc/fs3d.c +++ /dev/null @@ -1,116 +0,0 @@ -/*********************************************************************** -* * -* This software is part of the ast package * -* Copyright (c) 1985-2011 AT&T Intellectual Property * -* and is licensed under the * -* Eclipse Public License, Version 1.0 * -* by AT&T Intellectual Property * -* * -* A copy of the License is available at * -* http://www.eclipse.org/org/documents/epl-v10.html * -* (with md5 checksum b35adb5213ca9657e911e9befb180842) * -* * -* Information and Software Systems Research * -* AT&T Research * -* Florham Park NJ * -* * -* Glenn Fowler * -* David Korn * -* Phong Vo * -* * -***********************************************************************/ -#pragma prototyped -/* - * Glenn Fowler - * AT&T Bell Laboratories - * - * 3d fs operations - * only active for non-shared 3d library - */ - -#define mount ______mount - -#include - -#undef mount - -#include - -int -fs3d(register int op) -{ - register int cur; - register char* v; - char val[sizeof(FS3D_off) + 8]; - - static int fsview; - static char on[] = FS3D_on; - static char off[] = FS3D_off; - - if (fsview < 0) - return 0; - - /* - * get the current setting - */ - - if (!fsview && (!getenv("LD_PRELOAD") || mount("", "", 0, NiL))) - goto nope; - if (FS3D_op(op) == FS3D_OP_INIT && mount(FS3D_init, NiL, FS3D_VIEW, NiL)) - goto nope; - if (mount(on, val, FS3D_VIEW|FS3D_GET|FS3D_SIZE(sizeof(val)), NiL)) - goto nope; - if (v = strchr(val, ' ')) - v++; - else - v = val; - if (!strcmp(v, on)) - cur = FS3D_ON; - else if (!strncmp(v, off, sizeof(off) - 1) && v[sizeof(off)] == '=') - cur = FS3D_LIMIT((int)strtol(v + sizeof(off) + 1, NiL, 0)); - else - cur = FS3D_OFF; - if (cur != op) - { - switch (FS3D_op(op)) - { - case FS3D_OP_OFF: - v = off; - break; - case FS3D_OP_ON: - v = on; - break; - case FS3D_OP_LIMIT: - sfsprintf(val, sizeof(val), "%s=%d", off, FS3D_arg(op)); - v = val; - break; - default: - v = 0; - break; - } - if (v && mount(v, NiL, FS3D_VIEW, NiL)) - goto nope; - } - fsview = 1; - return cur; - nope: - fsview = -1; - return 0; -} - -/* - * user code that includes will have mount() mapped to fs3d_mount() - * this restricts the various "standard" mount prototype conflicts to this spot - * this means that code that includes cannot access the real mount - * (at least without some additional macro hackery - */ - -#undef mount - -extern int mount(const char*, char*, int, void*); - -int -fs3d_mount(const char* source, char* target, int flags, void* data) -{ - return mount(source, target, flags, data); -} diff --git a/src/lib/libast/misc/fts.c b/src/lib/libast/misc/fts.c index d8bb34d16..c2091d043 100644 --- a/src/lib/libast/misc/fts.c +++ b/src/lib/libast/misc/fts.c @@ -31,7 +31,6 @@ #include #include #include -#include #include struct Ftsent; @@ -65,7 +64,6 @@ typedef int (*Stat_f)(const char*, struct stat*); int flags; /* fts_open() flags */ \ int nd; \ unsigned char children; \ - unsigned char fs3d; \ unsigned char nostat; \ unsigned char state; /* fts_read() state */ \ char* base; /* basename in path */ \ @@ -521,7 +519,7 @@ info(FTS* fts, register FTSENT* f, const char* path, struct stat* sp, int flags) #endif if (S_ISDIR(sp->st_mode)) { - if ((flags & FTS_NOSTAT) && !fts->fs3d) + if ((flags & FTS_NOSTAT)) { f->fts_parent->nlink--; #ifdef D_TYPE @@ -752,7 +750,6 @@ fts_open(char* const* pathnames, int flags, int (*comparf)(FTSENT* const*, FTSEN fts->flags = flags; fts->cd = (flags & FTS_NOCHDIR) ? 1 : -1; fts->comparf = comparf; - fts->fs3d = fs3d(FS3D_TEST); /* * set up the path work buffer diff --git a/src/lib/libast/misc/getcwd.c b/src/lib/libast/misc/getcwd.c index c5096480e..a8ac96d85 100644 --- a/src/lib/libast/misc/getcwd.c +++ b/src/lib/libast/misc/getcwd.c @@ -79,7 +79,6 @@ getcwd(char* buf, size_t len) #include #include -#include #ifndef ERANGE #define ERANGE E2BIG @@ -184,18 +183,6 @@ getcwd(char* buf, size_t len) }; if (buf && !len) ERROR(EINVAL); - if (fs3d(FS3D_TEST) && (namlen = mount(".", dots, FS3D_GET|FS3D_VIEW|FS3D_SIZE(sizeof(dots)), NiL)) > 1 && namlen < sizeof(dots)) - { - p = dots; - easy: - namlen++; - if (buf) - { - if (len < namlen) ERROR(ERANGE); - } - else if (!(buf = newof(0, char, namlen, len))) ERROR(ENOMEM); - return (char*)memcpy(buf, p, namlen); - } cur = &curst; par = &parst; if (stat(".", par)) ERROR(errno); @@ -209,7 +196,13 @@ getcwd(char* buf, size_t len) if (cur->st_ino == par->st_ino && cur->st_dev == par->st_dev) { namlen = strlen(p); - goto easy; + namlen++; + if (buf) + { + if (len < namlen) ERROR(ERANGE); + } + else if (!(buf = newof(0, char, namlen, len))) ERROR(ENOMEM); + return (char*)memcpy(buf, p, namlen); } } } diff --git a/src/lib/libast/misc/getenv.c b/src/lib/libast/misc/getenv.c index 7e2481770..67e74e0d4 100644 --- a/src/lib/libast/misc/getenv.c +++ b/src/lib/libast/misc/getenv.c @@ -39,11 +39,7 @@ __STDPP__directive pragma pp:nohide getenv */ Intercepts_t intercepts -#if _BLD_3d - ; -#else = { 0 }; -#endif #if _UWIN && !defined(getenv) diff --git a/src/lib/libast/misc/setenviron.c b/src/lib/libast/misc/setenviron.c index 368ebc66a..6838bd765 100644 --- a/src/lib/libast/misc/setenviron.c +++ b/src/lib/libast/misc/setenviron.c @@ -23,8 +23,6 @@ #include "intercepts.h" -#include - /* * put name=value in the environment * pointer to value returned @@ -75,15 +73,6 @@ setenviron(const char* akey) n = INCREMENT; if (!p || (last - p + 1) < n) { - if (!p && fs3d(FS3D_TEST)) - { - /* - * kick 3d initialization - */ - - close(open(".", O_RDONLY|O_cloexec)); - v = environ; - } if (!(p = newof(p, char*, n, 0))) return 0; last = p + n - 1; diff --git a/src/lib/libast/path/pathcanon.c b/src/lib/libast/path/pathcanon.c index 8d3cfa641..dfa167565 100644 --- a/src/lib/libast/path/pathcanon.c +++ b/src/lib/libast/path/pathcanon.c @@ -30,13 +30,8 @@ * remove redundant .'s and /'s * move ..'s to the front * /.. preserved (for pdu and newcastle hacks) - * FS_3D handles ... - * if (flags&PATH_PHYSICAL) then symlinks resolved at each component - * if (flags&PATH_DOTDOT) then each .. checked for access - * if (flags&PATH_EXISTS) then path must exist at each component - * if (flags&PATH_VERIFIED(n)) then first n chars of path exist * - * longer pathname possible if (flags&PATH_PHYSICAL) or FS_3D ... involved + * longer pathname possible if (flags&PATH_PHYSICAL) involved * 0 returned on error and if (flags&(PATH_DOTDOT|PATH_EXISTS)) then path * will contain the components following the failure point */ @@ -45,7 +40,6 @@ #include #include -#include #include char* @@ -70,9 +64,6 @@ pathcanon_20100601(char* path, size_t size, int flags) char* v; int loop; int oerrno; -#if defined(FS_3D) - long visits = 0; -#endif oerrno = errno; dots = loop = 0; @@ -129,31 +120,7 @@ pathcanon_20100601(char* path, size_t size, int flags) else for (t -= 5; t > r && *(t - 1) != '/'; t--); break; case 3: -#if defined(FS_3D) - { - char* x; - char* o; - int c; - - o = t; - if ((t -= 5) <= path) t = path + 1; - c = *t; - *t = 0; - if (x = pathnext(phys, s - (*s != 0), &visits)) - { - r = path; - if (t == r + 1) x = r; - v = s = t = x; - } - else - { - *t = c; - t = o; - } - } -#else r = t; -#endif break; default: if ((flags & PATH_PHYSICAL) && loop < 32 && (t - 1) > path) diff --git a/src/lib/libast/path/pathcat.c b/src/lib/libast/path/pathcat.c index 2fa9cde14..1bcd31200 100644 --- a/src/lib/libast/path/pathcat.c +++ b/src/lib/libast/path/pathcat.c @@ -31,25 +31,12 @@ #include -/* - * building 3d flirts with the dark side - */ - -#if _BLD_3d - -#undef pathcat -#define pathcat_20100601 _3d_pathcat - -#else - char* pathcat(char* path, const char* dirs, int sep, const char* a, const char* b) { return pathcat_20100601(dirs, sep, a, b, path, PATH_MAX); } -#endif - #undef _AST_API #include diff --git a/src/lib/libast/path/pathkey.c b/src/lib/libast/path/pathkey.c index 2432d8372..296c1fb40 100644 --- a/src/lib/libast/path/pathkey.c +++ b/src/lib/libast/path/pathkey.c @@ -36,7 +36,6 @@ #include #include -#include #include #include @@ -105,13 +104,6 @@ pathkey_20100601(const char* lang, const char* tool, const char* apath, char* ke } } - /* - * 3D - */ - - if (!flags && fs3d(FS3D_TEST) && (c = mount(path, tmp, FS3D_GET|FS3D_ALL|FS3D_SIZE(PATH_MAX), NiL)) > 1 && c < PATH_MAX) - path = tmp; - /* * preroot */ diff --git a/src/lib/libast/port/astconf.c b/src/lib/libast/port/astconf.c index 4df80c0f1..7dd357c75 100644 --- a/src/lib/libast/port/astconf.c +++ b/src/lib/libast/port/astconf.c @@ -32,7 +32,6 @@ static const char id[] = "\n@(#)$Id: getconf (AT&T Research) 2012-05-01 $\0\n"; #include #include -#include #include #include #include @@ -142,19 +141,7 @@ static Feature_t dynamic[] = 0, OP_conformance }, -#define OP_fs_3d 2 - { - &dynamic[OP_fs_3d+1], - "FS_3D", - &null[0], - "0", - 0, - 5, - CONF_AST, - 0, - OP_fs_3d - }, -#define OP_getconf 3 +#define OP_getconf 2 { &dynamic[OP_getconf+1], "GETCONF", @@ -170,7 +157,7 @@ static Feature_t dynamic[] = CONF_READONLY, OP_getconf }, -#define OP_hosttype 4 +#define OP_hosttype 3 { &dynamic[OP_hosttype+1], "HOSTTYPE", @@ -182,7 +169,7 @@ static Feature_t dynamic[] = CONF_READONLY, OP_hosttype }, -#define OP_libpath 5 +#define OP_libpath 4 { &dynamic[OP_libpath+1], "LIBPATH", @@ -198,7 +185,7 @@ static Feature_t dynamic[] = 0, OP_libpath }, -#define OP_libprefix 6 +#define OP_libprefix 5 { &dynamic[OP_libprefix+1], "LIBPREFIX", @@ -214,7 +201,7 @@ static Feature_t dynamic[] = 0, OP_libprefix }, -#define OP_libsuffix 7 +#define OP_libsuffix 6 { &dynamic[OP_libsuffix+1], "LIBSUFFIX", @@ -230,7 +217,7 @@ static Feature_t dynamic[] = 0, OP_libsuffix }, -#define OP_path_attributes 8 +#define OP_path_attributes 7 { &dynamic[OP_path_attributes+1], "PATH_ATTRIBUTES", @@ -246,7 +233,7 @@ static Feature_t dynamic[] = CONF_READONLY, OP_path_attributes }, -#define OP_path_resolve 9 +#define OP_path_resolve 8 { &dynamic[OP_path_resolve+1], "PATH_RESOLVE", @@ -258,7 +245,7 @@ static Feature_t dynamic[] = 0, OP_path_resolve }, -#define OP_universe 10 +#define OP_universe 9 { 0, "UNIVERSE", @@ -522,7 +509,7 @@ initialize(register Feature_t* fp, const char* path, const char* command, const ok = 1; break; case OP_path_resolve: - ok = fs3d(FS3D_TEST); + ok = 0; break; case OP_universe: ok = streq(_UNIV_DEFAULT, DEFAULT(OP_universe)); @@ -692,10 +679,6 @@ format(register Feature_t* fp, const char* path, const char* value, unsigned int #endif break; - case OP_fs_3d: - fp->value = fs3d(value ? value[0] ? FS3D_ON : FS3D_OFF : FS3D_TEST) ? "1" : null; - break; - case OP_hosttype: break; diff --git a/src/lib/libcmd/Mamfile b/src/lib/libcmd/Mamfile index a1a2e4c76..d3560888f 100644 --- a/src/lib/libcmd/Mamfile +++ b/src/lib/libcmd/Mamfile @@ -262,10 +262,6 @@ done ${PACKAGE_ast_INCLUDE}/stk.h make ${PACKAGE_ast_INCLUDE}/hashkey.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit done ${PACKAGE_ast_INCLUDE}/hashkey.h -make ${PACKAGE_ast_INCLUDE}/fs3d.h implicit -prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit -prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit -done ${PACKAGE_ast_INCLUDE}/fs3d.h prev fts_fix.h implicit prev ${PACKAGE_ast_INCLUDE}/times.h implicit prev ${PACKAGE_ast_INCLUDE}/ls.h implicit @@ -381,7 +377,6 @@ done rev.h prev cmd.h implicit done rev.c make rm.c -prev ${PACKAGE_ast_INCLUDE}/fs3d.h implicit prev fts_fix.h implicit prev ${PACKAGE_ast_INCLUDE}/ls.h implicit prev cmd.h implicit diff --git a/src/lib/libcmd/cp.c b/src/lib/libcmd/cp.c index 8c0694858..ee355d7a3 100644 --- a/src/lib/libcmd/cp.c +++ b/src/lib/libcmd/cp.c @@ -134,7 +134,6 @@ static const char usage_tail[] = #include #include #include -#include #include #include #include @@ -161,11 +160,9 @@ typedef struct State_s /* program state */ int directory; /* destination is directory */ int flags; /* FTS_* flags */ int force; /* force approval */ - int fs3d; /* 3d fs enabled */ int hierarchy; /* preserve hierarchy */ int interactive; /* prompt for approval */ int missmode; /* default missing dir mode */ - int official; /* move to next view */ int op; /* {CP,LN,MV} */ int perm; /* permissions to preserve */ int postsiz; /* state.path post index */ @@ -418,12 +415,8 @@ visit(State_t* state, register FTSENT* ent) fts_set(NiL, ent, FTS_SKIP); return 0; } - else if (!state->fs3d || !iview(&st)) + else { - /* - * target is in top 3d view - */ - if (state->op != LN && st.st_dev == ent->fts_statp->st_dev && st.st_ino == ent->fts_statp->st_ino) { if (state->op == MV) @@ -436,8 +429,7 @@ visit(State_t* state, register FTSENT* ent) sfputr(sfstdout, state->path, '\n'); goto operate; } - if (!state->official) - error(2, "%s: identical to %s", state->path, ent->fts_path); + error(2, "%s: identical to %s", state->path, ent->fts_path); return 0; } if (S_ISDIR(st.st_mode)) @@ -966,8 +958,6 @@ b_cp(int argc, register char** argv, Shbltin_t* context) error(ERROR_USAGE|4, "%s", optusage(NiL)); if (s && !state->directory) error(3, "%s: not a directory", file); - if ((state->fs3d = fs3d(FS3D_TEST)) && strmatch(file, "...|*/...|.../*")) - state->official = 1; state->postsiz = strlen(file); if (state->pathsiz < roundof(state->postsiz + 2, PATH_CHUNK) && !(state->path = newof(state->path, char, state->pathsiz = roundof(state->postsiz + 2, PATH_CHUNK), 0))) error(ERROR_SYSTEM|3, "out of space"); diff --git a/src/lib/libcmd/rm.c b/src/lib/libcmd/rm.c index 0ae46308e..618bbf02b 100644 --- a/src/lib/libcmd/rm.c +++ b/src/lib/libcmd/rm.c @@ -70,7 +70,6 @@ USAGE_LICENSE #include #include #include -#include #define RM_ENTRY 1 @@ -86,7 +85,6 @@ typedef struct State_s /* program state */ int clobber; /* clear out file data first */ int directory; /* remove(dir) not rmdir(dir) */ int force; /* force actions */ - int fs3d; /* 3d enabled */ int interactive; /* prompt for approval */ int recursive; /* remove subtrees too */ int terminal; /* attached to terminal */ @@ -115,8 +113,6 @@ rm(State_t* state, register FTSENT* ent) if (!state->force) error(2, "%s: not found", ent->fts_path); } - else if (state->fs3d && iview(ent->fts_statp)) - fts_set(NiL, ent, FTS_SKIP); else switch (ent->fts_info) { case FTS_DNR: @@ -332,12 +328,10 @@ b_rm(int argc, register char** argv, Shbltin_t* context) State_t state; FTS* fts; FTSENT* ent; - int set3d; cmdinit(argc, argv, context, ERROR_CATALOG, ERROR_NOTIFY); memset(&state, 0, sizeof(state)); state.context = context; - state.fs3d = fs3d(FS3D_TEST); state.terminal = isatty(0); for (;;) { @@ -396,14 +390,6 @@ b_rm(int argc, register char** argv, Shbltin_t* context) state.verbose = 0; state.uid = geteuid(); state.unconditional = state.unconditional && state.recursive && state.force; - if (state.recursive && state.fs3d) - { - set3d = state.fs3d; - state.fs3d = 0; - fs3d(0); - } - else - set3d = 0; if (fts = fts_open(argv, FTS_PHYSICAL, NiL)) { while (!sh_checksig(context) && (ent = fts_read(fts)) && !rm(&state, ent)); @@ -411,7 +397,5 @@ b_rm(int argc, register char** argv, Shbltin_t* context) } else if (!state.force) error(ERROR_SYSTEM|2, "%s: cannot remove", argv[0]); - if (set3d) - fs3d(set3d); return error_info.errors != 0; } diff --git a/src/lib/libcoshell/Mamfile b/src/lib/libcoshell/Mamfile index 9c50dcd86..9f82caac8 100644 --- a/src/lib/libcoshell/Mamfile +++ b/src/lib/libcoshell/Mamfile @@ -216,10 +216,6 @@ prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit prev ${PACKAGE_ast_INCLUDE}/ast_std.h implicit prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit done ${PACKAGE_ast_INCLUDE}/ls.h -make ${PACKAGE_ast_INCLUDE}/fs3d.h implicit -prev ${PACKAGE_ast_INCLUDE}/ast_fs.h implicit -prev ${PACKAGE_ast_INCLUDE}/prototyped.h implicit -done ${PACKAGE_ast_INCLUDE}/fs3d.h prev ${PACKAGE_ast_INCLUDE}/endian.h implicit prev colib.h implicit done coinit.c diff --git a/src/lib/libcoshell/coinit.c b/src/lib/libcoshell/coinit.c index 5f8843484..fc6fe8443 100644 --- a/src/lib/libcoshell/coinit.c +++ b/src/lib/libcoshell/coinit.c @@ -33,7 +33,6 @@ #include "colib.h" #include -#include #include static void @@ -346,40 +345,6 @@ coinitialize(Coshell_t* co, int flags) if (old) sfprintf(sp, "\nexport PATH"); sfputc(sp, '\n'); - if (sync) - { - /* - * VPATH - */ - - p = (int)sfstrtell(sp); - sfprintf(sp, "vpath "); - n = PATH_MAX; - if (fs3d(FS3D_TEST)) - for (;;) - { - if (!(t = sfstrrsrv(sp, n))) - goto bad; - if ((m = mount(NiL, t, FS3D_GET|FS3D_ALL|FS3D_SIZE(n), NiL)) > 0) - m = n; - else - { - if (!m) - sfstrseek(sp, strlen(t), SEEK_CUR); - break; - } - } - else - { - m = 0; - sfprintf(sp, "- /#option/2d"); - } - if (m) - sfstrseek(sp, p, SEEK_SET); - else - sfprintf(sp, " 2>/dev/null || :\n"); - sfprintf(sp, "umask 0%o\ncd '%s'\n", co->init.mask, state.pwd); - } done: if (!(flags & CO_SERVER)) {